pdf-php icon indicating copy to clipboard operation
pdf-php copied to clipboard

$pdf->ezStream() not rendering

Open wesleyysilva opened this issue 3 years ago • 1 comments

Estou testando com o exemplo abaixo mas não renderiza.

   $pdf = new Cezpdf();
    $pdf->isUnicode = true;
    $pdf->ezNewPage();
    $pdf->ezStartPageNumbers(300,500,20,'','',1);
    $pdf->ezNewPage();
    $pdf->ezNewPage();
    $pdf->line(300,400,300,600); // line drawn to check 'pos' is working
    $pdf->ezNewPage();
    $pdf->ezNewPage();
    $pdf->ezNewPage();
    $pdf->ezStopPageNumbers();
    $pdf->ezStream();

Erro apresentado ->

%PDF-1.3 %���� 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [5 0 R 7 0 R 9 0 R 11 0 R 13 0 R 15 0 R 17 0 R ] /Count 7 /Resources << /ProcSet [/PDF/TEXT/ImageB/ImageC/ImageI] /Font << /F1 19 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj << /Creator (R&OS PDF php class) /CreationDate (D:20210721185013-00'00) >> endobj 5 0 obj << /Type /Page /Parent 3 0 R /Contents 6 0 R >> endobj 6 0 obj << /Filter /FlateDecode /Length 8 >> stream x� endstream endobj 7 0 obj << /Type /Page /Parent 3 0 R /Contents 8 0 R >> endobj 8 0 obj << /Filter /FlateDecode /Length 54 >> stream x��r Q060�300P0��!) �n� F@�BH�T�\A�P!?M�LS!$K�5V�Z endstream endobj 9 0 obj << /Type /Page /Parent 3 0 R /Contents 10 0 R >> endobj 10 0 obj << /Filter /FlateDecode /Length 54 >> stream x��r Q060�300P0��!) �n� F@�BH�T�\A�H!?M�LS!$K�5V�[ endstream endobj 11 0 obj << /Type /Page /Parent 3 0 R /Contents 12 0 R >> endobj 12 0 obj << /Filter /FlateDecode /Length 68 >> stream x��260�300P0�ҹ 03(����6��!) �n� F@�BH�T�\A�X!?M�LS!$K�5�V� endstream endobj 13 0 obj << /Type /Page /Parent 3 0 R /Contents 14 0 R >> endobj 14 0 obj << /Filter /FlateDecode /Length 54 >> stream x��r Q060�300P0��!) �n� F@�BH�T�\A�D!?M�LS!$K�5V�] endstream endobj 15 0 obj << /Type /Page /Parent 3 0 R /Contents 16 0 R >> endobj 16 0 obj << /Filter /FlateDecode /Length 54 >> stream x��r Q060�300P0��!) �n� F@�BH�T�\A�T!?M�LS!$K�5V�^ endstream endobj 17 0 obj << /Type /Page /Parent 3 0 R /Contents 18 0 R >> endobj 18 0 obj << /Filter /FlateDecode /Length 8 >> stream x� endstream endobj 19 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj xref 0 20 0000000000 65535 f 0000000015 00000 n 0000000080 00000 n 0000000126 00000 n 0000000347 00000 n 0000000437 00000 n 0000000500 00000 n 0000000578 00000 n 0000000641 00000 n 0000000766 00000 n 0000000830 00000 n 0000000956 00000 n 0000001021 00000 n 0000001161 00000 n 0000001226 00000 n 0000001352 00000 n 0000001417 00000 n 0000001543 00000 n 0000001608 00000 n 0000001687 00000 n trailer << /Size 20 /Root 1 0 R /Info 4 0 R /ID [<7771baae5421129fab0e1abb8a26b3cb><7771baae5421129fab0e1abb8a26b3cb>] >> startxref 1795 %%EOF

Quem puder dar uma luz.

Desde já agradeço.

wesleyysilva avatar Jul 21 '21 18:07 wesleyysilva

It looks like the server on which yo are trying to output the pdf does not properly set the content-type: So the output is "rendered" as text.

can you provide us with detailed info about the headers being set?

ole1986 avatar Aug 23 '21 17:08 ole1986

closing this as stale. also it's not an issue with the library

oradwell avatar Nov 15 '22 22:11 oradwell