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

IllegalArgumentException when refreshing an appearance and no font resources are defined

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.0.6, 3.0.0 PDFBox
    • Component/s: AcroForm
    • Labels:
      None

      Description

      PDDocument doc = PDDocument.load(new File("out.pdf"));
      doc.getDocumentCatalog().getAcroForm().setNeedAppearances(false);
      doc.getDocumentCatalog().getAcroForm().refreshAppearances();
      doc.save("pdfbox.pdf");
      doc.close();

      Exception in thread "main" java.lang.IllegalArgumentException: /DR is a required entry
      at org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.<init>(PDDefaultAppearanceString.java:82)

        Attachments

        1. out-reader.pdf
          9 kB
          Maruan Sahyoun
        2. PDFBOX3732-minimal.pdf
          0.7 kB
          Maruan Sahyoun
        3. PDFBOX3732-minimal-reader.pdf
          6 kB
          Maruan Sahyoun
        4. refreshAppearances.patch
          2 kB
          simon steiner
        5. out.pdf
          6 kB
          simon steiner

          Activity

            People

            • Assignee:
              msahyoun Maruan Sahyoun
              Reporter:
              ssteiner1 simon steiner
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: