salut ayant fais d'autre recherche j'ai pu avancé pour la génération d'une vue en pdf en utilisant html2pdf,
voila ayant mis dans mis dans le vendor le repertoire html2pdf, j'ai créer un controlleur Invoices donc voici le code de l'action:
et le fichier app/vew/Invoices/pdf.ctp.
dans ma vue j'ai le lien suivant pour imprimer:
mais lorsque je clique sur le lien j'ai un résultat incohéren illisible l'information est bien généré mais encodé comment rendre
les données lisible? voici le résultat:
%PDF-1.7 3 0 obj <> /Resources 2 0 R /Annots [ 200001 0 R ] /Contents 4 0 R>> endobj 4 0 obj <> stream x���OO�0����M=������� �D��� �A��o��d85��6}�<��iZ��` �>���qǏ�8w8�IH{�12'x����uNA���G[S�� s�ś�b� � ��"c���.��8{�O/S��hU�by_ϳ�\�jt�w0�%���5�(��%V3l3�oI�5�6��Ǿ����m� ����^(&mf�����틻v�7����45L:B�(�����1�O�T�MZ���Z��v 1�Jv��=��� endstream endobj 1 0 obj <> endobj 5 0 obj << /Type /OCG /Name (��print) /Usage << /Print <> /View <> >> >> endobj 6 0 obj << /Type /OCG /Name (��view) /Usage << /Print <> /View <> >> >> endobj 7 0 obj <> endobj 8 0 obj <> endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 7 0 R /F2 8 0 R >> /XObject << >> /Properties <> /ExtGState << >> >> endobj 200001 0 obj <> /H /I>> endobj 9 0 obj << /Creator (��HTML2PDF - TCPDF) /Producer (��TCPDF 5.0.002 (http://www.tcpdf.org) (TCPDF)) /CreationDate (D:20150816230008+00'00') /ModDate (D:20150816230008+00'00') >> endobj 10 0 obj << /Type /Catalog /Pages 1 0 R /OpenAction [3 0 R /Fit] /PageLayout /SinglePage /PageMode /UseNone /Names << >> /ViewerPreferences << /Direction /L2R >> /OCProperties <> <>]>>>> >> endobj xref 0 11 0000000000 65535 f 0000000537 00000 n 0000001050 00000 n 0000000009 00000 n 0000000198 00000 n 0000000597 00000 n 0000000716 00000 n 0000000833 00000 n 0000000939 00000 n 0000001478 00000 n 0000001727 00000 n 200001 1 0000001219 00000 n trailer << /Size 11 /Root 10 0 R /Info 9 0 R >> startxref 2087 %%EOF