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 2018/09/20 04:06:00 UTC

[jira] [Comment Edited] (PDFBOX-4312) Signature is not getting inserted into 00000 area

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

Tilman Hausherr edited comment on PDFBOX-4312 at 9/20/18 4:05 AM:
------------------------------------------------------------------

So I was able to reproduce the effect, see attached files. This 1.8 source code
{code:java}
    public void saveIncremental( String fileName ) throws IOException, COSVisitorException
    {
        saveIncremental(new BufferedInputStream(new FileInputStream(fileName)), 
                new BufferedOutputStream(new FileOutputStream(fileName, true)));
    }
{code}
is suspicious, because one is writing on the same file than the one where one is writing, but I'm not sure if the writing start offset is really correct.


was (Author: tilman):
So I was able to reproduce the effect, see attached files. This code
{code:java}
    public void saveIncremental( String fileName ) throws IOException, COSVisitorException
    {
        saveIncremental(new BufferedInputStream(new FileInputStream(fileName)), 
                new BufferedOutputStream(new FileOutputStream(fileName, true)));
    }
{code}
is suspicious, because one is writing on the same file than the one where one is writing, but I'm not sure if the writing start offset is really correct.

> Signature is not getting inserted into 00000 area
> -------------------------------------------------
>
>                 Key: PDFBOX-4312
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4312
>             Project: PDFBox
>          Issue Type: Bug
>          Components: .NET, PDModel, Signing
>    Affects Versions: 1.8.9
>            Reporter: bal
>            Priority: Major
>         Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, testingSignature-signed-SaveIncremental-2param-good.pdf, testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 signature to byte array using Convert.FromBase64String method in .net . I am passing this byte array to sign method in signature interface which gets called after calling saveincremental. My byte array is inserting proper but the name of which signature is not shown when i open pdf. May be my byte conversion may not proper or something else i am doing wrong. please let me know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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