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: how to attach an image as annotation to PDF file?
Date Tue, 24 Apr 2018 19:08:38 GMT
Assuming you don't mean an electronic signature, the best would be a 
rubberstamp annotation. To include the image you'd need to create an 
appearance stream, which is quite tricky. See 
CreateVisibleSignature2.createVisualSignatureTemplate in the source code 
download. Although that one is about signature fields, you should start 
from widget which has the type PDAnnotationWidget, but do everything 
that is done for "widget" for your rubberstamp annotation.

Try to get this working, don't try too long / too hard, post the code 
that you did here to get more help.

See AddAnnotations in the source code for a general example how to add 


Am 24.04.2018 um 15:14 schrieb JZ Q:
> Hi everyone,
> I need to attach image (not text) of initials and signature to certain
> field or position in the pdf file. Do you know how to do it?
> Take the following document as example, at the bottom of the form, there
> are places the users can put initial and signatures. How to add images
> (jpg, gif) of the signature to the right form field? Thanks.
> https://drive.google.com/file/d/18k-MaJR2QLsVcjgf95y3gtu5By0HJs1X/view?usp=sharing

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

View raw message