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 Fri, 27 Apr 2018 07:26:54 GMT

Sounds like you just used the code and didn't use PDAnnotationRubberstamp.

What I meant was that you start with PDAnnotationRubberstamp, set the 
rectangle, and then create the appearance stream just like it is done in
CreateVisibleSignature2.createVisualSignatureTemplate(). Just substitute 
"widget" with your rubberstampannotation variable and ignore the 
signature related stuff.


Am 27.04.2018 um 01:54 schrieb JZ Q:
> Hi Tilman,
> Thank you for info in your previous reply. I tried the code
> CreateVisibleSignature2
> and it works, but I simply want to attach an image of signature at
> appropriate places in PDF. The agent  will print the document with his
> signature and pass it to client for manual signing.
> How to use the   PDAnnotationWidget or rubberstamp annotation? Is there
> anything I can read to get a better understanding. Thanks.
> Jason
> On Tue, Apr 24, 2018 at 3:08 PM, Tilman Hausherr <THausherr@t-online.de>
> wrote:
>> 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
>> annotations.
>> Tilman
>> 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-MaJR2QLsVcjgf95y3gtu5By0
>>> HJs1X/view?usp=sharing
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org

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

View raw message