1

I have used PDF Press to generate PDFs from data but somehow generated output is rendered ad text/html not PDF which looks like

%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 [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R >> >> /MediaBox [0.000 0.000 612.000 792.000] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Creator (DOMPDF) /CreationDate (D:20140206173022-05'00') /ModDate (D:20140206173022-05'00') >> endobj 6 0 obj << /Type /Page /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Length 74 >> stream 0.000 0.000 0.000 rg BT 34.016 746.579 Td /F1 12.0 Tf [(test 123)] TJ ET endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding >> endobj xref 0 9 0000000000 65535 f 0000000008 00000 n 0000000073 00000 n 0000000119 00000 n 0000000273 00000 n 0000000302 00000 n 0000000416 00000 n 0000000479 00000 n 0000000603 00000 n trailer << /Size 9 /Root 1 0 R /Info 5 0 R >> startxref 712 %%EOF

I have try to use that plugin http://devot-ee.com/add-ons/http-header but I'm getting same result.

With another test I have run from same hosting simple PHP code to generate PDF using FPDF and I'm able to render PDF.

I don't think this is a Virtuamin or Apache issue - neither would be forcing the HTTP header. More likely the header is being set twice in the script, perhaps once to the default of text/html and then again by add-on to application/pdf and EE force to use text/html

Any clue what can be wrong?

Thanks

1

Issue related to DOMPDF library used by PDF Press.

I have modified third_party/pdf_press/dompdf/dompdf_config.custom.inc.php file based on third_party/pdf_press/dompdf_config.custom.inc.php file. Other way wasn’t working (probably something wrong with absolute path).

Fix above resolved issue with generating PDFs for downloading or open by a browser but not in the PDF Press preview mode.

More on that topic here: http://devot-ee.com/add-ons/support/pdf-press/viewthread/12549/P15

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.