Solution to Traveller PDFs not showing images in PDFKit based renderers (macOS and iOS)

@Timolution

Thank you for the app recommendations. I like PDF Pro that I think I may buy the subscription. PDF Viewer seems to work OK on MacOS. I haven't tried to print with it yet.
 
@apastuszak You're welcome. Despite being a staunch GoodReader user, I do like PDF Pro a lot as it tends to be faster in rendering complex layered PDFs (and of coursee allowing me to enjoy MGT2 PDFs in all their graphical glory). Unless you need annotations/notes and PDF editing/form filling support the free version is actually quite complete as a reader. And in any way, even with a subscription (wished they offered a one-time buy option, but alas) it is still ludicrously more cheap than splurging for Acrobat Pro (which is overkill anyway if you only want to read and annotate).

Unfortunately printing on iOS or macOS will remain an issue, as generally applications need to hand off these duties to the system printing framework which uses (as you can guess) the native PDF rendering framework and thus does not render the images... As a workaround it's better that you rasterise the PDF (transform all pages to images) using ghostscript or imagemagick, and then print the rasterised version.
 
I loved GoodReader. But it uses the native PDF renderer.

I guess I'll need to use PDF Pro for a little while to see if I need those features.

One problem with all these apps stores is there is no way for a developer to charge you for an upgrade. Buy an app, and it's free to you forever. So, a lot of developers now charge a subscription because they can't keep developing an app for free. I get that. And, if a developer actually updates an app regularly, then I will pay a reasonable price for a subscription. But there are way too many apps, with a subscription price of $9.99 a month that have not had an update in close to a year.
 
I do read in a different application, but quickly scrolling through the PDF in the native PDF reader on macOS after buying there did initially not seem to be any missing images this time.

Putting the PDF side by side in the native reader and one using a different renderer I do however notice that the small planet pictures in the sector maps are missing (confirmed by raw image extraction that these are CMYK referencing JPEG2000s). But to be honest that is such a minor issue imo, and I am more than happy to report that the rest of the beautiful art in the PDF is now actually showing.

View attachment 1306View attachment 1307
Native macOS/iOS renderer
3rd Party PSPDFkit Renderer
Can you check this same page in MacOS Sonoma? I wonder if Apple fixed this now that we have newer versions of MacOS and iOS.
 
I think Apple fixed this. I opened up Core Rules 2022 Update on MacOS Sonoma and I am not seeing any missing images. I'll try the iPad out tonight and report back.
 
On the phone with Apple support now. With any luck, they'll open a ticket and let me submit a PDF to them for review. If we can get this fixed at the source (Apple) that's a better solution that Mongoose fixing it. Better to fix is globally than have to deal with each PDF publisher having to deal with this.
 
Wow, that support call was an experience. I work in IT, so by the time I call in, I've done everything that level 1 support is going to ask me to do.

I had to reboot my computer in safe mode after explaining the issue and how it affects multiple Apple devices. When that still didn't work, she wanted me to wipe my computer and reinstall MacOS.

At that point, I put my foot down and told her I want to speak to Level 2 support. The level 2 guy was kind of at a loss what to do. I told him to open an incident with the PDFKit development team, include a link to this thread and let me send you a PDF you can attach to the ticket.

He put me on hold and came back about 5 minutes later and said that this is a known issue and they have a bug open for it.

Hopefully, this will get fixed one day…

I know there are other PDF readers I can use. But it's so convenient to just dump a bunch of PDFS into Apple Books on my Mac and have them magically show up on my iPad.

Call Apple and open an incident. It will help raise the higher on the stack of things to fix.
 
I found another solution.

This requires that you install homebrew (https://brew.sh). Once you install Homebrew, you install the package Poppler.

Bash:
 brew install poppler

The from the command line, you run:

Bash:
pdftocairo -pdf mongoose_pdf.pdf mongoose_pdf_repaired.pdf

For the Mongoose files I tried, this seemed to fix all my missing images. And the fixed images still had proper transparency. It did, however, double the file size.

I've done 3 different PDFs so far, and they look OK.

EDIT: Original source: https://superuser.com/questions/278562/how-can-i-fix-repair-a-corrupted-pdf-file
 
Many thanks to @Timolution and @apastuszak for all of your investigation into this. Thanks to you I can use the poppler tools to make an easy conversion of the problematic files. This has been nagging at the back of my mind for some time and it's rather made my day to have a fix and learn a bit more about the underlying causes too.

UPDF is also worth consideration when looking at PDF editors on macs, I like it very much.
 
I don’t really need a PDF editor. Just a reader that lets me maintain a library. That was the appeal of the Books app. It synced across all my Apple devices and maintained my reading position and bookmarks.

A lot of these other apps are for PDF editing and have subscription. I don’t need the editor. With the Poppler solution, I can use Books or Goodreader again.

I have to assume Poppler is doing some kind of image conversion, which is what is “fixing” the PDFs. And that’s causing the increase in file size. Worth it to get the image issue fixed.
 
Do you have an example of such an image? Keen to see if it's something I'd notice. (If it's a 2nd edition title, I have it.)
Sorry, I don’t. One of threads on this forum said the Ghostscript solution can cause some images to lose their background transparency. I was just reporting that, for the file I tried, this has caused no loss in background transparency.

If someone has a concrete example, and would like to confirm by testing of giving me the PDF to test, I'll be happy to report back.

I want to do some homework and see what exactly pdftocairo does.

Supposedly this solution and can also "fix" a PDF that certain PDF readers won't open, because they say it's corrupt.
 
Pdftocairo worked well for me, only it killed the bookmarks and hyperlinks. And then I ran it through a PDF compressor. PDF Expert to be precise. Will have to look at some of the PDFs I had issues with and re-mux and compress them and see how important the bookmarks are..

The Deep and the Dark released a revision last week and it did not have the issue on the graphic I noticed previously, the axe on page 6. If I ran it through the GS commend, the axe image still got transparency issues. I don't know for certain if it was fixed by Mongoose or Sonoma which I recently upgraded to.

Is there a list of known problem PDFs at this point or some such? I've seen the problem on

The Deep and the
The Trailing Frontier
Rim Expeditions
High Guard Update 2022

!
 
Depends. It gives you four quality levels to choose from, Low, Medium, High and uncompressed.

Using The Deep and the Dark as an example. The original Mongoose PDF from this month is 64.4 MB. The medium compression with PDF Expert on the original is 50.1 MB. Running pdftocairo on the original PDF gives a size of 235.2 MB. The High quality compression yields 32.6 MB and Medium quality yields 32.9 MB for some reason.

The original, fixed and then compressed numbers for The Trailing Frontier are 34.3 MB, 68.9 MB and 13.5 MB at Medium quality.

The Original, fixed and then compressed numbers for Rim Expeditions are 40.7 MB, 63.4MB and 16.6 MB at High Quality.

So choosing Medium or High yields 40-50% of the original PDF size. At these compressions, I don't see significant artifacting but I am a poor judge of that.

I purchased PDF Expert as I use screen readers and it has a decent dark mode/inverted color space reader. Still based on Apple's PDFKit, though. It also deals with encrypted and watermarked PDFs that helps me with screen readers that I won't go into. But I've moved to buying direct from Mongoose and avoiding that issue entirely.

I think I am going to stick with the Ghostscript method as that preserves hyperlinks in the PDF at the expense of transparency issues. I'm glad Mongoose seems to be fixing some of the issues in the PDFs now as they render updates. Until Apple deals with PDFKit, I guess this is where it leaves us.

!
 
Back
Top