You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/12/07 07:53:08 UTC

[jira] Resolved: (PDFBOX-258) Merging documents without text gives error

     [ https://issues.apache.org/jira/browse/PDFBOX-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved PDFBOX-258.
----------------------------------

    Resolution: Duplicate

This seems to have already been fixed as a part of some other issue.

> Merging documents without text gives error
> ------------------------------------------
>
>                 Key: PDFBOX-258
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-258
>             Project: PDFBox
>          Issue Type: Bug
>            Priority: Minor
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1682614
> Originally submitted by ransacker on 2007-03-17 04:02.
> Whenever I try to merge 2 documents that do not have text but exist out of a scanned text image, I get a NullPointerException. 
> Exception in thread "main" java.lang.NullPointerException 
> at org.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineNode.setParent(PDOutlineNode.java:123) 
> at org.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineNode.appendChild(PDOutlineNode.java:134) 
> at org.pdfbox.util.PDFMergerUtility.appendDocument(PDFMergerUtility.java:259) 
> at org.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:148) 
>  
> [comment on SourceForge]
> Originally sent by tgdonovan.
> Logged In: YES 
> user_id=1782478
> Originator: NO
> I have a related problem. My file does have text in it, but what it doesn't have is a bookmark. If I add a bookmark to the source file, then it does get appended to the destination file. But if there is no bookmark in the source file, then I get the error. My issue is in the .net version
> [comment on SourceForge]
> Originally sent by nobody.
> Logged In: NO 
> This fix worked for me. Replace lines 256-258 in the PDFMergerUtility.java class with:
>                 
>                 if (first != null) {
>                  
>                  PDOutlineItem clonedFirst = new PDOutlineItem( (COSDictionary)cloneForNewDocument( 
>                          destination, first ));
>                  destOutline.appendChild( clonedFirst );
>                 
>                 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.