Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5784

AppearanceGeneratorHelper assumes fontscale 1000

    XMLWordPrintableJSON

Details

    Description

      The user in the attached SO question noticed that the comb adjustment needed a factor of 2 to work correctly. A look at the font shows UnitsPerEm = 2048.

      Sample code:

      doc.getDocumentCatalog().getAcroForm().getField("field1").setValue("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW");
      doc.getDocumentCatalog().getAcroForm().getField("field2").setValue("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
      

      Attachments

        1. screenshot-1.png
          181 kB
          Tilman Hausherr
        2. with_dividing_by_2.pdf
          602 kB
          Tilman Hausherr
        3. without_dividing.pdf
          602 kB
          Tilman Hausherr
        4. PDFBOX5784-template.pdf
          1012 kB
          Maruan Sahyoun

        Issue Links

          Activity

            People

              msahyoun Maruan Sahyoun
              tilman Tilman Hausherr
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: