pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: pdfbox 2.0.4 digital signature field appearance
Date Thu, 19 Jan 2017 17:46:28 GMT
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 

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.


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

View raw message