Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid PDF when i force content-type: application/pdf #109

Open
PatrickPiroth opened this issue May 13, 2020 · 1 comment
Open

Invalid PDF when i force content-type: application/pdf #109

PatrickPiroth opened this issue May 13, 2020 · 1 comment

Comments

@PatrickPiroth
Copy link

  • PHP 7.2
  • TYPO3 8.7.31
  • web2pdf 1.2.0

Hello,

I am creating a pdf file by html dynamic template and print it on button click. The pdf file is downloaded correctly on PC with Content-Type: text/html. That does not work on Mobile. On IOS, the pdf reade is just displaying code instead of a rendered pdf file. On Android, the download cancels "Server Error" but I dont get any error in the log files.

So i tried to force application/pdf as content-type which causes a successfull download on mobile, but an invalid pdf file.

It seems like application/pdf is cutting the downloaded PDF because the length is much shortner than with text/html.

Length of PDF with application/pdf: 47.953
Length of PDF with text/html: 208.560

@pstranghoener
Copy link
Member

Could you upgrade your ext to 1.2.4 there is mpdf v8 included, maybe its working there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants