X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

Firefox PDF viewer (plugin) corrupts files upon download

Posted

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

Chosen solution

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.

Read this answer in context 10

Additional System Details

Installed Plug-ins

  • Next Generation Java Plug-in 10.40.2 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Shockwave Flash 11.8 r800
  • Adobe PDF Plug-In For Firefox and Netscape 11.0.04
  • Adobe PDF Plug-In For Firefox and Netscape 10.1.8
  • Google Update
  • 5.1.20513.0
  • Citrix Online App Detector Plugin
  • ActiveTouch General Plugin Container Version 105
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • Office Authorization plug-in for NPAPI browsers

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0

More Information

philipp
  • Top 10 Contributor
  • Moderator
2046 solutions 8901 answers

Chosen Solution

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.

Question owner

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

jscher2000
  • Top 10 Contributor
2365 solutions 20926 answers

Helpful Reply

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

Modified by jscher2000

tomred 0 solutions 1 answers

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.

BimalKm 0 solutions 1 answers

I tried this fix and it works as expected.

Thanks for the fix
Bimal

Modified by BimalKm

jersinghaus 0 solutions 1 answers

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

philipp
  • Top 10 Contributor
  • Moderator
2046 solutions 8901 answers

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.