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

IllegalArgumentException: resourceDictionary is null in PDFMerger

    Details

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

      Description

      This was first mentioned on the user mailing list by Gilad Denneboom:

      When merging the PDF 1.7 spec with another PDF file this exception appears:

      Exception in thread "main" java.lang.IllegalArgumentException: resourceDictionary is null
      	at org.apache.pdfbox.pdmodel.PDResources.<init>(PDResources.java:68)
      	at org.apache.pdfbox.util.PDFMergerUtility.appendDocument(PDFMergerUtility.java:448)
      	at org.apache.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:190)
      	at org.apache.pdfbox.tools.PDFMerger.merge(PDFMerger.java:70)
      	at org.apache.pdfbox.tools.PDFMerger.main(PDFMerger.java:46)
      	at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:76)
      

      I did some debugging, it happens on the very first page. The resources is indeed null, but it exists when viewing with PDFDebugger.

        Attachments

          Activity

            People

            • Assignee:
              jahewson John Hewson
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: