RE: Corrupt font display on iOS when using PDF-Images with merge-fonts=true

Mark Gibson <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <DM5PR04MB05388CA9E260428A63E1A93FDD6B9@DM5PR04MB0538.namprd04.prod.outlook.com>
Thanks Simon

https://issues.apache.org/jira/browse/FOP-3089

Viewing in Windows browsers is fine
Viewing in iOS browsers is corrupt
Viewing in Adobe app on iOS and windows is fine
Apologies, no access to Linux devices to test viewing

Same issue occurs when running FOP 2.7 on Linux (CentOS) and Windows (10)

Thanks
Mark

From: Simon Steiner <[email protected]>
Sent: 16 August 2022 10:55
To: [email protected]
Subject: RE: Corrupt font display on iOS when using PDF-Images with merge-fonts=true

[EXTERNAL]
Hi,

Can you open a bug on jira, can you replicate on windows or linux pdf viewers?

Thanks

From: Mark Gibson <[email protected]<mailto:[email protected]>>
Sent: 15 August 2022 18:18
To: [email protected]<mailto:[email protected]>
Subject: Corrupt font display on iOS when using PDF-Images with merge-fonts=true

Hi

We have an issue when using PDF-Images plugin to inject a PDF as an image.  All PDFs are rendered with fonts embedded.

When we set merge-fonts config to false, the rendered PDF displays fine in all tested viewers
However, when we set merge-fonts config to true, the rendered PDF is corrupt when viewed in-browser on IOS devices (currently tested browsers include Safari, Chrome, and DuckDuckGo, latest IOS and browsers).  Strangely, when viewed in Adobe iOS app, the PDF is displayed fine.

The corruption is in the font display, making embedded textual tables unreadable.

I don't know enough about PDF + fonts + viewers to be able to figure out if there's a universal iOS PDF in-browser viewer error, or whether the merge-fonts process somehow corrupts the resultant PDF (in a weird way that means some viewers work, whilst some don't)

Adobe Acrobat Pro DC file comparison shows zero differences between the two rendered PDFs.

I've attempted to attach a zip containing the fo, embedded pdf, two fop configs, and the two fonts in use.  Hopefully it won't be stripped

Commands to render the two PDFs are as follows (run from the root directory of the attached archive):


  *   .../fop.bat -fo pdf-images.fo -c fop.xml -pdf pdf-images.pdf
  *   .../fop.bat -fo pdf-images.fo -c fop-mergefonts.xml -pdf pdf-images-mergefonts.pdf

Hopefully someone will at least be able to give some direction for this.  The merge-fonts config is a game changer for us as it massively shrinks the size of many of the PDFs we render.

Thanks
Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.