[
https://issues.apache.org/jira/browse/PDFBOX-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15191888#comment-15191888
]
Andreas Lehmkühler commented on PDFBOX-3266:
--------------------------------------------
Due to an issue with JIRA and awrong ticket number I've to post the commit
comment by hand
New Revision: 1734708
URL: http://svn.apache.org/viewvc?rev=1734708&view=rev
Log:
PDFBOX-3266: close input files after saving the resulting pdf as some streams
are shared among the input and output files
> Overlay doesn't work anymore
> ----------------------------
>
> Key: PDFBOX-3266
> URL: https://issues.apache.org/jira/browse/PDFBOX-3266
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Andreas Lehmkühler
> Assignee: Andreas Lehmkühler
> Fix For: 2.0.0
>
>
> When I try to overlay to files I got the following exception
> {code}
> java.io.IOException: COSStream has been closed and cannot be read. Perhaps
> its enclosing PDDocument has been closed?
> at org.apache.pdfbox.cos.COSStream.checkClosed(COSStream.java:78)
> at
> org.apache.pdfbox.cos.COSStream.createRawInputStream(COSStream.java:126)
> at
> org.apache.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:1177)
> at org.apache.pdfbox.cos.COSStream.accept(COSStream.java:372)
> at org.apache.pdfbox.cos.COSObject.accept(COSObject.java:158)
> at
> org.apache.pdfbox.pdfwriter.COSWriter.doWriteObject(COSWriter.java:561)
> at org.apache.pdfbox.pdfwriter.COSWriter.doWriteBody(COSWriter.java:478)
> at
> org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1073)
> at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:419)
> at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1331)
> at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1229)
> at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1102)
> at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1074)
> at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1062)
> at org.apache.pdfbox.tools.OverlayPDF.main(OverlayPDF.java:143)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]