You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Peter Koellner <pe...@asgalon.net> on 2017/01/19 16:53:05 UTC

pdfbox 2.0.4 digital signature field appearance

Hi!

I am currently evaluating PDFBox 2.0.4 for a document signing application that uses CADES 
with X509 certificates residing on a smart card. Rendering looks fine, and I think I am more 
or less through with the actual signing process, but as far as filling the signature field is 
concerned, I am a bit at a loss.
I have been looking at the CreateVisibleSignature example, but I have some difficulties 
identifying what exactly I do need to implement to just fill an existing signature field, since
the whole example seems to prepare nearly every detail explicitly. 
I probably would have expected the whole signature appearance basics as part of the library, but 
that does not seem to be the case, or does it?
Is there perhaps some more example code somewhere else that would apply here?

Regards
   Peter

-- 
peter kollner <pe...@asgalon.net>

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


Re: pdfbox 2.0.4 digital signature field appearance

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 19.01.2017 um 17:53 schrieb Peter Koellner:
> Hi!
>
> I am currently evaluating PDFBox 2.0.4 for a document signing 
> application that uses CADES with X509 certificates residing on a smart 
> card. Rendering looks fine, and I think I am more or less through with 
> the actual signing process, but as far as filling the signature field 
> is concerned, I am a bit at a loss.
> I have been looking at the CreateVisibleSignature example, but I have 
> some difficulties identifying what exactly I do need to implement to 
> just fill an existing signature field, since
> the whole example seems to prepare nearly every detail explicitly. I 
> probably would have expected the whole signature appearance basics as 
> part of the library, but that does not seem to be the case, or does it?
> Is there perhaps some more example code somewhere else that would 
> apply here?

The appearance stuff is also in the sources (PDVisibleSignDesigner, 
PDVisibleSigProperties) but it hard to understand. I have added comments 
as best as I could. To sign on an existing signature just set the 
signatureFieldName with the field name. This will bring a call to 
findExistingSignature().

If you don't know the field name open the file with PDFDebugger and 
search there... if you don't find it upload it somewhere and I'll tell you.

The example doesn't do CADES so you may have to improve parts. Signing 
on an existing signature was tested with the file created by the 
CreateEmptySignatureForm example.

Tilman

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