PDFBox
  1. PDFBox
  2. PDFBOX-1259

3.1.6 Invalid Font Definition - not your usual pdf - passes Adobe and pdfaPilot validation as PDF/A

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.7.0
    • Component/s: Preflight
    • Labels:
      None
    • Environment:
      Linux

      Description

      testXPDFA.pdf is not valid, error(s):
      3.1.6: Invalid Font definition, Width of the character "2" in the font program "EJCJIO+FrankRuehlCLM-Medium"is inconsistent with the width in the PDF dictionary.

      1. testXPDFA.pdf
        49 kB
        William Fausser

        Activity

        Hide
        Eric Leleu added a comment -

        Hi,

        This output seems to be the right one.
        The font "EJCJIO+FrankRuehlCLM-Medium" is a Type1 font.

        As you can see here after, the first character is the CID 2. It has a width of 481 in the Font dictionary :
        34 0 obj <</BaseFont/EJCJIO+FrankRuehlCLM-Medium/Encoding 32 0 R/FirstChar 2/FontDescriptor 33 0 R/LastChar 65/Subtype/Type1/ToUnicode 19 0 R/ ... /Widths[481 434 0 0 434...442]>>

        In the Encoding dictionary, the character 2 is linked with the Character name "afii57664" (a kind of 'N' the Hebrew letter Alef).
        32 0 obj^M<</Differences[2 /afii57664/uniFB3C/afii57797/... /afii57802] /Type/Encoding>>

        I extracted the font program from the PDF ("/FontFile3 18 0 R " in the "/FontDescriptor 33 0 R") and I read it with FontForge. According to FontForge the width of the character 2 is 577.
        And the character 2 has the same name ( "afii57664" )

        If I add some debug traces in my code before the width validation, I have :
        CID : 2 pdfW : 481.0 fontW : 577

        This difference is too huge to flag this pdf as a PDF/A-1b

        BR,
        Eric

        Show
        Eric Leleu added a comment - Hi, This output seems to be the right one. The font "EJCJIO+FrankRuehlCLM-Medium" is a Type1 font. As you can see here after, the first character is the CID 2. It has a width of 481 in the Font dictionary : 34 0 obj <</BaseFont/EJCJIO+FrankRuehlCLM-Medium/Encoding 32 0 R/FirstChar 2/FontDescriptor 33 0 R/LastChar 65/Subtype/Type1/ToUnicode 19 0 R/ ... /Widths [481 434 0 0 434...442] >> In the Encoding dictionary, the character 2 is linked with the Character name "afii57664" (a kind of 'N' the Hebrew letter Alef). 32 0 obj^M<</Differences [2 /afii57664/uniFB3C/afii57797/... /afii57802] /Type/Encoding>> I extracted the font program from the PDF ("/FontFile3 18 0 R " in the "/FontDescriptor 33 0 R") and I read it with FontForge. According to FontForge the width of the character 2 is 577. And the character 2 has the same name ( "afii57664" ) If I add some debug traces in my code before the width validation, I have : CID : 2 pdfW : 481.0 fontW : 577 This difference is too huge to flag this pdf as a PDF/A-1b BR, Eric

          People

          • Assignee:
            Eric Leleu
            Reporter:
            William Fausser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development