Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 04-24-2015, 01:58 PM   #1
kedarhandal
Junior Member
kedarhandal began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2015
Device: Kindle Voyage
Thumbs up PDF file is damaged

Hello,

When PDF files are downloaded, the user receives the following error:

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

This error occurs with older versions of Adobe Acrobat Reader (tested and failed on 6.0, 7.0). The code I am using is pasted below and is a collaboration of research I've done on EE and google.

Note: The file that is streamed to the user has a higher file size than the actual file. You can see below I have tried using different headers, pdf and octet-stream.

We must maintain the ability of allowing the client to download the pdf file rather than it opening in the browser.

Any help is appreciated.

Thanks.
kedarhandal is offline   Reply With Quote
Old 04-24-2015, 03:27 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I see no code...

If you upload a file to a server and the copy that people download has a different file size, I'd say your server is broken and is mangling the files.
eschwartz is offline   Reply With Quote
Advert
Old 04-25-2015, 05:04 PM   #3
kasparbednorz
Junior Member
kasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy bluekasparbednorz can differentiate black from dark navy blue
 
Posts: 1
Karma: 13136
Join Date: Apr 2015
Device: Kindle Paperwhite
Thumbs up

Apply next steps...

< Navigate to the location with the corrupted PDF file. Right-click on it and select "Rename." Type any other file name and hit "Enter." Sometimes, a simple rename can troubleshoot corrupt PDFs.
< Make sure your Adobe Reader is in working condition. Open any other PDF files on your hard drive to make sure the problem is not originating from your Adobe Reader. If it does, reinstall Reader from Adobe's website for free.
< Update Adobe Reader. Launch Adobe Reader from the Start menu under "All Programs." Click on the "Help" tab and select "Check for Updates..." Follow the on-screen prompts to complete installing the updates. Try re-opening the PDF file.

Helpful resource, which might be effective to know more about different resolutions...

http://www.filerepairforum.com/forum...t-opening-file - community where local user would suggest you a proper solution
https://pdf.recoverytoolbox.com/ Recovery Toolbox for PDF - apply this third party software if any solutions couldn’t help
kasparbednorz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Damaged file - Zip Unzip Bill in NorCal ePub 2 04-17-2015 06:07 AM
Invalid Zip file - local header is damaged Francois Driesen Conversion 3 09-18-2014 06:07 AM
Damaged file? BeccaPrice Calibre 0 01-25-2013 07:38 PM
My metadata.calibre file is damaged on my kobo Hendrik Boom Kobo Reader 2 07-15-2011 01:30 PM
Android How to open PDF file directly in ES File Explorer? thinredline enTourage eDGe 4 06-26-2011 03:10 PM


All times are GMT -4. The time now is 08:37 PM.


MobileRead.com is a privately owned, operated and funded community.