You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/04/23 08:52:15 UTC

[jira] [Commented] (PDFBOX-2038) Method VisualSignatureParser#parse does not close COSDocument

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

Tilman Hausherr commented on PDFBOX-2038:
-----------------------------------------

setVisualSignature does create a COSDocument, which contains the visual signature that is to be used later. So it can't be closed immediately. Currently, all you can do is to call options.getVisualSignature() and close that object. An improvement might be to add a close() method to SignatureOptions, but I'm not one of the signature people here, so I'd rather wait for their opinion.

> Method VisualSignatureParser#parse does not close COSDocument
> -------------------------------------------------------------
>
>                 Key: PDFBOX-2038
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2038
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.8.4, 1.8.5, 2.0.0
>            Reporter: Andrei Solntsev
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I am adding a visual signature to my PDF.
> SignatureOptions options = new SignatureOptions();
> options.setVisualSignature( new FileInputStream("my.jpg") );
> After a while I am getting the following warning in logs:
> Warning: COSDocument: You did not close a PDF Document
> The problem cause is probably the method org.apache.pdfbox.pdfparser.VisualSignatureParser#parse which creates instance of COSDocument, but does not close it.



--
This message was sent by Atlassian JIRA
(v6.2#6252)