PDF download issue
-
Almost 2 years on and my previous post (closed) is still an issue that others must be facing.
The line numbers in question are now 944,945 and 948// Fix https://www.ads-software.com/support/topic/problems-with-image-files // Turn off output buffering to decrease cpu usage //@ob_end_clean(); //@ob_clean(); // required for IE, otherwise Content-Disposition may be ignored //if (ini_get('zlib.output_compression')) ini_set('zlib.output_compression', 'Off');
There seems to be a conflict with caching plugins, I think this might relate to gzip compression.
PDF files are “corrupted” on download, but if you change the file extension to .pdf.gzip and open them with 7Zip the PDF file inside is viewable.
I specifically use Litespeed plugin as I have a Litespeed server, but I think the issue will be similar for others such as WP Rocket and Total Cache since they all force gzip compression.
For me commenting out these lines made everything play nice together
/src/php/core-addons/private-file/private-file-default-handlers.class.php 941,942 and 945
https://www.ads-software.com/support/topic/pdf-download-issue-2/
- The topic ‘PDF download issue’ is closed to new replies.