PDA

View Full Version : XtPrinter



cmendez21
17 Nov 2008, 4:24 PM
http://e2cs.mm-mendez.com/images/Xtprinter_logo_b.jpg


Hello everyone Her it is my first release of the XtPrinter 1.0.1

With this new class you can generate output on HTML and PDF from the EXTjs - GRID component


Still a lot of features to be added but the request to release the code were many so here it is as stable as possible for the moment.


go to the download page to get it with manual included, usage demo its on the manual and sample

Downloads at:
English: http://e2cs.mm-mendez.com/?page_id=3&language=en
Spanish: http://e2cs.mm-mendez.com/?page_id=3&language=es

Demo at: http://e2cs.mm-mendez.com/?page_id=4&language=en

Hope you like it :D

LeandroC
18 Nov 2008, 5:37 AM
Excelente trabajo!
Excelent work.

I will try it.

netski
18 Nov 2008, 6:49 AM
Great addition to the extensions library! Wondering if it handles exporting grouping or grid filtering?

Cheers,
Timothy

cmendez21
18 Nov 2008, 11:29 AM
Grouping its not supported yet,
Grid filtering yes cause it hanldles the records actually shown on the grid

MJFox
19 Nov 2008, 11:50 PM
thanks a lot... very usefull! =D>

greetings

MJFox

MJFox
20 Nov 2008, 3:29 AM
note: don't forget to specify the correct path to the dompdf-directory in /printer/dompdf-0.5.1/dompdf_config.inc.php at line 48

greetings

MJFox

robin30
21 Nov 2008, 3:02 PM
hi all,

Love the idea of being able to print a grid.

I "installed" your extension but i can't get it to work.

i do get the following error.


opener.printmygridGO is not a function.

this is my code:


Ext.onReady(function(){
var tbView = new Ext.Toolbar({
layout: 'cluster',
cls: "x-cluster-backgrnd",
items: [{
text:'Categories',
slotId:'switchButton',
cls: 'btn_32',
icon: 'images/view_window_switch_32.png', // <-- icon
rowspan: 3,
handler: newcategories
},{
text:'Settings',
slotId:'switchButton',
cls: 'btn_32',
icon: 'images/process.png', // <-- icon
rowspan: 3,
handler: billsetting
},{
text:'Calculator',
slotId:'arrangeButton',
cls: 'btn_32',
icon: 'images/view_window_arrange_32.png', // <-- icon
rowspan: 3,
xtype: 'calculator'
}]
});

var tbClip = new Ext.Toolbar({
layout: 'cluster',
cls: "x-cluster-backgrnd",
items: [{
text:'&nbsp;&nbsp;Add&nbsp;&nbsp;',
slotId:'pasteButton',
cls: 'btn_32',
iconCls: 'addbig', // <-- icon
rowspan: 3,
tooltip: 'Add Bills',
handler: function(){ addbillform() }
},{
text:'Delete',
slotId:'cutButton',
iconCls: 'remove', // <-- icon
id:'deletebill',
tooltip: 'Delete Selected Bill',
handler: function(){ deleteContextMenu() }
},{
text:'Edit',
slotId:'copyButton',
iconCls: 'edit', // <-- icon
tooltip: 'Edit Selected Bill',
id:'editbill',
handler: function(){ editbill() }
}]
});

var tbPrint = new Ext.Toolbar({
layout: 'cluster',
cls: "x-cluster-backgrnd",
items: [{
text:'&nbsp;&nbsp;Print&nbsp;&nbsp;',
slotId:'pasteButton',
cls: 'btn_32',
iconCls: 'print', // <-- icon
rowspan: 3,
tooltip: 'Print bills',
handler: function(){ createreportgrid() }
}]
});
billdue = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'php/database1.php'
}),

baseParams:{task: "BILLDUE"},

reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'id'
},['id','name','amount','due'])
});
billdue.load();
billdue.on('load',function() {
var bill = '';
for(i = 0; i< billdue.getCount(); i++){
bill += billdue.getAt(i).data.name + ' - $' + billdue.getAt(i).data.amount + '<br>';
Ext.MessageBox.alert('Bills Due !!','the following bills are due: <br><br><b>' + bill + '</b>');
}

});
billstore = new Ext.data.Store({
id:'store',
//autoLoad: true,
proxy: new Ext.data.HttpProxy({
url: 'php/database1.php',
method: 'POST'
}),
baseParams:{task: "LISTING"},

reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'id'
},[
{name:'id', type:'string', mapping:'id'},
{name: 'name', type: 'string', mapping: 'name'},
{name: 'due', type: 'date', mapping: 'due',dateFormat: 'Y-m-d'},
{name: 'amount', type:'string',mapping: 'amount'},
{name: 'paid', type:'boolean',mapping: 'paid'},
{name: 'paid_when', type:'date',mapping: 'paid_when',dateFormat: 'Y-m-d'},
{name: 'amount_paid', type:'string',mapping: 'amount_paid'},
{name: 'difference', type:'float',mapping: 'difference'}
]),
// turn on remote sorting
sortInfo:{field: 'due', direction: "ASC"}
});

Ext.grid.CheckColumn = function(config){
Ext.apply(this, config);
if(!this.id){
this.id = Ext.id();
}
this.renderer = this.renderer.createDelegate(this);
};

Ext.grid.CheckColumn.prototype ={
init : function(grid){
this.grid = grid;
this.grid.on('render', function(){
var view = this.grid.getView();
view.mainBody.on('mousedown', this.onMouseDown, this);
}, this);
},

onMouseDown : function(e, t){
if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){
e.stopEvent();
var index = this.grid.getView().findRowIndex(t);
var record = this.grid.store.getAt(index);
record.set(this.dataIndex, !record.data[this.dataIndex]);
}
},

renderer : function(v, p, record){
p.css += ' x-grid3-check-col-td';
return '<div class="x-grid3-check-col'+(v?'-on':'')+' x-grid3-cc-'+this.id+'"> </div>';
}
};

action = new Ext.ux.grid.RowActions({
header:'Actions',
autoWidth:false,
actions:[{
iconCls:'remove',
tooltip:'Delete Bill'
}//,{
// iconCls:'money',
// tooltip:'Pay Bill'
//}
,
{
iconCls:'icon-edit-record'
,tooltip:'Edit Record'
}],callbacks:{
//'money':function(grid, record, action, row, col) {
// paidbillform()
// },
'remove':function(grid, record, action, row,col){
deleteContextMenu()
},
'icon-edit-record':function(grid,record,action,row,col){
editbill();
}
}
});

var sm = new Ext.grid.CheckboxSelectionModel();
var checkColumn = new Ext.grid.CheckColumn({
header: "Paid",
dataIndex: 'paid',
width: 55
});
var cm = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
sm,
{
id:'name',
header: "Name",
dataIndex: 'name',
summaryType: 'count',
summaryRenderer: function(v, params, data){
return ((v === 0 || v > 1) ? '# of Bills: ' + v +'' : '(1 Bill)');
},
width: 120
},{
header: "Due",
dataIndex: 'due',
width: 100,
renderer: function (data, cell, record, rowIndex, columnIndex, store){
return data ? data.dateFormat('Y-m-d') : '';
}
},{
header: "Amount",
dataIndex: 'amount',
renderer: Ext.util.Format.usMoney,
width: 80
},checkColumn,{
header: "Paid When",
dataIndex: 'paid_when',
width: 100,
renderer: function (data, cell, record, rowIndex, columnIndex, store){
return data ? data.dateFormat('Y-m-d') : '';
}
},{
header: "Amount Paid",
dataIndex: 'amount_paid',
renderer: Ext.util.Format.usMoney,
summaryRenderer: function(v, params, data){
return ((v === 0 || v > 1) ? 'Total' : 'Total');
},
width: 100
},{
header: "Yet to Pay",
id:'difference',
dataIndex: 'difference',
renderer: Ext.util.Format.usMoney,
width: 100,
summaryType:'sum',
summaryRenderer: Ext.util.Format.usMoney
}, action]
);

cm.defaultSortable = true;

summary = new Ext.grid.GridSummary();
var grid = new Ext.grid.GridPanel({
id:'lol',
enableColLock:false,
// sm: new Ext.grid.RowSelectionModel({singlerow:true}),
width:700,
height:500,
ds: billstore,
cm: cm,
sm:sm,
plugins: [summary, action ,new Ext.ux.grid.Search({
iconCls:'icon-zoom'
,readonlyIndexes:['all']
,disableIndexes:['amount'],
mode:'local',
position:'top',
align:'right'
})],
trackMouseOver:false,
loadMask: true,
frame:false,
viewConfig: {
forceFit:true
},

bbar: new Ext.PagingToolbar({
pageSize: 15,
store: billstore,
displayInfo: true,
emptyMsg:'No bills to display'
}),
tbar:[{
xtype:"panel"
//,title:"Home"
,layout:"auto"
,items:[{
xtype:"panel"
//,title:"Home"
,layout:"auto"
,items:[{
layout:"cluster"
,cls:"x-cluster-tb-bckgrnd"
,id:"tb"
,layoutConfig:{
rows:2
}
,defaults:{
style:"margin-left:3px;"
,border:false
}
,items:[
tbClip
,{html:"Add/Delete/Edit"
,cls:"cluster-label"
}
,tbView
,{html:"Other"
,cls:"cluster-label"
}
,tbPrint
,{html:"Print"
,cls:"cluster-label"
}
]
}]
}]
}],
listeners:{
click: function(){
if (Ext.getCmp('lol').selModel.getCount() > 0){
Ext.getCmp('deletebill').setDisabled(false);
Ext.getCmp('editbill').setDisabled(false);
} else {
Ext.getCmp('deletebill').setDisabled(true);
Ext.getCmp('editbill').setDisabled(true);
}
}
}
});

var win = new Ext.Window({
id: 'bills-win',
title:'Bills',
width:740,
height:480,
closable:false,
draggable:false,
renderTo: document.body,
iconCls: 'money',
shim:false,
animCollapse:false,
constrainHeader:true,
layout: 'fit',
listeners:{
show: function(win){
Ext.getCmp('lol').el.show();
Ext.getCmp('lol').getStore().load();
},
beforedestroy: function(){
var autoDestroyIt = false;
var grid = Ext.getCmp('lol');
document.body.appendChild(Ext.getDom(grid.el));
grid.el.hide();
this.remove(grid , autoDestroyIt ); //save our grid from destruction!
}
},
items: grid
});

win.show();
billstore.on('load', function() {
if (Ext.getCmp('lol').selModel.getCount() == 0) {
Ext.getCmp('deletebill').setDisabled(true);
Ext.getCmp('editbill').setDisabled(true);
}
})
function createreportgrid(){
storex = new Ext.data.Store({
url:'php/database1.php',
baseParams:{
task:'LISTING'
},
reader: new Ext.data.JsonReader({
root:'records',
id: 'cve',
totalProperty: 'totalCount'
},
[{name:'id', mapping: 'id', type: 'int'},
{name:'name', mapping:'name', type: 'string'},
{name:'due',mapping:'due', type: 'string'},
{name:'amount',mapping:'amount', type: 'string'}]
),
remoteSort: false
})
report_pbar = new Ext.PagingToolbar({
pageSize: 3,
store: storex,
displayInfo: true,
displayMsg: 'Showing Records {0} - {1} of {2}',
emptyMsg: "Theres no data to display"
})
global_printer = new Ext.grid.XPrinter({
grid: grid,
pathPrinter:'./printer',
logoURL: 'companylogo.jpg',
pdfEnable:true,
paperOrientation:'p',
localeData:{
Title:'Employees catalog with Adress',
subTitle:'your subtitle here',
footerText:' footer text here',
pageNo:'Page # ',
printText:' Print ',
closeText:' Close ',
pdfText:' download PDF '
},
useCustom:{
custom:true,
customStore:storex,
columns:['Name','Due','Amount'],
alignCols:['center','left','left'],
pageToolbar:report_pbar,
useIt: false,
showIt: true,
location: 'bbar'
},
showdate:true,
showdateFormat:'Y-F-d H:i:s',
showFooter:true,
styles:'default'
});
storex.on('load', function(){
if (global_printer.flagdatachange){
global_printer.newPage();
}
});
storex.load();
global_printer.prepare();
}
function printmygridGO(obj){
global_printer.printGrid(obj);
}
})////END LAST END LAST END LAST

