Open sesame!
April 22, 2010 9:01 PM   Subscribe

Calling all ascended computer masters: why won't Foxit open my PDFs?

So, Foxit Reader has been touted as a really fast replacement for Adobe Reader, and for the files it does open, I've found this to be the case.

However, I've some PDFs Foxit just refuses to open. Every time I try, I get this error: "There was an error opening this document. This file is damaged and could not be repaired."

But...trying to open it with Adobe Reader poses no problem whatsoever. What gives?

Here is an example. [30+ MB pdf]

(For what it's worth: I do buy these books too; I've quite a collection. But nothing beats Ctrl+F for finding something in the middle of a game.)
posted by Hakaisha to Computers & Internet (18 answers total) 2 users marked this as a favorite
Do you have an example that's not quite as big a file?
posted by lukemeister at 9:48 PM on April 22, 2010

My copy of Foxit Reader opened this just fine. Version 2.9, build 2923. Try uninstalling and reinstalling a fresh copy of Foxit.
posted by cosmicbandito at 10:01 PM on April 22, 2010

Well, for me neither Adobe nor Foxit will open it; not a valid PDF file.
posted by Hardcore Poser at 10:02 PM on April 22, 2010

Response by poster: Cosmicbandito: this problem has existed for me through several uninstalls/reinstalls of Foxit, so I don't think it's a version problem. (I reinstalled Foxit just before I posted this question, and nope, still stubbornly won't open. Adobe still opens it fine.)

Here is another example, 10 meg file size. I apologize for not having anything smaller than these; I first found this problem when I was surfing through my PDF versions of my RPG collection, and they tend to be image-heavy tomes.
posted by Hakaisha at 10:05 PM on April 22, 2010

Never mind the previous comment - the download hadn't completed successfully. Yes, try a reinstall.
posted by Hardcore Poser at 10:08 PM on April 22, 2010

Has this always been a problem with your Foxit copy? Could be that it doesn't gel with your OS or something... Also they have different units (Reader, Editor, Creator) - so if you have all of those, uninstall the others to see if the reader works as a stand-alone.

With Foxit it's also often an update issue. I've noticed that if it's needs an update, it won't show the text or anything else in the document. 'M not going to download a 30 MB file (bad speeds!) but since someone else has already been able to open it with Foxit: yes, reinstall and update.
posted by mondaygreens at 11:24 PM on April 22, 2010

I just tried it and I also have the same issue with the 10MB file and the latest build of Foxit. Not sure what's up, except that maybe there's something different about these types of (pirated?) files that only Adobe Reader knows how to read. I suggest opening a ticket with Foxit.
posted by tracert at 12:12 AM on April 23, 2010

Is it possible there was a problem downloading the file?

For the 10 megabyte file you linked, I get a CRC32 of 7904DF2D and it opens fine for me in Foxit 2.0 build 0930.

I'm on XP (and running as an administrator).
posted by Mike1024 at 12:19 AM on April 23, 2010

Best answer: This is pretty nasty.

The PDF catalog dictionary contains 2 separate entries for Pages, and the first one is empty. PDF dictionaries shouldn't contain multiple entries for the same key.

Here's the Catalog:

2589 0 obj
/Type /Catalog
/Pages 2588 0 R
/Type /Catalog
/Pages 2587 0 R
/Outlines 2177 0 R
/PageMode /UseOutlines
/Metadata 2244 0 R
/StructTreeRoot 2245 0 R

the first pages entry:

2588 0 obj
/Type /Pages
/Kids [ ]
/Count 0

the second pages entry:

2587 0 obj
/Type /Pages
/Kids [ 46 0 R 890 0 R 1269 0 R 1761 0 R 2010 0 R ]
/Count 162

Here's the producer info:

/Creator (Adobe InDesign CS \(3.0.1\))
/Producer (DeWM 1.0)

This is probably a bug in the producer, but it's possible this was done intentionally to break Foxit. You can fix this by hand if you use a text editor that won't mangle binary data - scintilla will do it.

Search the file for the /Catalog (it should be the same object number as the /Root tag in the trailer at the end of the file) and then replace the first /Pages key with /XXXXX. Be sure to replace characters one for one and not add or delete characters - PDFs have absolute location tables in them.

(and keep a separate copy of the PDF in case you break it!)

If you get stuck, let me know.
posted by and for no one at 4:03 AM on April 23, 2010 [1 favorite]

The SciTE scintilla based editor is here.
posted by and for no one at 4:06 AM on April 23, 2010

Response by poster: Sorry for a late reply; I fell asleep early.

I use Windows Vista Home Edition on a laptop (I can upload specs, but I don't think that's too relevant here), of which I am also sole user and administrator. Also, I'm quite sure it's not due to an incomplete download or something, because I uploaded the files onto Sendspace myself; all these problem files are files I already have. So the notion of some people's Foxit (slightly older than mine) being able to open these while mine, at the latest build/update (3.2.10401) can't, and several previous versions also can't, is...puzzling.

and for no one, I'll give your solution a shot.

(FYI: I found a few more examples that are closer to the 10 mb than the 30 mb range--sorry! That was the first one I grabbed. If anyone else needs examples, let me know.)
posted by Hakaisha at 7:21 AM on April 23, 2010

Response by poster: Also, I've only ever had Foxit Reader as a standalone; I don't use anything else in the suite.
posted by Hakaisha at 7:23 AM on April 23, 2010

You might want to try Sumatra PDF as another fast PDF reader. It's based on the MuPDF rendering engine. It's pretty good, but unfortunately I found it didn't open some PDFs correctly; missing elements.
posted by Nelson at 7:36 AM on April 23, 2010

Response by poster: and for no one, I think I'll need a bit more hand-holding to try out your set of instructions. I'm not much of a techy person at all.

I downloaded the SciTE executable zip file, opened SciTE, and ran the pdf through it and got...a bunch of really long, garbed stuff and what looks kinda like your posted stuff scattered throughout. Where do I find /Catalog, /Root, and all that stuff?
posted by Hakaisha at 8:32 AM on April 23, 2010

Best answer: Yep, it's gonna look really weird in SciTE. PDFs have lots of binary data.

Use the Search/Find... menu option (Ctrl-F) and type in "/Catalog", it should jump
right to the spot. Arbitrary PDF files might have more than one, but the last one is probably the right one. Turn off the wrap around option in the Find... dialog and Search/Find Next until it stops.

Once you're looking at the Catalog dictionary, replace the first /Pages key with something arbitrary like /XXXXX that's *exactly* 5 characters long, and don't add or delete any spaces or anything. Then save the file and it should open.

If you still have trouble I can look at a way of automating this for you. Good luck.
posted by and for no one at 11:04 AM on April 23, 2010

Response by poster: Brilliant! It worked!!

Out of curiosity, and for no one, would you know why some people (above thread) seem to be able to open the documents on older versions of Foxit? Something to do with the OS or something else?

I run Windows Vista, but there seems to be at least one incident where Windows XP and Foxit 2.9 did the job.
posted by Hakaisha at 11:24 AM on April 23, 2010

Any ability to open or not open these PDFs is quite specific to the reader software (and even version of). The parser can assume the first key is the right key, or it can just read the keys in order and set and reset them again without even thinking about it. That's most likely what Acrobat does.
posted by and for no one at 11:30 AM on April 23, 2010

Response by poster: Ah, okay. Thanks again for the help! Metafilter is the best. =)
posted by Hakaisha at 2:11 PM on April 23, 2010

« Older I hate dancing. My friends hate that I hate...   |   I miss the sound of your voice and I miss the rush... Newer »
This thread is closed to new comments.