PDFs will load slowly due to various reasons. A big size will take longer to download, improper encoding will disable various loading feature. We have pointed out some of the major issues that can be resolved to make loading faster.
1. Remove gZip for PDF #
Pdfs are readily compressed while exporting so extra compression won’t make any benefit. By default, the plugin supports partial loading inbuilt. but for that, you need to make sure partial loading is not disabled. Normally, as default, partial loading is supported out of the box. But, in cases where gzip is enabled for PDF then the partial loading won’t work.
Disable gzip for PDF in .htaccess file. #
<IfModule mod_headers.c> <FilesMatch ".pdf$"> RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=no-brotli:1,E=dont-vary:1] </FilesMatch> </IfModule>
Further Reading at StackOverFlow https://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file
How to check gZip status for a file? #
You can use the link to your PDF and enter that at https://www.giftofspeed.com/gzip-test/ to test the gZip status of a file.
2. Make PDF optimized for web purpose: #
Make sure your PDF is Web optimized. PDFs are normally exported for printing and are of high quality, around 300-600dpi, which a printer requires. But for reading purposes on-screen 72-100dpi is enough. 50MB for 10 pages is not good for web use. Optimize the PDF and make per page average as max as 500KB or less. Maybe this can be useful: https://www.iskysoft.com/edit-pdf/optimize-pdf-mac.html
https://sourceforge.net/projects/workerpdf/