regards,

Robin30

cmendez21
22 Nov 2008, 12:54 AM
read the manual and check the sample on the javascript there are some funtions like this


var global_printer = null; // it has to be on the index page or the generator page always
function printmygridGO(obj){ global_printer.printGrid(obj); }
function printmygridGOcustom(obj){ global_printer.printCustom(obj); }

robin30
22 Nov 2008, 12:18 PM
thanks for your reply,

Really appreciate it.

Overread it, ugh,lol

time for some glasses en more ~o).

Thanks for this great extension.

Regards,
Robin

beebop
11 Dec 2008, 2:04 AM
Thanks for your extension. It's very easy to print data with it.
However I has a problem with it. I have a grid of restaurants with 9 columns, and I try to print the 8 first columns.
The columns header are displayed in the good order but the data columns aren't !
The 2nd and 3rd columns of the grid (Categories 1 and 2) should be displayed after the first column (NomRestaurant), but they are displayed after the 8th columns (Tel number).
Here is my code :

function del(value)
{
document.getElementById("supprime").value=value;
Ext.MessageBox.confirm('Confirmation', 'Voulez vous vraiment supprimer ce restaurant ?',showResult);
}

function showResult(btn)
{
if(btn=="yes")
{
page('listeRestaurants.php?action=del&id='+document.getElementById("supprime").value);
}

}
Ext.ux.menu.RangeMenu.prototype.icons = {
gt: 'img/greater_then.png',
lt: 'img/less_then.png',
eq: 'img/equals.png'
};
Ext.ux.grid.filter.StringFilter.prototype.icon = 'img/find.png';

// create the Data Store
var ds = new Ext.data.Store({
// load using script tags for cross domain, if the data in on the same domain as
// this page, an HttpProxy would be better
proxy: new Ext.data.HttpProxy({url: 'jason_listeRestaurants.php'}),

// create reader that reads the Topic records
reader: new Ext.data.JsonReader({
root: 'restaurants',
totalProperty: 'totalCount',
id: 'IdRestaurant'
}, [
{name: 'NomRestaurant', mapping: 'NomRestaurant'},
{name: 'Adresse1', mapping: 'Adresse1'},
{name: 'CodePostal', mapping: 'CodePostal'},
{name: 'Ville', mapping: 'Ville'},
{name: 'Email', mapping: 'Email'},
{name: 'Tel', mapping: 'Tel'},
{name: 'LibelleCategorieRestaurant', mapping: 'LibelleCategorieRestaurant'},
{name: 'LibelleCategorieRestaurantBis', mapping: 'LibelleCategorieRestaurantBis'},
{name: 'IdRestaurant', mapping: 'IdRestaurant'}
]),

// turn on remote sorting
remoteSort: true
});
ds.setDefaultSort('NomRestaurant', 'asc');

// pluggable renders

function action(value){
return '<a href="javascript:page(\'setRestaurant.php?id='+value+'\')"><img src="images/icons/page_paintbrush.png" alt="Modifier"></a>&nbsp;&nbsp;&nbsp;<img src="images/icons/bin_empty.png" alt="Supprimer" onClick="javascript:del('+value+')" style="cursor:pointer">';
}
// the column model has information about grid columns
// dataIndex maps the column to the specific data field in
// the data store
var filters = new Ext.ux.grid.GridFilters({
filters:[
{type: 'string', dataIndex: 'NomRestaurant'},
{type: 'string', dataIndex: 'CodePostal'},
{type: 'string', dataIndex: 'Ville'},
{type: 'string', dataIndex: 'LibelleCategorieRestaurant'}
]
});
var cm = new Ext.grid.ColumnModel([{
// id assigned so we can apply custom css (e.g. .x-grid-col-topic b { color:#333 })
header: "Restaurant",
dataIndex: 'NomRestaurant',
width: 130
},{
header: "Cat&eacute;gorie",
dataIndex: 'LibelleCategorieRestaurant',
width: 125
},{
header: "Cat&eacute;gorie 2",
dataIndex: 'LibelleCategorieRestaurantBis',
width: 125
},{
header: "Adresse",
dataIndex: 'Adresse1',
width: 170
},{
header: "Code postal",
dataIndex: 'CodePostal',
width: 80
},{
header: "Ville",
dataIndex: 'Ville',
width: 120
},{
header: "Email",
dataIndex: 'Email',
width: 110
},{
header: "T&eacute;l",
dataIndex: 'Tel',
width: 80
},{
header: "Action",
dataIndex: 'IdRestaurant',
width: 74,
sortable: false,
align:'center',
renderer : action
}]);

// by default columns are sortable
cm.defaultSortable = true;

var grid = new Ext.grid.GridPanel({
el:'topic-grid',
width:1035,
height:600,
title:'Liste des restaurants',
store: ds,
cm: cm,
trackMouseOver:true,
sm: new Ext.grid.RowSelectionModel({selectRow:Ext.emptyFn}),
loadMask: true,
plugins: filters,
/*bbar: new Ext.PagingToolbar({
pageSize: 25,
store: ds,
displayInfo: true,
displayMsg: 'Restaurants {0} - {1} &agrave; {2}',
emptyMsg: "Pas de restaurant"
}),*/
tbar : [
{
text:'Nouveau restaurant',
tooltip:'Ajouter un nouveau restaurant',
iconCls:'add',
handler: addResto
},{
text: 'Exporter',
tooltip: 'Exporter la liste des restaurants',
iconCls: 'export',
handler: function(){
basic_printGrid_exclude();
}
}
]
});

function addResto(item, pressed){
page('addRestaurant.php');
}

// render it
grid.render();

// trigger the data store load
ds.load();

var global_printer = null; // it has to be on the index page or the generator page always
function printmygridGO(obj){ global_printer.printGrid(obj); }
function printmygridGOcustom(obj){ global_printer.printCustom(obj); }

