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

Thomas Chojecki commented on PDFBOX-1714:
-----------------------------------------

I've tried to reproduce it with the latest 1.8.3-SNAPSHOT, but it seems to be 
solved.

I merged the doc1 with doc2 to a new document. Then took the new document and 
merged it with doc2. The result looks fine.
Maybe this issue that is similar to PDFBOX-1745 is also solved with the patch 
from PDFBOX-1780.

Can someone try to reproduce it again?
I used the same code as described in PDFBOX-1745.

> Merging PDFs results in java.io.IOException: expected='R' actual='0'
> --------------------------------------------------------------------
>
>                 Key: PDFBOX-1714
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1714
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.2
>            Reporter: Gerhard Temper
>         Attachments: doc1.pdf, doc2.pdf
>
>
> Merging attached files results in a PDF which isn't processable by PDFBox.
> Merging or editing the resulting PDF results in an exception: 
> java.io.IOException: expected='R' actual='0'
> D:\pdfboxtest>java -jar pdfbox-app-1.8.2.jar PDFMerger doc1.pdf doc2.pdf 
> result.pdf
> D:\pdfboxtest>java -jar pdfbox-app-1.8.2.jar PDFMerger result.pdf doc2.pdf 
> result2.pdf
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Bad Dictionary Declaration 
> org.apache.pdfbox.io.PushBackInputStream@7a4b35d5
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Bad Dictionary Declaration 
> org.apache.pdfbox.io.PushBackInputStream@7a4b35d5
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Bad Dictionary Declaration 
> org.apache.pdfbox.io.PushBackInputStream@7a4b35d5
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Bad Dictionary Declaration 
> org.apache.pdfbox.io.PushBackInputStream@7a4b35d5
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Bad Dictionary Declaration 
> org.apache.pdfbox.io.PushBackInputStream@7a4b35d5
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> Sep 05, 2013 8:18:48 AM org.apache.pdfbox.pdfparser.BaseParser 
> parseCOSDictionary
> WARNING: Invalid dictionary, found: 'e' but expected: '/'
> PDFMerger failed with the following exception:
> java.io.IOException: expected='R' actual='0' 
> org.apache.pdfbox.io.PushBackInputStream@7a4b35d5
>         at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:233)
>         at 
> org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:349)
>         at 
> org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:1236)
>         at 
> org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:559)
>         at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:188)
>         at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1192)
>         at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1159)
>         at 
> org.apache.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:181)
>         at org.apache.pdfbox.PDFMerger.merge(PDFMerger.java:68)
>         at org.apache.pdfbox.PDFMerger.main(PDFMerger.java:44)
>         at org.apache.pdfbox.PDFBox.main(PDFBox.java:83)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to