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

Andriy commented on PDFBOX-1510:
--------------------------------

Thanks a lot Maruan, using PDDocument.loadNonSeq does solve the issue! I will 
keep the issue ticket open as it still affects PDDocument.load. Also, 
PDDocument.loadNonSeq can only accept a File in the arguments while we have an 
InputStream that we want to pass on (have to create a temp file to go over 
this).
                
> PDF gets corrupted when extracting it from the embedded files
> -------------------------------------------------------------
>
>                 Key: PDFBOX-1510
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1510
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Andriy
>            Priority: Critical
>         Attachments: doesnt_work.pdf, PDFEmbeddedFiles.java, works2.pdf
>
>
> When a PDF is attached to another PDF it gets corrupted when retrieved 
> through PDEmbeddedFile.getByteArray() method call. For some reason the 
> returned array has less data than the original file that has been attached to 
> the PDF.
> This affects some of the documents and not another (see attachments for 
> working/non-working files), source code reproducing the issue has been 
> attached as well.
> Please note: the issue is not occurring when using PDDocument.loadNonSeq, 
> it's on when using PDDocument.load

--
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