Title: Damaged PDF files
Last modified: August 21, 2016

---

# Damaged PDF files

 *  Resolved [mattyd247](https://wordpress.org/support/users/mattyd247/)
 * (@mattyd247)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/)
 * The PDF files that are generated are always ‘damaged’ and cannot be opened. The
   cached versions of the files are fine though.
 * I’ve tried everything such as setting all folder permissions to 777 etc.
 * Any help would be really appreciated.
 * [http://wordpress.org/plugins/wp-mpdf/](http://wordpress.org/plugins/wp-mpdf/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138436)
 * Is the first file request fine (Before it get’s cached)? Try to rename the downloaded
   PDF to .txt and open it with a text editor. This may give us some hints whats
   going wrong.
 *  Thread Starter [mattyd247](https://wordpress.org/support/users/mattyd247/)
 * (@mattyd247)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138570)
 * I can’t seem to get any of them to open without being damaged. The cached files
   are fine though.
 * I’ve managed to open the file in a text editor but as expected, it’s displaying
   a lot of strange characters without giving away many clues.
 * Thanks for your input so far though, it’s really appreciated.
 * Any ideas as to what I can try next?
 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138571)
 * No don’t open the cache file. Try to open the downloaded file with a text editor.
 *  Thread Starter [mattyd247](https://wordpress.org/support/users/mattyd247/)
 * (@mattyd247)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138572)
 * I did open the downloaded file and the cached file and they both look very similar.
 * Here is where: [http://new.devon.gov.uk/pdftest/sample-page/](http://new.devon.gov.uk/pdftest/sample-page/)
 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138574)
 * Hmm that’s very strange. If the cache file works it could only be a problem by
   your Webserver which is cutting off the data transfer.
 *  Thread Starter [mattyd247](https://wordpress.org/support/users/mattyd247/)
 * (@mattyd247)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138575)
 * Could it be the version of PHP (5.3.26) or missing extensions?
 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138577)
 * No. If the cache file is generated and the cache file itself is a correct PDF
   it shouldn’t be a php version or extension issue. Maybe you find some hints in
   you Webserver or php log file?
 *  Thread Starter [mattyd247](https://wordpress.org/support/users/mattyd247/)
 * (@mattyd247)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138597)
 * It appears that the script is failing at 57,703 bytes.
 * Is there anything that can be altered to overcome this?
 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138598)
 * It looks like it is an issue with your web server config not a plugin related
   issue. I can’t help you with your web server config. Sorry.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Damaged PDF files’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mpdf.svg)
 * [wp-mpdf](https://wordpress.org/plugins/wp-mpdf/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mpdf/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mpdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mpdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mpdf/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/damaged-pdf-files/#post-4138598)
 * Status: resolved