cancel
Showing results for 
Search instead for 
Did you mean: 

Firefox PDF viewer (plugin) corrupts files upon download

SOLVED
Highlighted
New User

Firefox PDF viewer (plugin) corrupts files upon download

This is a bug report. We have found that PDF files opened in the Firefox built-in viewer (plug-in) can become corrupted when downloaded using the 'Download' icon on the upper right-hand corner of the screen. When we attempt to open one of these damaged files using Acrobat, this error message is displayed:

'There was an error opening this document. The file is damaged and could not be repaired.'

If we instead download the file by right-clicking in the viewer plug-in and select 'Save Page As...' the file is downloaded undamaged.

One example where this behavior occurred is with the the file labeled: Butterfish Fishery Information Document on the page:

http://www.mafmc.org/ssc-meetings/2013/april-may

1 ACCEPTED SOLUTION

Accepted Solutions
Site Moderator

Re: Firefox PDF viewer (plugin) corrupts files upon download

hello ClayH, a fix for this issue should arrive in firefox 26. in the meantime you could also install the current development version of the pdf viewer, which is available as addon from http://mozilla.github.io/pdf.js/extensions/firefox/pdf.js.xpi and which should already contain the bugfix.

7 REPLIES
Site Moderator

Re: Firefox PDF viewer (plugin) corrupts files upon download

hello ClayH, a fix for this issue should arrive in firefox 26. in the meantime you could also install the current development version of the pdf viewer, which is available as addon from http://mozilla.github.io/pdf.js/extensions/firefox/pdf.js.xpi and which should already contain the bugfix.

New User

Re: Firefox PDF viewer (plugin) corrupts files upon download

Philipp - I installed the development version of the viewer and that seems to have corrected the problem. Thanks very much!

Mozilla Support Contributor

Re: Firefox PDF viewer (plugin) corrupts files upon download

Someone should agitate for uplifting the fix to Firefox 25. I've probably saved dozens of PDFs this way, some of which may be dynamically generated during a transaction and now unrecoverable. !!

Note: I'm aware of one such unrecoverable corrupted file so far, because I forwarded it to someone for uploading into a document management system and they send the error message back to me. How many were not reported back to me? Hmmm...

New User

Re: Firefox PDF viewer (plugin) corrupts files upon download

I've noticed this problem on FF 24.0. There appears to be a lot of null bytes appended to the end of the document. If you remove all the null bytes after the end of file marker the document will open in Adobe's Acrobat without error. I'm not suggest users do that, just pointing it out.

Thanks for the fix though. It will be much appreciated in our office.

New User

Re: Firefox PDF viewer (plugin) corrupts files upon download

I tried this fix and it works as expected.

Thanks for the fix
Bimal

New User

Re: Firefox PDF viewer (plugin) corrupts files upon download

Hello,

Came to this post after finding this issue still exists in FF 26. Installing the current development version of the pdf viewer worked as well, but will this fix make it into the main branch?

Thanks, Joe

Site Moderator

Re: Firefox PDF viewer (plugin) corrupts files upon download

hello joe, i made the reference to firefox 26 back then because of the information in this thread: https://github.com/mozilla/pdf.js/pull/3634
i haven't followed the developments since, so i'm not sure if the aforementioned fix has already landed in the released firefox version or if it may be a separate issue that you're observing.