Example of how to create the PDF, or how to call and return a PDF?
TCPDF/FPDF have many online examples on how to create the PDF
Code:
Ext.Ajax.request({
method: 'POST',
url: 'print_report.php',
params : {
report_name: employee_report_name,
},
success: function(xhr) {
// clear mask and display
grid_panel.getEl().unmask();
window.open('pdf/' + employee_report_name + '.pdf');
},
failure: function() {
// clear mask
grid_panel.getEl().unmask();
alert('AJAX ERROR: Unable to print report, please contact support');
}
});
// print_report.php; you code goes here to create PDF
// last line ... close and output PDF document
$pdf->Output('mypdfreport.pdf', 'I'); // I=inline
Regards,
Scott.