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

Maruan Sahyoun commented on PDFBOX-1714:
----------------------------------------

Hi,

I tested the command line you used with the attached files and I'm not able to 
reproduce the issue. Instead I get the expected result (10 page PDF). 

Can you rerun the test checking your environment. If the issue persists could 
you add some more information about the environment you are using? Are you 
using pdfbox-app-1.8.2.jar from the download site or did you build it yourself?

BR

Maruan Sahyoun
                
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to