I need to send data from ajax to a pdf, but at the time of printing the data is lost, is there any configuration of TCPDF, so that it responds to ajax requests?
function ComprobanteCliente()
{
$.post("<?= base_url() ?>PdfImprimirController/GeneraImpresionPDF/CHECKLIST CLIENTE", {
'id_cliente':$('#hddndi').val()
});
}
TCPDF
At the time of writing the url
PdfImprimirController/GeneraImpresionPDF/ENTREGA%20DE%20VEHICULO
the pdf is executed, with the option "I" I print it without saving, what I can not do is to receive the variable ajax
$data['id_cliente']=$this->input->post('id_cliente');
and print at the same time thanks
$pdf->Output('example_001.pdf', 'I');
When sending the ajax request to the pdf the google chrome network generates a coding that does not interpret the browser
This is a fragment of the sample
%PDF-1.7
%âãÏÓ
16 0 obj
<< /Type /Page /Parent 1 0 R /LastModified (D:20170329202948+02'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.276000 841.890000] /CropBox [0.000000 0.000000 595.276000 841.890000] /BleedBox [0.000000 0.000000 595.276000 841.890000] /TrimBox [0.000000 0.000000 595.276000 841.890000] /ArtBox [0.000000 0.000000 595.276000 841.890000] /Contents 17 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /PZ 1 >>
endobj
17 0 obj
<</Filter /FlateDecode /Length 1846>> stream
xí\ÛVÛ8Õs¾Bíî¶x£Ðë*m¡´/mWW&KB)ÓùªùµùÙm¢Ø!M88Y¶Étnû]bÎLÂñ¡ÓW8¾ÑO_pÙÅñÇ~ëÉm?ThÆÃîìѧ;->«mTÉÆ:$"±D¿¥
SFÛÔPÔÎnM¨ákâtE¬.Aû=ºGÑçÝQ7}oì̽¹aå-˨1ÚZ¡%=¦\¤VN;G¨HKUZ]?¨å¾¿)íÖXAý¡ôZá¡ê¨%>Cïfyfº®·ÎZÒâT²Wb§
"ïÏVíuÐ<_)_«JeÒJg-¡ínÐEaÌüJ[[Yvj2ª][×=wO¢I4Óä]¢E ',1ÜCæÎ.ýô<%oÈÙÆõ9Y#l