[jira] [Commented] (PDFBOX-1745) PDF generated with PDFMergerUtility error out when opening.

2013-11-20 Thread Thomas Chojecki (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13828027#comment-13828027
 ] 

Thomas Chojecki commented on PDFBOX-1745:
-

I think this issue is solved by PDFBOX-1780

Can you please test it with the latest pdfbox?

I've used the latest 1.8.3-SNAPSHOT and the follow code:

PDFMergerUtility merger = new PDFMergerUtility();
merger.addSources(Arrays.asList(new InputStream[] { 
PDFMerge.class.getResourceAsStream(/pdfbox_1745/pdf_1.pdf),
PDFMerge.class.getResourceAsStream(/pdfbox_1745/pdf_2.pdf) }));
merger.setDestinationStream(new FileOutputStream(tmp/merged.pdf));
merger.mergeDocuments();


If you are using maven, you can grab the latest snapshot from the snapshot 
repository

http://repository.apache.org/snapshots/

 PDF generated with PDFMergerUtility error out when opening.
 ---

 Key: PDFBOX-1745
 URL: https://issues.apache.org/jira/browse/PDFBOX-1745
 Project: PDFBox
  Issue Type: Bug
  Components: Utilities
Affects Versions: 1.8.2
Reporter: Ken Liu
Priority: Blocker
 Attachments: merged_bad.pdf, pdf_1.pdf, pdf_2.pdf


 Two pdf files - pdf_1 and pdf_2, after merged by PDFMergerUtility,
 pdf_1 + pdf_2: error out when opening the merged pdf, when browsing down to 
 the pdf_2 part.
 pdf_2 + pdf_1: works.
 This issue is different than PDFBOX-515. for this problem, pdf is gernerated 
 in both way, but when opening, get errors.



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


[jira] [Updated] (PDFBOX-1745) PDF generated with PDFMergerUtility error out when opening.

2013-11-20 Thread Thomas Chojecki (JIRA)

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

Thomas Chojecki updated PDFBOX-1745:


Attachment: merged.pdf

 PDF generated with PDFMergerUtility error out when opening.
 ---

 Key: PDFBOX-1745
 URL: https://issues.apache.org/jira/browse/PDFBOX-1745
 Project: PDFBox
  Issue Type: Bug
  Components: Utilities
Affects Versions: 1.8.2
Reporter: Ken Liu
Priority: Blocker
 Attachments: merged.pdf, merged_bad.pdf, pdf_1.pdf, pdf_2.pdf


 Two pdf files - pdf_1 and pdf_2, after merged by PDFMergerUtility,
 pdf_1 + pdf_2: error out when opening the merged pdf, when browsing down to 
 the pdf_2 part.
 pdf_2 + pdf_1: works.
 This issue is different than PDFBOX-515. for this problem, pdf is gernerated 
 in both way, but when opening, get errors.



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


[jira] [Commented] (PDFBOX-1714) Merging PDFs results in java.io.IOException: expected='R' actual='0'

2013-11-20 Thread Thomas Chojecki (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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:\pdfboxtestjava -jar pdfbox-app-1.8.2.jar PDFMerger doc1.pdf doc2.pdf 
 result.pdf
 D:\pdfboxtestjava -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)