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

PDResources overrides any existing font when calling addFont

    Details

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

      Description

      If you call addFont on a PDResource (for example, while calling setFont on a PDPageContentStream) without first having manually called getFonts on the resource, the "fonts" field will be set to a new hashmap. It will thus forego loading any existing font from the dictionary, and make those fonts disappear when saving the file again. The bug was probably introduced by the removal of the font mapping in the resources.

        Attachments

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              jpbougie Jean-Philippe Bougie
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: