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 <simonsteiner1...@gmail.com>
Sent: 16 August 2022 10:55
To: fop-users@xmlgraphics.apache.org
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 
<mark.gib...@staff.bluematrix.com<mailto:mark.gib...@staff.bluematrix.com>>
Sent: 15 August 2022 18:18
To: fop-users@xmlgraphics.apache.org<mailto:fop-users@xmlgraphics.apache.org>
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

Reply via email to