function basic_printGrid_exclude(){
global_printer = new Ext.grid.XPrinter({
grid:grid, // grid object
pathPrinter:'./printer', // relative to where the Printer folder resides
logoURL: '../images/logo_trans.gif', // relative to the html files where it goes the base printing
pdfEnable: false, // enables link PDF printing (only save as)
hasrowAction:false,
excludefields:'8,', // 0 based index , if it has numberer or action it counts as a column
localeData:{
Title:'Liste des restaurants',
subTitle:'by Mond.net',
footerText:'Report Footer goes here',
pageNo:'Page # ', //page label
printText:'Imprimer', //print document action label
closeText:'Fermer', //close window action label
pdfText:'PDF'
},
useCustom:{ // in this case you leave null values as we dont use a custom store and TPL
custom:false,
customStore:null,
columns:[],
alignCols:[],
pageToolbar:null,
useIt: false,
showIt: false,
location: 'bbar'
},
showdate:true,// show print date
showdateFormat:'Y-F-d H:i:s', //
showFooter:true, // if the footer is shown on the pinting html
styles:'default' // wich style youre gonna use
});
global_printer.prepare(); // prepare the document
}

PS : I have also an other problem : the PDF generation doesn't work (Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 4864 bytes) in /var/www/site13/backoffice/printer/dompdf-0.5.1/include/text_frame_reflower.cls.php(319) : runtime-created function on line 1)

cmendez21
11 Dec 2008, 7:24 AM
Hi beebop

First of all something i have done on the reports its to Order in the store the fields exactly as the column headers so the store's field index can match the index of the column header

you may use firebug to check the behavior of the printer code also on lines 158 to 241

Check this property also usenameindex (not included on the manual) :">

About the domPDF error check the dompdf page and forum.

In my experience i've some errors too when the records are too much and if you are using the custom tpl that came with xprinter maybe it generates a table so big it passes the page height so this issue generates an error (domPDF error)

on this case what you can do is:

1.- Adjust the paging of the grid so each time you create a report it could match the eheigh of the page

2.- change or adjust to your needs the TPL object on line 99 on the file extjs_printergrid_0.0.1.js so instead of generating a TABLE element it could create a DIV element

Hope this works

PD. if it doesn't work please give me a link so i can check it out and see what the problem is ;)

beebop
11 Dec 2008, 7:35 AM
I realized my data were in the same order as my store, while it should be as my grid.
Resolved with usenameindex: true.
Should'nt it be grid's order by default ?
And it would not be as disturbing if columns header had the same order as the data (it seems columns header don't take care of usenameindex value).

beebop
11 Dec 2008, 7:53 AM
Now printing works good. PDF export still does not works, and it will be more complicated, because I have to print at least 100 or 150 items, but PDF export is not indispensable for me, unlike printing, so it is not disturbing.

cmendez21
11 Dec 2008, 7:56 AM
Well you right, gonna check it later

But for the app i'm making was easier for me to get the header as reference and only the name so i could link it by index to the store fields or data (in the case of grids),also consider the Xtprinter needs a lot work yet :"> its the first version

beebop
11 Dec 2008, 8:20 AM
No problem. It works good enough for me now. :D
I have just one last problem, when printing. I have strange characters in my headers (using

cmendez21
11 Dec 2008, 8:31 AM
inside xtprinter file add a custom function to replace those chars maybe with acute; notations , on lines 219 and 221

replace :

219:
tdvalues+= testrender.call(this,this.grid.store.getAt(i).data[this.grid.store.getAt(i).fields.items[jval].name])
221:
tdvalues+= testrender.call(this,this.grid.store.getAt(i).data[this.grid.getColumnModel().config[numcolref].dataIndex])

FOr
219:
tdvalues+=youfunction(testrender.call(this,this.grid.store.getAt(i).data[this.grid.store.getAt(i).fields.items[jval].name]))
221
tdvalues+=youfunction( testrender.call(this,this.grid.store.getAt(i).data[this.grid.getColumnModel().config[numcolref].dataIndex]))

calavera
20 Dec 2008, 2:48 AM
This is a very nice plugin. Can anyone tell me, please how can I show all the records on the printing page ? I have pagination on my grid and at print I only get a few results that were on my 1st page of the grid ..Maybe a solution for this ? I tried the pagination over the printing page but no success. How should I handle multiple pages of records at print ?

Thanks.

TopKatz
20 Dec 2008, 4:50 PM
This is a very nice plugin. Can anyone tell me, please how can I show all the records on the printing page ? I have pagination on my grid and at print I only get a few results that were on my 1st page of the grid ..Maybe a solution for this ? I tried the pagination over the printing page but no success. How should I handle multiple pages of records at print ?

Thanks.

Its taking the data from the store. If you want more then you will have to bring back more. Paging works by setting a limit on what is returned. You cant print what you dont have. All you have to do is load the store with all the results when the 'print' is requested by the user.

calavera
21 Dec 2008, 1:16 AM
Its taking the data from the store. If you want more then you will have to bring back more. Paging works by setting a limit on what is returned. You cant print what you dont have. All you have to do is load the store with all the results when the 'print' is requested by the user.
Thank you for your response. That seems perfectly logic. Unfortunately, I'm not that experienced with Ext as I'm just beginning to get the feel of it. I don't know how to do this, how to load the store with different results limitations when the print is actually requested. I could use an example, but only if it's not too much. Otherwise, more details on this operation would be appreciated.

Thank you.

TopKatz
21 Dec 2008, 5:26 AM
Thank you for your response. That seems perfectly logic. Unfortunately, I'm not that experienced with Ext as I'm just beginning to get the feel of it. I don't know how to do this, how to load the store with different results limitations when the print is actually requested. I could use an example, but only if it's not too much. Otherwise, more details on this operation would be appreciated.

Thank you.

You just need to do your store.load() with out the start and limit paramaters

calavera
21 Dec 2008, 8:12 AM
You just need to do your store.load() with out the start and limit paramaters
yes, but how do i do that only when i want the print? because i need pagination for my grid. i just dont need it with the print popup...

cmendez21
22 Dec 2008, 9:51 PM
just supress the toolbar from the popup on the printer creation code anyway the toolbar does not appear on the print.

and as TopKatz says its taking the records from the store if you want custom data you could use the other method (custom store) to print your records or if you dont want the paging toolbar then use the property useIt: false, Check the manual to see what all the options and properties can do :)

I know its a bit tricky but you need to understand a little bit more of Extjs , also for to check the behavior you could use firebug and set breakpoints to see whats going on with the xtprinter ;)

