save generate pdf to server - php

I am developing an application and I need to create pdf files. using pdfbundle
public function helloAction($id)
{
$format = $this->get('request')->get('_format');
$venta = $this->getDoctrine()->getRepository('miomioBundle:Venta')->find($id);
$lineas = $venta->getLineas();
$cliente = $venta->getCliente();
$empleado = $venta->getEmpleado();
//return new Response ($cliente->getNombre());
$pdf = $this->render(sprintf('miomioBundle:Venta:helloAction.%s.twig', $format), array('cliente' => $cliente,'empleado' => $empleado,
'venta' => $venta,
'lineas' => $lineas
));
$hi = "hiii";
//file_put_contents('holajiji.pdf', $pdf);
file_put_contents( 'hi.txt', $hi);
return $pdf;
}
The function generates the txt file correctly but when I try to do the same with the pdf I displayed a lot of other odd characters.
%PDF-1.4 %���� 1 0 obj <> endobj 2 0 obj <> endobj 3 0 obj <> endobj 4 0 obj [] endobj 5 0 obj <> endobj 6 0 obj <> endobj 7 0 obj <> /XObject <> >> /MediaBox [0 0 595 842 ] /Contents [8 0 R ] /Parent 2 0 R >> endobj 8 0 obj <> stream /F1 9 Tf 0 g 0 G q 0.69 0.878 0.9020000000000000 RG 0.69 0.878 0.9020000000000000 rg 39 586 m 93.25 586 l 93.25 570 l 39 570 l 39 586 l h f Q q 1 0.753 0.796 RG 1 0.753 0.796 rg 447.5 586 m 501.75 586 l 501.75 570 l 447.5 570 l 447.5 586 l h f Q q 0.69 0.878 0.9020000000000000 RG 0.69 0.878 0.9020000000000000 rg 501.75 586 m 556 586 l 556 570 l 501.75 570 l 501.75 586 l h f Q q 0.9020000000000000 0.9020000000000000 0.98 RG 0.9020000000000000 0.9020000000000000 0.98 rg 39 432 m 142.4 432 l 142.4 416 l 39 416 l 39 432 l h f Q q 0.9020000000000000 0.9020000000000000 0.98 RG
if open witch text editor the archive generate :
HTTP/1.0 200 OK
Cache-Control: no-cache
Content-Type: text/html; charset=UTF-8
Date: Tue, 06 Nov 2012 12:59:43 GMT
<pdf>
<page document-template="holita.pdf">
<img src="/var/www/Symfony/src/mio/mioBundle/Resources/public/images/optinet.png" float="left" height="100px" width="300px" />
<h1 float="right" text-decoration="underline">Factura Número: 4</h1>
<p><h1 float="right">Fecha: 06/11/2012 </h1></p>
<table text-align="left" margin-bottom="30%">
<tr>
thanks.

Try to output headers to let browser know that you are outputting PDF file:
Header('Content-Type: application/pdf');

solved the problem witch section in github psliwa thanks

Related

Convert document to PDF

