Tcpdf inline

368 views
Skip to first unread message

Vsevolod Ryabokon

unread,
Nov 13, 2013, 12:27:21 PM11/13/13
to joomla-de...@googlegroups.com
Hello! I am using tcpdf for my component. I`v used

$pdf->Output('filename.pdf', 'I')

to send file inline to browser plugin with '&format=raw' url parameter. But after upgrading to joomla 3.2 it does not work and the content of pdf file is sending as string to browser window like:

%PDF-1.7 7 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20131112093816+02'00') /Resources 2 0 R /MediaBox [0.00 0.00 595.28 841.89] /CropBox [0.00 0.00 595.28 841.89] /BleedBox [0.00 0.00 595.28 841.89] /TrimBox [0.00 0.00 595.28 841.89] /ArtBox [0.00 0.00 595.28 841.89] /Contents 8 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 6 0 R ] /PZ 1 >> endobj 8 0 obj <> stream...

I`v set document mimetype with

$doc->setMimeEncoding('application/pdf')

. I`v tried to use

$doc->_mime='application/pdf'

and

$doc->_type='pdf'

- no success.

If i set tcpdf to download file (

$pdf->Output('filename.pdf', 'D')

) it works good and I can download file. So how can i get inline pdf again?
Thanks.

Evandromar Machado

unread,
Nov 13, 2013, 5:54:44 PM11/13/13
to joomla-de...@googlegroups.com
I do not know at what time you do the operation, but you can try:
$ this->pdf = $pdf;
Then it will be available for all your view.

Franz

unread,
Nov 14, 2013, 10:18:10 AM11/14/13
to joomla-de...@googlegroups.com
I think you should close the application after the output, i.e.

$pdf->Output('filename.pdf', 'I');
jexit();
Message has been deleted

Vsevolod Ryabokon

unread,
Nov 15, 2013, 6:34:21 AM11/15/13
to joomla-de...@googlegroups.com
Thank you very much!
Reply all
Reply to author
Forward
0 new messages