You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Petras (JIRA)" <ji...@apache.org> on 2016/05/05 09:16:12 UTC

[jira] [Comment Edited] (PDFBOX-3322) Warning "You did not close a PDF Document" when visual signature is added

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

Petras edited comment on PDFBOX-3322 at 5/5/16 9:15 AM:
--------------------------------------------------------

But this solution requires client to explicitly close it after writing (_doc.saveIncremental(fis, fos)_). It's a bit cumbersome as visual signature management and PDF writing could be done in separate, even unrelated parts of client application. My suggestion would shift this responsibility to PDDocument and IMHO is more natural, as its responsibility is to close all internal objects PDModel infrastructure creates or uses, isn't it?.


was (Author: abyss):
But this solution requires client to explicitly close it after writing (_doc.saveIncremental(fis, fos)_). It's a bit cumbersome ar visual signature management and PDF writing could be done in separate, even unrelated parts of client application. My suggestion would shift this responsibility to PDDocument and IMHO is more natural, as its responsibility is to close all internal objects PDModel infrastructure creates or uses, isn't it?.

> Warning "You did not close a PDF Document" when visual signature is added
> -------------------------------------------------------------------------
>
>                 Key: PDFBOX-3322
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3322
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel, Signing
>    Affects Versions: 1.8.11
>            Reporter: Petras
>            Assignee: Tilman Hausherr
>              Labels: signature
>             Fix For: 1.8.13
>
>         Attachments: PDFBOX_3322_VisualSignatureClosing.patch
>
>
> When visual signature is added, warning "You did not close a PDF Document" is added to the output log. It appears, that _VisualSignatureParser_ creates an instance of _COSDocument_ and later is held by _SignatureOptions_, but for this instance the {{#close()}} method is never called, which results to that warning reported by its {{#finalize()}} method.
> Probably it should by closed by _PDDocument_ when used after signing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org