[ 
https://issues.apache.org/jira/browse/PDFBOX-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15435235#comment-15435235
 ] 

Tilman Hausherr commented on PDFBOX-2546:
-----------------------------------------

Here's what the PDF specification tells about page resources:
{quote}
(Required; inheritable) A dictionary containing any resources required by the 
page (see 7.8.3, "Resource Dictionaries"). If the page requires no resources, 
the value of this entry shall be an empty dictionary. Omitting the entry 
entirely indicates that the resources shall be inherited from an ancestor node 
in the page tree.
{quote}
So I'd say that your PDF is broken, but throwing an NPE isn't nice either. I'll 
create a new issue for that later tonight and add you there.

> IllegalArgumentException: resourceDictionary is null in PDFMerger
> -----------------------------------------------------------------
>
>                 Key: PDFBOX-2546
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2546
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: John Hewson
>             Fix For: 2.0.0
>
>
> This was first mentioned on the user mailing list by [~giladd]:
> When merging the PDF 1.7 spec with another PDF file this exception appears:
> {code}
> 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)
> {code}
> I did some debugging, it happens on the very first page. The resources is 
> indeed null, but it exists when viewing with PDFDebugger. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to