cmendez21
24 Dec 2008, 2:23 AM
Heres a Tip

EXAMPLE

if you have 1000 records in your table and your paging in your grid its about 100 records per page use the custom printing method instead of the GRID printing method

now the important part its that you have to create a php function that allows you to retrieve all the records in one request

An important part now its to determine how many records fit on a single page

On the server side you have to set the paging and for each page (a loop to create all the pages)

you specify the JSON response

{success:true,
records:[{"page":"1",
"datapage":[
{"id":"1","name":"richard miller"},
{"id":"2","name":"richard miller"},
AND so on
]
}

now on the template

<tpl for=".">
your page header...... page#{page}
<tpl for="datapage">
the data for your page
</tpl>
</tpl>


And that will be all

Obviously you will have to make some changes to the tpl base for printing on the JS file for the xtprinter

Or you could add a new method that will handle this option

snoir
29 Dec 2008, 4:49 AM
I used the summary plugins,and I want to print summary result,how can I do?

calavera
30 Dec 2008, 9:22 AM
just supress the toolbar from the popup on the printer creation code anyway the toolbar does not appear on the print.

and as TopKatz says its taking the records from the store if you want custom data you could use the other method (custom store) to print your records or if you dont want the paging toolbar then use the property useIt: false, Check the manual to see what all the options and properties can do :)

I know its a bit tricky but you need to understand a little bit more of Extjs , also for to check the behavior you could use firebug and set breakpoints to see whats going on with the xtprinter ;)


Thanks for the tip. It works perfect now. I want to ask you a question: Is it possible to modify the rows generator that fills up the print page with records from datastore so that after every 25 records to display a text like "New page - 30 Dec 2008" ? This way, I can't loose my reports because I would have the date ar the end of every printed page. So, can we mark every end of page ? Or even better, every start of the page ? I would be glad if I could even bring up the printing header with the logo and date on every 20 records. Let me know.

Thank you very much!

cmendez21
30 Dec 2008, 10:26 AM
I used the summary plugins,and I want to print summary result,how can I do?

you need to modify the XTprinter file its not supported yet

cmendez21
30 Dec 2008, 10:28 AM
Thanks for the tip. It works perfect now. I want to ask you a question: Is it possible to modify the rows generator that fills up the print page with records from datastore so that after every 25 records to display a text like "New page - 30 Dec 2008" ? This way, I can't loose my reports because I would have the date ar the end of every printed page. So, can we mark every end of page ? Or even better, every start of the page ? I would be glad if I could even bring up the printing header with the logo and date on every 20 records. Let me know.

Thank you very much!

mm you will have to modify the (base) xTemplate inside the Xtprinter file so you can adjust for you needs unfortunately haven't tried to keep count of records inside the XTemplate

calavera
17 Jan 2009, 2:58 AM
I have a problem: When I click the print button, the pop-up appears but it's empty, no results. I have checked the firebug console and found out the the pop-up comes in before the json request is finished. So if I click refresh after the query is finished, my results would appear...Is there any way to launch the pop-up after the query is complete ? So that I would get the results from the first attempt, not to wait for it and press refresh ? Also, I noticed that the printing doesn't support very large sets of data...can this be fixed ? Or it's the POST/GET restriction from PHP that's limiting ?

Thank you.

cmendez21
17 Jan 2009, 6:59 AM
I have a problem: When I click the print button, the pop-up appears but it's empty, no results. I have checked the firebug console and found out the the pop-up comes in before the json request is finished. So if I click refresh after the query is finished, my results would appear...Is there any way to launch the pop-up after the query is complete ? So that I would get the results from the first attempt, not to wait for it and press refresh ? Also, I noticed that the printing doesn't support very large sets of data...can this be fixed ? Or it's the POST/GET restriction from PHP that's limiting ?
Thank you.

1.- You could load the store before creating the printer obejct (check the sample how its working) and on the event on load create the printer

2.- Large data sets depends upon the Server side response time so thats why you could use paging , the largest dataset for a I've used its about 300 records (10 columns) (serverside)

indeed i think theres a lot more work to be done on the printer , gonna check it as soon as i can :)

calavera
17 Jan 2009, 8:02 AM
1.- You could load the store before creating the printer obejct (check the sample how its working) and on the event on load create the printer

2.- Large data sets depends upon the Server side response time so thats why you could use paging , the largest dataset for a I've used its about 300 records (10 columns) (serverside)

indeed i think theres a lot more work to be done on the printer , gonna check it as soon as i can :)
We would surely appreciate more advanced work on this project.

Thank you for all! I will try your suggetions.

calavera
17 Jan 2009, 3:13 PM
Unfortunately, I didn't manged to load the store before creating the printer object...I don't think I know exactly what that means. I think I would need a function to tell if the store has finished or not..and if it's finished, to display the pop-up.

Any ideas ?

cmendez21
24 Jan 2009, 9:47 AM
on the store.on('load', function(){
// here create the printer and show now the records
}
but also gonna try to add new demos with server side data

calavera
26 Jan 2009, 5:56 PM
That worked fine. Thank you for your help. I did this:

customstore.on('load', function(){

global_printer.prepare();
});

I have another problem now: the pop-up won't come up if I have more that 6 pages. I don't know why... the store load start and limit parameters are from 0 to 999999999 so that I can grab all the results. So if I have 7 pages, the pop-up won't come up, but the customstore gets loaded properly without any errors. I can see it in firebug. When I filter by some value and end up with 6 pages (or 5,4,3 etc.) the pop-up comes up properly... My webserver POST limits are very high. What could be the problem ?

Thank you again for you help. Maybe you could bare a little more with me.

cmendez21
26 Jan 2009, 6:11 PM
That worked fine. Thank you for your help. I did this:

customstore.on('load', function(){

global_printer.prepare();
});

I have another problem now: the pop-up won't come up if I have more that 6 pages. I don't know why... the store load start and limit parameters are from 0 to 999999999 so that I can grab all the results. So if I have 7 pages, the pop-up won't come up, but the customstore gets loaded properly without any errors. I can see it in firebug. When I filter by some value and end up with 6 pages (or 5,4,3 etc.) the pop-up comes up properly... My webserver POST limits are very high. What could be the problem ?

Thank you again for you help. Maybe you could bare a little more with me.

:-? Honestly i cant tell cause i use the printer for small paging at most 150 records

But in the logic the xtprinter Uses a Xtemplate object "<for ='.'></for>" to display data so why don't you check if the store finishes loading all the data you need if it does

May be it could be an Xtemplate problem on handling large datasets

but gonna check also and run some tests

calavera
27 Jan 2009, 3:33 AM
:-? Honestly i cant tell cause i use the printer for small paging at most 150 records

But in the logic the xtprinter Uses a Xtemplate object "<for ='.'></for>" to display data so why don't you check if the store finishes loading all the data you need if it does

May be it could be an Xtemplate problem on handling large datasets

but gonna check also and run some tests

I've tried this way too:


customstore.on('load', function(){

alert("I am loaded!");
});

Same problem: When I have less results, the alert comes in. More than 6 pages, the alert does not come in...Very strange...I have checked the firebug console and the response is the one expected...but why does it stop there...

I also tried something else: I have 7 columns and 163 results when the printing window does not come up and 7 columns and 143 results when it does work properly. Now, it's a difference of 20 results. I have forced the PHP database query to LIMIT results to a higher number and guess what: the printing pops up for a results number like 341. I have counted the table rows with an editor and there are 341 rows indeed in the printing window...so it supports much more... If I set in MySQL query: LIMIT 342 it breaks. Including the basic grid which comes up with no results. This is so strange. I'm doing something wrong for sure...

calavera
27 Jan 2009, 4:46 AM
How could I not think about this ?... JSON was stuck because of "corrupt" data I had in my database. The record with ID 342 (just the next value from 341 that the print won't take) had double quotes " " in it. I just sent the data to JSON from

"field":"<?=$field_value?>"

to

"field":'<?=$field_value?>'

So now the data is extracted properly and it prints out all 500 records. Thank you for your patience. I hope I'll be good from here.

cmendez21
29 Jan 2009, 2:30 AM
:D glad your problem was solved

prabhukm
7 Feb 2009, 7:50 PM
While trying to create a PDF File where a page contains more images, getting the following exception. Can you please guide me.




[Fri Feb 06 17:18:27 2009] [error] [client 127.0.0.1] PHP Warning: getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: PNG file corrupted by ASCII conversion in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\image_frame_reflower.cls.php on line 70, referer: http://localhost/php/printer/base_print_001.php?pdfgen=1&paper=p

[Fri Feb 06 17:18:27 2009] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with message 'Frame not found in cellmap' in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\cellmap.cls.php:262\nStack trace:\n#0 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_row_group_frame_reflower.cls.php(78): Cellmap->get_frame_width(Object(Table_Row_Group_Frame_Decorator))\n#1 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\frame_decorator.cls.php(387): Table_Row_Group_Frame_Reflower->reflow()\n#2 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_frame_reflower.cls.php(468): Frame_Decorator->reflow()\n#3 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\frame_decorator.cls.php(387): Table_Frame_Reflower->reflow()\n#4 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_cell_frame_reflower.cls.php(115): Frame_Decorator->reflow()\n#5 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\cellmap.cls.php on line 262, referer: http://localhost/php/printer/base_print_001.php?pdfgen=1&paper=p

calavera
7 Feb 2009, 11:29 PM
While trying to create a PDF File where a page contains more images, getting the following exception. Can you please guide me.




[Fri Feb 06 17:18:27 2009] [error] [client 127.0.0.1] PHP Warning: getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: PNG file corrupted by ASCII conversion in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\image_frame_reflower.cls.php on line 70, referer: http://localhost/php/printer/base_print_001.php?pdfgen=1&paper=p

[Fri Feb 06 17:18:27 2009] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with message 'Frame not found in cellmap' in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\cellmap.cls.php:262\nStack trace:\n#0 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_row_group_frame_reflower.cls.php(78): Cellmap->get_frame_width(Object(Table_Row_Group_Frame_Decorator))\n#1 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\frame_decorator.cls.php(387): Table_Row_Group_Frame_Reflower->reflow()\n#2 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_frame_reflower.cls.php(468): Frame_Decorator->reflow()\n#3 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\frame_decorator.cls.php(387): Table_Frame_Reflower->reflow()\n#4 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_cell_frame_reflower.cls.php(115): Frame_Decorator->reflow()\n#5 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\cellmap.cls.php on line 262, referer: http://localhost/php/printer/base_print_001.php?pdfgen=1&paper=p



Hmm...I am not using that class anymore. You might have a problem with higher DPI images. Go check the dompdf_config.inc.php file at line 157 for define("DOMPDF_DPI", "150"); . Change it to 350 or higher, I don't know for sure.
Maybe this will help.

Cheers.

cmendez21
8 Feb 2009, 6:45 AM
While trying to create a PDF File where a page contains more images, getting the following exception. Can you please guide me.




[Fri Feb 06 17:18:27 2009] [error] [client 127.0.0.1] PHP Warning: getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: PNG file corrupted by ASCII conversion in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\image_frame_reflower.cls.php on line 70, referer: http://localhost/php/printer/base_print_001.php?pdfgen=1&paper=p

[Fri Feb 06 17:18:27 2009] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with message 'Frame not found in cellmap' in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\cellmap.cls.php:262\nStack trace:\n#0 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_row_group_frame_reflower.cls.php(78): Cellmap->get_frame_width(Object(Table_Row_Group_Frame_Decorator))\n#1 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\frame_decorator.cls.php(387): Table_Row_Group_Frame_Reflower->reflow()\n#2 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_frame_reflower.cls.php(468): Frame_Decorator->reflow()\n#3 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\frame_decorator.cls.php(387): Table_Frame_Reflower->reflow()\n#4 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\table_cell_frame_reflower.cls.php(115): Frame_Decorator->reflow()\n#5 C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs in C:\\IneoQuest\\CMS\\iCMS-1.01.002\\apache\\htdocs\\php\\printer\\dompdf-0.5.1\\include\\cellmap.cls.php on line 262, referer: http://localhost/php/printer/base_print_001.php?pdfgen=1&paper=p


Check your library support for the images and also check the domPDF help forum cause the last issue is a dompdf error maybe you have to add dompdf features support for many things you want to use

extjs_new
8 Feb 2009, 12:02 PM
Hi is this compatible with the latest ExtJS 2.x?
'coz I can not make it working in my local PC. Thanks

Rafael
11 Feb 2009, 6:50 AM
great code.

Rafael
11 Feb 2009, 8:23 AM
Man your code it is work but have a two error:


Components is not defined
http://localhost:8090/pdf/extjs_printergrid_0.0.1.js



Permissão negada para ler a propriedade XULElement.accessibleType
http://localhost:8090/pdf/extjs_printergrid_0.0.1.js

calavera
11 Feb 2009, 11:27 AM
I have no errors in this file. Please, make sure that you include your Ext files and Ext Printergrid files properly.

cmendez21
11 Feb 2009, 12:37 PM
Man your code it is work but have a two error:


Components is not defined
http://localhost:8090/pdf/extjs_printergrid_0.0.1.js

Permissão negada para ler a propriedade XULElement.accessibleType
http://localhost:8090/pdf/extjs_printergrid_0.0.1.js


Check the sample ,and manual on how the xtprinter works cause its kinda confusing at the beggining, even for me some times also its confusing :D

Checklist:

1.- Check that you have included ok all the files,
2.- Check the variables you need on the HTML page so you can make it work
3.- if using grid check the grid doesnt have renderer functions if you have then go for using custom store and in the Tpl object use the functions

Rafael
12 Feb 2009, 6:09 PM
that is all right.

I have a doubt, How to make to generate the pdf without to click in link PDF?

calavera
12 Feb 2009, 7:13 PM
that is all right.

I have a doubt, How to make to generate the pdf without to click in link PDF?
Without to click in link ? How exactly do you want it to activate ?

Rafael
13 Feb 2009, 9:17 AM
I need to execute the function PDF when to execute the file extjs_printergrid_0.0.1.js

cmendez21
14 Feb 2009, 9:57 PM
I need to execute the function PDF when to execute the file extjs_printergrid_0.0.1.js

:-| thats not possible cause the when you send for PDF it renders the HTML generated not the data

prabhukm
17 Feb 2009, 1:43 PM
I'm having data for almost 3 Pages, but the footer text added to the last page instead of each and every page.


Page # 1 | © 2009 rights reserved.

Can you guide me?

cmendez21
17 Feb 2009, 2:08 PM
I'm having data for almost 3 Pages, but the footer text added to the last page instead of each and every page.
Can you guide me?

Well you cant set A page break on html (:|

What i do is to show only records that fit on one letter page and print it (using paging toolbar to change page and print one by one)

Thats one of the main problems of printing WEB pages

cmendez21
19 Feb 2009, 3:47 PM
Well you cant set A page break on html (:|
What i do is to show only records that fit on one letter page and print it (using paging toolbar to change page and print one by one)
Thats one of the main problems of printing WEB pages

Don't listen to me , I've got the page breaks :D, im preparing the version 2.0 with paging support (page breaks) and multiple headers and footers, also grouping Data , an easy choice /alternative cause the grouping store only functions on the grid logic B)

calavera
20 Feb 2009, 1:24 AM
Don't listen to me , I've got the page breaks :D, im preparing the version 2.0 with paging support (page breaks) and multiple headers and footers, also grouping Data , an easy choice /alternative cause the grouping store only functions on the grid logic B)
GO GO GOOOO ! :D

alindsay55661
20 Feb 2009, 2:10 PM
That is excellent news.... when do you anticipate 2.0?

wwwtd
20 Feb 2009, 11:02 PM
Good Job~。but I want an example with java or jsp .can you give me ? I don't use php code. Thank you~

cmendez21
20 Feb 2009, 11:07 PM
Good Job~。but I want an example with java or jsp .can you give me ? I don't use php code. Thank you~
sorry i dont know how to program java or jsp :">

cmendez21
17 Mar 2009, 11:59 PM
That is excellent news.... when do you anticipate 2.0?

Sorry everybody for the delay on the new version, we are trying to do as fast as we can but some major deadlines have came in the past few months an we are very short on time ands short on people. :((

We are doing aour best to release it on the beginning of April '09 and with major improvements.

Sorry for the inconvinience it may cause to the xt-printer users :">.

calavera
18 Mar 2009, 5:35 AM
This is really great news ! I'm holding my breath for the new version.

Thanks for all.

calavera
8 Apr 2009, 8:16 AM
Hello. I have changed my code and I am now using Buffering Http State Provider from Saki (http://extjs.com/forum/showthread.php?t=24970) to save my columns size and everything including the grid filters data. The problem is that now I restore my state from the database so if I filter by the column "name" and try to print, it would print all records, no filters would be applied. Do you have any idea how to work this ? To make XtPrinter get its filter values from database as the grid does ? Or at least keep the original filtering values from the grid to be used just for printing ? I really need this.

Thank you!

cmendez21
8 Apr 2009, 2:43 PM
:-? sound like you have to make another funtion inside the XTprinter object so it can handle the values as you want (custom made)

But you could filter the values or data and fill it into a store and pass it as the custom printing method (that what i think it could do the work)

calavera
8 Apr 2009, 5:13 PM
:-? sound like you have to make another funtion inside the XTprinter object so it can handle the values as you want (custom made)

But you could filter the values or data and fill it into a store and pass it as the custom printing method (that what i think it could do the work)

Would you post some code about it here ? If it's not too much to ask... I have the values in $data . I don't know how to load it for the custom store that the printing is using.

Thanks.

cmendez21
15 Apr 2009, 2:07 PM
Would you post some code about it here ? If it's not too much to ask... I have the values in $data . I don't know how to load it for the custom store that the printing is using.

Thanks.
Hi calavera, im still testing this issue , i havent forget about this ;)

calavera
15 Apr 2009, 4:18 PM
Hi calavera, im still testing this issue , i havent forget about this ;)
Thank you man. I appreciate it. Let me know.

Cheers

calavera
24 Apr 2009, 7:14 AM
Any luck on my issue ?

cmendez21
24 Apr 2009, 8:10 AM
Honestly i cant meke work the Buffering Http State Provider from Saki but what i have seen & read its that you should have the filter applied on the store but well I have i've found a easy way to do is this :

(even i tested on the page of saki If the Filter applies to the grid's store )

Filter The Store manually to the desired field & value you need before creating the XTprinter object and then on the XTprinter use the filtered store

Heres the code you can use to filter the Store :



function FilterStore(field,value){
grid.store.filterBy ( function(record,id){
// Here us can use regexp or the logic you need
if (record.data[field].indexOf(value)<0 ){
return false;
} else {
return true;
}
});
}
So you could use it like this :




FilterStore('[FIELd youre gonna filter by]','[your filter value here]');
global_printer = new Ext.grid.XPrinter({
grid: yourgrid,
pathPrinter:'./printer',
logoURL: 'companylogo.jpg',
pdfEnable:true,
paperOrientation:'p',
localeData:{
Title:'Employees catalog with Adress',
subTitle:'your subtitle here',
footerText:' footer text here',
pageNo:'Page # ',
printText:' Print ',
closeText:' Close ',
pdfText:' download PDF '
},
useCustom:{
custom:true,
customStore:grid.store,
columns:['ID','Employee Name','Description'],
alignCols:['center','left','left'],
pageToolbar:report_pbar,
useIt: false,
showIt: true,
location: 'bbar'
},
showdate:true,
showdateFormat:'Y-F-d H:i:s',
showFooter:true,
styles:'default'
});


The other thing (recommended if you dont wnat to alter the records displayed on the grid) What you can do its (before creating the Xtprinter object) :

1.- Create a new Store with the same structure as the grid's store
2.- Create a for each record in the Grid's store so you can add each record to the new empty store (you can set the logic on the FOR so you can only add the records that
apply to the filter
3.- Filter the new store and works

Hope this works if not tell me to keep checking ;)

calavera
28 Apr 2009, 6:39 AM
Hello, cmendez21.

I have tried your solution with the manually filter set and it works. Thanks for taking your time to help me. However, I think I got it working in other way: I have set the id for my printing custom store the same with my main store id. So now, with both having the same id, they both take the necessary info for filtering. So, when I hit the print button I invoke the buffering function again and get the data from sqlite. I don't know if this is the best solution, but I encountered no problems until now. I hope its ok.

Thank you :D

columbus30
13 Sep 2009, 9:48 AM
when i click on PDF following appears on blank screen:

set_paper ('letter', $dataorientation ); $dompdf->load_html($htmlcontent); $dompdf->render(); $dompdf->stream("reporte_gm.pdf"); ?>

This is not an error but i cant understand why the pdf is not appearing

Please guide me in finding the solution for this problem.

Print is working fine.

cmendez21
21 Sep 2009, 1:10 PM
Check your DOMPDF settings it mey be an issue around dompdf or post a sample that could reproduce this error

calavera
21 Sep 2009, 2:17 PM
Heya, cmendez. Any news about XtPrinter and ExtJS 3 ? :>

cmendez21
21 Sep 2009, 3:55 PM
im developing a more complete version compatible for 2x and 3x but its gonna be at ends of october after the release of the new calendar version (which i intend to give capabilities to print the calendar also..!) ;)

calavera
22 Sep 2009, 6:17 AM
Ok. Waiting forward for the release :D

TopKatz
28 Oct 2009, 7:20 AM
What a nice extension. I have it working fine with 3.x. The only thing I noted is that you need to have the store fields in the same order as the grid fields.

I am curious what the intent is with the page number in the footer? It seams sort of redundant, and incorrect at first blush. Can you explain? The html out put does not page break, so Im not sure what the idea was with it, and pdf does not use it either.

Also, DOMPDF is a real hog. I already bumped up my php.ini memory_limit = up to 128m to handle grids with 200 records in them. This is just in testing, and Im not sure of the risk reward to allowing for that. Any thoughts or experiences?

EDIT - most of this stuff is addressed in the previous posts. Thanks

TopKatz
29 Oct 2009, 5:47 AM
An easy way to work around the renderer issue is to just trap for it.



if(r !== undefined){
do some stuff
}

return v;


that way you dont need custom stores or cm to handle renderers.

alexbanda1982
1 Dec 2009, 12:36 PM
Grouping its not supported yet,
Grid filtering yes cause it hanldles the records actually shown on the grid

I use too much your component and I thank you for that, but I'm waiting about grouping support, when do you think we could see the grouping features in your excelent plugin

Uso mucho tu componente, te agradezco por el mismo, pero desde hace tiempo espero que nos ayudes con el soporte para grids agrupados, cuando crees que podamos ver esta característica en tu excelente plugin?

Muchas gracias por todo!!

cmendez21
1 Dec 2009, 1:06 PM
I use too much your component and I thank you for that, but I'm waiting about grouping support, when do you think we could see the grouping features in your excelent plugin

Uso mucho tu componente, te agradezco por el mismo, pero desde hace tiempo espero que nos ayudes con el soporte para grids agrupados, cuando crees que podamos ver esta característica en tu excelente plugin?

Muchas gracias por todo!!

We are working hard on Xtprinter next version and E2Cs calendar version 1.0 due to suffer big illness issues i have not been able to work as i expected (:|

But we are working as much as my body lets me work, we expect to have it ready on the end of year to work, ALso part of the delay was to replace DOMPDF & to let XTprinter print the E2CS calendar views also.



What a nice extension. I have it working fine with 3.x. The only thing I noted is that you need to have the store fields in the same order as the grid fields.

I am curious what the intent is with the page number in the footer? It seams sort of redundant, and incorrect at first blush. Can you explain? The html out put does not page break, so Im not sure what the idea was with it, and pdf does not use it either.

Also, DOMPDF is a real hog. I already bumped up my php.ini memory_limit = up to 128m to handle grids with 200 records in them. This is just in testing, and Im not sure of the risk reward to allowing for that. Any thoughts or experiences?

EDIT - most of this stuff is addressed in the previous posts. Thanks
The next version will support page break, also DOMPDF is too much trouble at mid-terms so we are intending on replacing it with TCPDF (still on tests)

alexbanda1982
1 Dec 2009, 1:11 PM
Thanks, I'll be waiting!

kathyink
9 Jan 2012, 8:46 PM
I wonder if anyone out there is still using this first release of XtPrinter. Though it has been 3 years and there have been updates, the first release had worked quite well. All thanks to the various upgrades and bug fixes that kept it working well.