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
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