Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-3089

Corrupt font display in iOS when using PDF-Images with merge-fonts=true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8
    • None
    • None
    • Both Windows and Linux (CentOS)

    Description

      Using PDF-Images to inject a PDF as an image (fo:external-graphic).  When setting merge-fonts=true in fop config,  there are visual issues with the fonts in the embedded image when viewing the rendered PDF on in-browser viewers on iOS.

      All tests have been carried out using FOP 2.7.  When merge-fonts=false, the PDF displays fine in all known browsers.

      Tested viewing on latest iPadOS 15.6, and iOS 15.6, latest browser versions for Safari, Chrome, and DuckDuckGo.

      Viewing the rendered PDF on windows browsers, the PDF displays fine.  Ironically, when viewing the PDF on the Adobe Acrobat app for iOS, it displays fine.  Apologies, I don't have access to Linux to test browsers there.

      I've attached some files for reproduction:

      • pdf-images.fo
      • image1.pdf - image being embedded
      • fop.xml - fop config with merge-fonts=false
      • fop-mergefonts.xml - fop config with merge-fonts=true
      • pdf-images.pdf - PDF rendered with merge-fonts=false
      • pdf-images-mergefonts.pdf - PDF rendered with merge-fonts=true

      I also attached a screenshot of the two PDFs as viewed on an iOS device.

      Fonts (calibri.ttf, calibrib.ttf) can be provided on request.

      Commands to render the two PDFs are as follows:

      • …/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

      Attachments

        1. pdf-images-mergefonts.pdf
          107 kB
          Mark Gibson
        2. pdf-images.pdf
          124 kB
          Mark Gibson
        3. pdf-images.fo
          0.6 kB
          Mark Gibson
        4. image1.pdf
          216 kB
          Mark Gibson
        5. fop-mergefonts.xml
          0.5 kB
          Mark Gibson
        6. fop.xml
          0.5 kB
          Mark Gibson
        7. CorrupPdfViewComparison.png
          171 kB
          Mark Gibson

        Activity

          People

            ssteiner Simon Steiner
            Jibbeau Mark Gibson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: