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

IllegalArgumentException when refreshing an appearance and no font resources are defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.5
    • 2.0.6, 3.0.0 PDFBox
    • AcroForm
    • 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. refreshAppearances.patch
          2 kB
          Simon Steiner
        2. PDFBOX3732-minimal-reader.pdf
          6 kB
          Maruan Sahyoun
        3. PDFBOX3732-minimal.pdf
          0.7 kB
          Maruan Sahyoun
        4. out-reader.pdf
          9 kB
          Maruan Sahyoun
        5. out.pdf
          6 kB
          Simon Steiner

        Issue Links

          Activity

            People

              msahyoun Maruan Sahyoun
              ssteiner Simon Steiner
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: