Skip to content

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

@PatrickPiroth

Description

@PatrickPiroth
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions