Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iPagan

macrumors regular
Original poster
May 31, 2010
190
1
I downloaded some Chinese books in PDF format from the net. On my MBP, they displayed without any problem, but not in GoodReader or iBooks on my iPad. They showed up as blank pages! Per the Troubleshooting tips in GoodReader's Help file, it turns out that these PDF files are encoded with JPEG 2000 image compression. Since the current iOS does not support this compression method, and GoodReader and iBooks rely on iOS's processing of PDF's, neither app is able to display the PDF documents encoded with JPEG 2000 on the iPad! I followed GoodReader's suggestion to have saved a separate copy of the same PDF document on my Mac. While this copy correctly displayed on my iPad in both GoodReader and iBooks, the file size ballooned from 3.8MB of the original file to 138MB!!! That's over 30 fold increase in size!!! Acceptable???

So the question is: when is iOS going to support PDF documents that are encoded with JPEG 2000 compression method? And why isn't it now???

Please note: I am not someone who posts a lot. It's just that the problem is annoying. I read PDF books a lot, and some of them are encoded with the JPEG 2000 image compression method. Can you imagine carrying 100 plus MB per file on your iPad, whilst its original size is merely a few MB's?
 
Last edited:
Well, from googling around, it appears that this is a known issue (JPEG2000-encoded images in a PDF not showing up) with iOS, however there is no consensus as to the ideal solution just yet. There apparently are a few other iOS PDF reader apps that support JPEG2000-encoded images, but I happen to like GoodReader and wanted to find a way to work around the issue. As noted earlier, the suggested method of using OSX's Preview.app to re-save the PDF isn't ideal as it often results in massive filesize inflation.

Still, I think I have a solution that doesn't cause this problem. It does, however, involve being comfortable with installing and using apps from the command-line (i.e. a shell).

In a nutshell, install the Ghostscript package by downloading and building from source (or using something like macports if you're on OSX) or looking for a pre-compiled package installer.

Once you have it successfully installed, use the cmd-line version (for Windows the command will probably be something like 'gswin32c' or 'gswin64c' instead of 'gsc') to convert the problematic 'original.pdf' file to 'converted.pdf', which should then work fine in GoodReader:

gsc -dNOPAUSE -dPDFSETTINGS=/ebook -sDEVICE=pdfwrite -sOutputFile=converted.pdf original.pdf

[Please note that the ordering of the command-line options is significant]

I haven't tested this method extensively, but it appears to work on the few ebooks I have that exhibited the problem. Also keep in mind that the images in the PDF are being re-compressed from one lossy format to another, so there may be some image degradation. In my case, I found the results to be acceptable, but ymmv.

Hope this helps.
 
I have a set of 75 PDF files with this problem. Re-saving with Preview on my Mac works fine, but is a daunting task for the remaining 74 files. Is there a simple way to batch process these?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.