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

Change to font size and default appearance

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: AcroForm
    • Labels:

      Description

      [imported from SourceForge]
      http://sourceforge.net/tracker/index.php?group_id=78314&atid=552834&aid=1729700
      Originally submitted by ajpurkiss on 2007-06-01 14:22.

      2 Changes

      1) The first is to make getDefaultAppearance in PDVariableText public and make a set method

      2) Add a second setAppearanceValue(String apValue, float fontSize) in PDAppearance and add a secoind setValue in PDField (and all implementing classes) so we can make use of it.

      1 - This was added as we needed to change the default appearance of text fields as we found that if you have two fields of the same name they are grouped under a parent field. The parent fields formatting is wrong (probably some default) so we needed to change it to that of the child as it was this formatting used for the display text and not that of the child (although if you edit the PDF you see the child properties listed)

      2 - The font calculation in setValue takes into account the box size. The problem we had is that we wanted to font to be 48pt no mater what. We knew the width was right and the the box was not high enough, but we needed this as by shirnking the text to fit we lost the ability to use it (We were using barcodes where the width is important, it does not mater if the height is chopped down).

      These changes were made to the 0.7.3 code

      [attachment on SourceForge]
      http://sourceforge.net/tracker/download.php?group_id=78314&atid=552834&aid=1729700&file_id=231410
      changes.zip (application/zip), 22773 bytes
      File changed

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Anonymous
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: