mittwald / typo3-web2pdf

A TYPO3 extension for rendering content as PDF
GNU General Public License v2.0
18 stars 20 forks source link

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

Open PatrickPiroth opened 4 years ago

PatrickPiroth commented 4 years ago

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 commented 4 years ago

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