I have a stranger document that I don't know which extension it is, and I need to convert it into a PDF, so the idea is to get that content dynamically, then we save it in server as a PDF
My try :
$responce = $this->getDocumentContent();//this function returns me the $responce content bellow.
$documentFolder = $this->getDirectory().'/document/'; //var/www/project/document/
$documentFullPath = $this->getDirectory().'/document/file1.pdf';
$this->_io->mkdir($documentFolder, 0775);//create folder var/www/project/document
$document = fopen($documentFullPath, "w+");//create pdf file var/www/project/document/file1.pdf
fwrite($document, $responce);
fclose($document);
Now with this code, I create well the file1.pdf in var/www/project/document/file1.pdf but it is empty !, there is no content, the file1.pdf weight is not 0 but 163.2 Ko but I see anything. I don't know where is the issue.
$responce =
string(163146) "%PDF-1.4
%????
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
/Metadata 63 0 R
>>
endobj
2 0 obj
<<
/Type /Pages
/Kids [ 01 0 R 8 0 R ]
/Count 2
/MediaBox [ 0 0 618 003 ]
>>
endobj
3 0 obj
<<
/ModDate (D:20190907120701+02'00')
/CreationDate (D:20130904150701+02'00')
/Title (F:/Data/Composer/0510.IN.PDF)
/Subject (NONE)
/Author (User: Windows XP/ User)
/Creator (PDF/PReS Version: 6.1.1 )
/Producer ([ClibPDF Library 2.02-r1-2] Windows XP)
>>
endobj
5 0 obj
<<
/Type /Page
/Parent 2 0 R
/Resources << /Font << /Fcpdf0 30 0 R >> /XObject << /6p 8 0 R >> /ProcSet 7 0 R >>
/MediaBox [ 0 0 595 842 ]
/CropBox [ 0 0 595 842 ]
/Rotate 0
/Contents 6 0 R
>>
endobj
6 0 obj
<< /Length 246 /Filter [ /FlateDecode ] >>
stream
x??QMk?#?'1?bia=?!?L6I7?V??AB??AQ(???_:?T?"$;<vf??7?I??c?(?(?????F??4?E?<L?ku????xs???w*??
??FGD?AlY?{,???E??-A????u?o?/^^O%|??>???\?T?Y
??iS??5q?t?C2I??q???c>?V?z?8:??C??#???p/?\???0F)k#?1???U?`Sa?????.???PyoY
endstream
endobj
7 0 obj
[
/PDF /Text /ImageC
]
endobj
8 0 obj
<< /Type /XObject /BBox [ 0 0 595 842 ] /Filter /FlateDecode /FormType 1
/Length 17871 /Matrix [ 1 0 0 1 0 0 ] /Resources << /ColorSpace << /CS0 27 0 R /CS1 26 0 R /CS10 27 0 R /CS11 26 0 R /CS12 27 0 R /CS13 26 0 R
/CS14 29 0 R /CS15 28 0 R /CS16 29 0 R /CS17 28 0 R /CS18 29 0 R
/CS19 28 0 R /CS2 27 0 R /CS20 29 0 R /CS21 28 0 R /CS22 29 0 R
/CS23 28 0 R /CS24 29 0 R /CS25 28 0 R /CS26 29 0 R /CS27 28 0 R
/CS28 29 0 R /CS29 28 0 R /CS3 26 0 R /CS30 29 0 R /CS31 28 0 R
/CS32 29 0 R /CS33 28 0 R /CS34 29 0 R /CS35 28 0 R /CS36 29 0 R
/CS37 28 0 R /CS4 27 0 R /CS5 26 0 R /CS6 27 0 R /CS7 26 0 R /CS8 27 0 R
/CS9 26 0 R >>
/ExtGState << /GS6 25 0 R >> /Font << /TT24 21 0 R /TT25 17 0 R /TT26 13 0 R /TT27 9 0 R >>
/ProcSet [ /PDF /Text ] >>
/Subtype /Form >>
stream
x??}i?$????K?l2?#?:gu?F??????r$?im?1k???????E???????;?O???=????????????7?????o????oO??????}???O??uz?????z?O????p=M???4n~??w/??;|????OGw>???>???9???cSn'????b????5????????w??\????????_~????t?w8N??9??~?f}??qxy??????o???????M??????'?Or4|?O????|??y??o???=?=
?y?p??1vx?)??7???on????.??w?????-??K??|y:?w}d??????:???>uv??:?.???y???6?nm{????E0\??????n?????B??ra*??x?t?K^???'??7?i?8???]?p?D}??T??-?lcN???_????Q7h??n??s???n==?
??!?
?#~s??F8??G?0?K??e??ul?3n???g??????6?0?a???$??L?j?W??9~U??{?G?U??9fO?????rL?K[Z??E?!????}T|?yr/?}?+?O???6??um????a??E^?K??P??U:??+?pL??N?Q????^\?{a???[??k?N?t/????K{?Ek_???
???t??U#??\O;??????????5??~???????
K??O??9?????</?(?*7????u?n?xa?4??rbd??^N?^z??]?7?T????r?f????|Y?ij?mC'u3???o?4On?r???Kd+
?.??t?6??(?fa+5?$??5?}??,??ZB?Fe??E5W(??.J7??yk1??u?F\?o:^???hK???vNH?]?K???r?????U??H?d?????
X???[e3 7???????qz?K?7c1>?
??o?y??Q????<?8???G4??????^?u?&??&?r???'?o??LN?_?? l??1an+G9&?m?1~?'?e?<?
!??o?-??????J?r???x??`?/o?-??=????y?,????R?0y?? ??.rz|3?GhmS? U?!t????A?Oi????}?6??ct5?i???|?.?&?\??]???2?n?\?<7? ?>?4??"X1M?j??>H??}???iX??~???^?????q?????)
??;2?????'??bS????d???N?/L???K?\n?=n~&F?????fd;m?4?c????Xf??'9?D?s????`4,Mg?f????F??n?~-?????+#l??1??z?N�????l??$??+J?N6? ???}:j8Q?????$L?|C?&???^ch?70??C(?????&??????8B?L.??A??D0]?5?+?)??d?X?>??0C??|?A?&?Z???H??J?0?(m?Rr?Y???*???3?o???{??c?[???E?5 ????q?k??:V;T4?+T??>*B(???|I??}?T??7?N??�?g?W?'??U?'2v`? 4????O?)??x?*r?,?b^7??/3??y(M?Nnnd??i??????:?,?|??EYtx/]?g?!?sgi-{?i<?"????????`??4?[�??h?s*???L?,#??8???G?-(%???=?o/A?????!?????_"??%????_??y???a?%???G4?r?|?M??#z=?~???&v?J?]?<?tQ?
??n?�j?GHh[???&J??!?p?l?b?_w?\ ?#?dXb??a}?l??????S5"D~?5??w??n?.v?C?^?E??;?]????#????a???Z>Tb?;Et U?<?; pl?k???b+?m??`????Is?$3<??6??K?w??
rz???e??i#?5$;-??q4Z"????(_5??E??L?ayv
y?s?M?????R?p?T8?-B?o??i?_?~\??????t??]7a?? K~9!?
?_y.H??8??5z?%?B?w?Vy?}`!h1??? ?v?u?i????????r?&?t?"??%Om??:???a3Y??j?P7?N???(?zu???6I$Z/?"??v^??? mp??/?
h?I?'?V?9'Iexj}?z?t?S?*Y?m3i?J?H??Q???3???dUd?fk???}m????k???!H?%I>??????"???[\|*V??~J??????i-??Z??H??ayb????Ca?i^cP??i???r????????L??4??#??RH???(?Jb??[f??N?1;???&.
???Q???~~???e;?&[? ???0>wRI???s??c%"r???x??n?r}?b??j?h?MO???? q??'?#v$?????g?Xd?h?Pl:?M?\???9B5�?G?j??IE?J?~??????M ??A?<?[???/P7n??Q??0ej?_c?J?u??+J?xl???f?)?0? K?*??W519??uy??r6}?? ?N???s?)?X???????2-?j??b\????M{?f?????E?|?-???x+?zN?f�3?)^k'?qR????zevW?,d?V??????{6!?? ??#j?y?,?BZQ????!?eW???M??
U???D
Q)vWL?N?&??T?q_C?j??#?p??????V????It?.??[??-g<]i?.T�?6%|?W??n?3?x?xx??,???b&?e??Q]???Z?&l"?L???S??N ??F???+W??y??�%??Q-oc????d?S?6???/ ?_??&?t???8p??U??�Z?
?�+^???J???? r ?k??wIB?o?P?Z?]?X???c??6N??I&w?????i"I\??v2Jr?[?(??4?}?q???t?4??!?????B??<o???Q[??Q??A???mG???Q?<???f?P??
?????????Lp1??6F ?L;??J???????/????l?i??u?1??rw?
??c????????G??W??R?o?|?fz EA????JA?Z?
???0?b?EHP?p??7=?]g>d'?mk?3?5M|?E?8?_?T.?,???M?,dnP?L???hs=?;&???????(L?????4_??a?R^?LX??o?v+????7???????(?P??)b??A$?f??#?GF1S??????8b??RM.>?_?!Ab?`?Fs???+?#?HV??iM44?;u<C?????M]H?]?XQ1?f?JG????n1
?R???8?????m?<?}D???)?W3?�??k???T???SI???G??G ?hS*???bD%?=p?f2?SO?K?5??9?^8??$??v??5?7.4k%_???}?Li?h?MHqf?2q?Rj-???,'?k?o?Y_zk?W??
H?QTs>c???fx?g???D|?H?d???V?]96?3?V?1?(????u?e,?B?+ ECl7D???b?C74???l?Bt
The PDF mentions it actually:
/Producer ([ClibPDF Library 2.02-r1-2] Windows XP)
ClibPDF support for PHP was moved into PECL a long time ago (with PHP 5.1). The extension was not object oriented, so here is some additional wrapper around it.
Alternatives are Haru, PDFlib, or one of the available PHP based libraries.

convert stream to PDF

I have a stream document I think and I need to convert it into a PDF.
The idea is to save that stream it in server as a PDF
My code :
$responce = $this->getDocumentContent();//this function returns me the $responce content bellow.
$documentFolder = $this->getDirectory().'/document/'; //var/www/project/document/
$documentFullPath = $this->getDirectory().'/document/file1.pdf';
$this->_io->mkdir($documentFolder, 0775);//create folder var/www/project/document
$document = fopen($documentFullPath, "w+");//create pdf file var/www/project/document/file1.pdf
fwrite($document, $responce);
fclose($document);
Now with this code, I create well the file1.pdf in var/www/project/document/file1.pdf but it is empty !, there is no content, the file1.pdf weight is not 0 but 163.2 Ko but I see anything. I don't know where is the issue.
$responce =
string(163146) "%PDF-1.4
%????
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
/Metadata 63 0 R
>>
endobj
2 0 obj
<<
/Type /Pages
/Kids [ 01 0 R 8 0 R ]
/Count 2
/MediaBox [ 0 0 618 003 ]
>>
endobj
3 0 obj
<<
/ModDate (D:20190907120701+02'00')
/CreationDate (D:20130904150701+02'00')
/Title (F:/Data/Composer/0510.IN.PDF)
/Subject (NONE)
/Author (User: Windows XP/ User)
/Creator (PDF/PReS Version: 6.1.1 )
/Producer ([ClibPDF Library 2.02-r1-2] Windows XP)
>>
endobj
5 0 obj
<<
/Type /Page
/Parent 2 0 R
/Resources << /Font << /Fcpdf0 30 0 R >> /XObject << /6p 8 0 R >> /ProcSet 7 0 R >>
/MediaBox [ 0 0 595 842 ]
/CropBox [ 0 0 595 842 ]
/Rotate 0
/Contents 6 0 R
>>
endobj
6 0 obj
<< /Length 246 /Filter [ /FlateDecode ] >>
stream
x??QMk?#?'1?bia=?!?L6I7?V??AB??AQ(???_:?T?"$;<vf??7?I??c?(?(?????F??4?E?<L?ku????xs???w*??
??FGD?AlY?{,???E??-A????u?o?/^^O%|??>???\?T?Y
??iS??5q?t?C2I??q???c>?V?z?8:??C??#???p/?\???0F)k#?1???U?`Sa?????.???PyoY
endstream
endobj
7 0 obj
[
/PDF /Text /ImageC
]
endobj
8 0 obj
<< /Type /XObject /BBox [ 0 0 595 842 ] /Filter /FlateDecode /FormType 1
/Length 17871 /Matrix [ 1 0 0 1 0 0 ] /Resources << /ColorSpace << /CS0 27 0 R /CS1 26 0 R /CS10 27 0 R /CS11 26 0 R /CS12 27 0 R /CS13 26 0 R
/CS14 29 0 R /CS15 28 0 R /CS16 29 0 R /CS17 28 0 R /CS18 29 0 R
/CS19 28 0 R /CS2 27 0 R /CS20 29 0 R /CS21 28 0 R /CS22 29 0 R
/CS23 28 0 R /CS24 29 0 R /CS25 28 0 R /CS26 29 0 R /CS27 28 0 R
/CS28 29 0 R /CS29 28 0 R /CS3 26 0 R /CS30 29 0 R /CS31 28 0 R
/CS32 29 0 R /CS33 28 0 R /CS34 29 0 R /CS35 28 0 R /CS36 29 0 R
/CS37 28 0 R /CS4 27 0 R /CS5 26 0 R /CS6 27 0 R /CS7 26 0 R /CS8 27 0 R
/CS9 26 0 R >>
/ExtGState << /GS6 25 0 R >> /Font << /TT24 21 0 R /TT25 17 0 R /TT26 13 0 R /TT27 9 0 R >>
/ProcSet [ /PDF /Text ] >>
/Subtype /Form >>
stream
x??}i?$????K?l2?#?:gu?F??????r$?im?1k???????E???????;?O???=????????????7?????o????oO??????}???O??uz?????z?O????p=M???4n~??w/??;|????OGw>???>???9???cSn'????b????5????????w??\????????_~????t?w8N??9??~?f}??qxy??????o???????M??????'?Or4|?O????|??y??o???=?=
?y?p??1vx?)??7???on????.??w?????-??K??|y:?w}d??????:???>uv??:?.???y???6?nm{????E0\??????n?????B??ra*??x?t?K^???'??7?i?8???]?p?D}??T??-?lcN???_????Q7h??n??s???n==?
??!?
?#~s??F8??G?0?K??e??ul?3n???g??????6?0?a???$??L?j?W??9~U??{?G?U??9fO?????rL?K[Z??E?!????}T|?yr/?}?+?O???6??um????a??E^?K??P??U:??+?pL??N?Q????^\?{a???[??k?N?t/????K{?Ek_???
???t??U#??\O;??????????5??~???????
K??O??9?????</?(?*7????u?n?xa?4??rbd??^N?^z??]?7?T????r?f????|Y?ij?
...

fpdf Output('file.pdf','D') download the file but doesn't show it in the browser

I am using FPDF class in php to create pdf file in my webpage but it download the pdf but doesn't show it on the browser or create a garbage.
here is my code
<?php
require('fpdf/fpdf.php');
$pdf =new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output('file.pdf','D');
?>
this code download the pdf file but doesn't show the pdf file in the page
if i change the last line from
$pdf->Output('file.pdf','D'); to $pdf->Output('file.pdf','I');
it output this
%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream x�3R��2�35W(�r Q�w3T04�30PISp �Z*�[����(hx����+����(j*�d��7W endstream endobj 1 0 obj <> endobj 5 0 obj <> endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 5 0 R >> /XObject << >> >> endobj 6 0 obj << /Producer (FPDF 1.7) /CreationDate (D:20150920120751) >> endobj 7 0 obj << /Type /Catalog /Pages 1 0 R >> endobj xref 0 8 0000000000 65535 f 0000000228 00000 n 0000000416 00000 n 0000000009 00000 n 0000000087 00000 n 0000000315 00000 n 0000000520 00000 n 0000000595 00000 n trailer << /Size 8 /Root 7 0 R /Info 6 0 R >> startxref 644 %%EOF
any help
or can you recommend me other method to create pdf file in php
see http://www.fpdf.org/en/doc/output.htm
string Output([string dest [, string name [, boolean isUTF8]]])
so
$pdf->Output('I','file.pdf');
should do it.

Creating PDF Helper for CakePHP 2.0 using TCPDF

I'm currently working on a PDF view for my cake application and found this tutorial.
http://www.startutorial.com/articles/view/how-to-create-pdf-helper-with-tcpdf
But currently I'm struggling over this error message:
Notice (8): Undefined variable: pdf [APP\View\Pdfs\index.ctp, line 2]
Notice (8): Trying to get property of non-object [APP\View\Pdfs\index.ctp, line 2]
Fatal error: Call to a member function addPage() on a non-object in \app\View\Pdfs\index.ctp on line 2
Can anyone help me out, what I have to adapt to CakePHP 2.0
For Cake 2.1, use this code:
<?php
$this->Pdf->core->addPage('', 'USLETTER');
$this->Pdf->core->setFont('helvetica', '', 12);
$this->Pdf->core->cell(30, 0, 'Hello World');
$this->Pdf->core->Output('example_001.pdf', 'D');
?>
When i use "$this->Pdf->core->Output('example_001.pdf', 'D');" pdf file is download fine. But when i use "$this->Pdf->core->Output('example_001.pdf', 'I');" to show in screen, i see:
%PDF-1.7 %���� 7 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20150318050138+01'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 612.000000 792.000000] /CropBox [0.000000 0.000000 612.000000 792.000000] /BleedBox [0.000000 0.000000 612.000000 792.000000] /TrimBox [0.000000 0.000000 612.000000 792.000000] /ArtBox [0.000000 0.000000 612.000000 792.000000] /Contents 8 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 6 0 R ] /PZ 1 >> endobj 8 0 obj <> stream x��SMo�0��W�#�棁� &Nl��I�e�T��2�I���ܢvCtZ�Ȋ��9/֋�f,� �$��zK�#�glb�%���2�=,]��t�uB\�G���#S����l��gO�:3��"*.~��Zr������^�UW���1�s�W�n��]�ϴ�J#�D���2��+�"ux����fsl!���t{��l3lH��'�-�����u�kO> endobj 3 0 obj <> endobj 5 0 obj <> endobj 4 0 obj << /Type /XObject /Subtype /Form /FormType 1 /Filter /FlateDecode /BBox [0.000000 0.000000 612.000000 28.350000] /Matrix [1 0 0 1 0 0] /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F2 5 0 R /F1 3 0 R >> >> /Length 161 >> stream x���?� �w?ō�bՇ���&���[�& �vh�|�>ҿ� �z�����#�T�B8`���Z�3:���[d��Q�:��|K^�2�z�Fp0�M7o���j���D��7*�{�ѯP]��r��o�sV�T�kqϛ���� �$�Ǒ3�#Y>�'��m�2�[� endstream endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 3 0 R /F2 5 0 R >> /XObject << /XT4 4 0 R >> >> endobj 6 0 obj <> /H /I>> endobj 9 0 obj << /Producer (��TCPDF 6.2.6 (tcpdf.org)) /CreationDate (D:20150318050138+01'00') /ModDate (D:20150318050138+01'00') /Trapped /False >> endobj 10 0 obj << /Type /Metadata /Subtype /XML /Length 4223 >> stream application/pdf 2015-03-18T05:01:38+01:00 2015-03-18T05:01:38+01:00 2015-03-18T05:01:38+01:00 TCPDF 6.2.6 (tcpdf.org) uuid:45f4b8fd-7424-3ef2-034a-a956c4a4d4ec uuid:45f4b8fd-7424-3ef2-034a-a956c4a4d4ec http://ns.adobe.com/pdf/1.3/ pdf Adobe PDF Schema http://ns.adobe.com/xap/1.0/mm/ xmpMM XMP Media Management Schema internal UUID based identifier for specific incarnation of a document InstanceID URI aiim.org/pdfa/ns/id/ pdfaid PDF/A ID Schema internal Part of PDF/A standard part Integer internal Amendment of PDF/A standard amd Text internal Conformance level of PDF/A standard conformance Text endstream endobj 11 0 obj << /Type /Catalog /Version /1.7 /Pages 1 0 R /Names << >> /ViewerPreferences << /Direction /L2R >> /PageLayout /SinglePage /PageMode /UseNone /OpenAction [7 0 R /FitH null] /Metadata 10 0 R >> endobj xref 0 12 0000000000 65535 f 0000000832 00000 n 0000001547 00000 n 0000000891 00000 n 0000001108 00000 n 0000000997 00000 n 0000001672 00000 n 0000000015 00000 n 0000000483 00000 n 0000001943 00000 n 0000002140 00000 n 0000006446 00000 n trailer << /Size 12 /Root 11 0 R /Info 9 0 R /ID [ <45f4b8fd74243ef2034aa956c4a4d4ec> <45f4b8fd74243ef2034aa956c4a4d4ec> ] >> startxref 6655 %%EOF

dompdf/PHP is not streaming the PDF, just showing the code in page

I have a little problem with dompdf,
Instead of generating the PDF, the screen just shows the following code:
%PDF-1.6 %���� 1 0 obj [/PDF/ImageB/ImageC/ImageI/Text] endobj 4 0 obj <> stream x����r�0��<���nH"�\�4�&ul:�Ǥ�cB��L��.� ~��!�踶,4�����92#���{�&'\� e����q���/� ���+^�N�����}qW��o�$��8!��Z�4%���A6?��i��Rj��i��S�pp��4� �o�gU�,H���&\2��Y��Қ�Zb��6�$�_v���t��0D�:nw��m��([�0��9�lu8�x�~h�F0�>���t�8��R�!˔T�J ��8���W�w#�P.���-D[0R ��j~B&���D�Ft��pLv1*§�\��Z�ל=�oq#ً��id�n��m�g?����훮"*|���� �1�Y�H˪ ��jU�iZ�Y���l�u �jɨ�b/���nV#�X�ʍo�-�l�N�oҊ#q|�4�[MI��o��=�݌iAS6��Z7M�%�(��Ȍo����P8�<�����Ym��C�X�]�RFTI��T�(7?ˬhrm�,wPk�i�5�Π��"��X�O�w�+,��l�#s�I���;�zk��#�f���,��N2'G����pU�Z�r�&���84T$>O���)��9�:3���o��ǒ� ��C(��n\����T��& �ݓ�:R�����I�'�1����h��o<��7�4�jH�#>�'���Ѩ�X��o,��7���M�;�Pߴ���B7��Ũ�X��o,��7���M��z���'����an�#�� ��HИ�<����F�ʣ�Q���|f�M��ޛ�ٽ7 ����r��%�����X���I��{�:�����5s endstream endobj 5 0 obj 827 endobj 7 0 obj <> stream x����� endstream endobj 8 0 obj 8 endobj 9 0 obj [ 4 0 R 7 0 R] endobj 10 0 obj <<> >> endobj 11 0 obj <> endobj 6 0 obj <> endobj 13 0 obj <> endobj 12 0 obj <> endobj 3 0 obj <> endobj 2 0 obj <> endobj 14 0 obj <> endobj xref 0 15 0000000000 65535 f 0000000015 00000 n 0000003158 00000 n 0000003056 00000 n 0000000063 00000 n 0000000962 00000 n 0000001319 00000 n 0000000981 00000 n 0000001061 00000 n 0000001078 00000 n 0000001108 00000 n 0000001164 00000 n 0000002872 00000 n 0000002487 00000 n 0000003212 00000 n trailer <<709E9FF5C701427DB465865115EFEEE4><709E9FF5C701427DB465865115EFEEE4>] >> startxref 3260 %%EOF
Which I believe is the PDF binary string...
But why is dompdf not generating a PDF to save?
Tkz
Roberto
Try adding headers to your php script (just before you write the pdf stream generated with DOMPDF):
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="myfilename.pdf"');

Categories