From users-return-10981-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Fri Apr 27 09:27:09 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 12D2B180608 for ; Fri, 27 Apr 2018 09:27:08 +0200 (CEST) Received: (qmail 63377 invoked by uid 500); 27 Apr 2018 07:27:07 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 63362 invoked by uid 99); 27 Apr 2018 07:27:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2018 07:27:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E4EF3180028 for ; Fri, 27 Apr 2018 07:27:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.97 X-Spam-Level: ** X-Spam-Status: No, score=2.97 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_BL_SPAMCOP_NET=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ErA4_EzUdYG2 for ; Fri, 27 Apr 2018 07:27:03 +0000 (UTC) Received: from mailout04.t-online.de (mailout04.t-online.de [194.25.134.18]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5B26C5F216 for ; Fri, 27 Apr 2018 07:27:03 +0000 (UTC) Received: from fwd21.aul.t-online.de (fwd21.aul.t-online.de [172.20.27.66]) by mailout04.t-online.de (Postfix) with SMTP id 3421241BE66B for ; Fri, 27 Apr 2018 09:27:03 +0200 (CEST) Received: from [192.168.2.108] (S+XifrZOohZ6P04w+qyv03sdvMNSPaeQ643VAcTLitrXOsIRsVmLPKl5Vh+SJOKZ0U@[217.231.137.35]) by fwd21.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1fBxmQ-4dhHTU0; Fri, 27 Apr 2018 09:26:54 +0200 Subject: Re: how to attach an image as annotation to PDF file? To: users@pdfbox.apache.org References: <699371f7-bf7f-a7a1-3d69-85c3e53e940c@t-online.de> From: Tilman Hausherr Message-ID: Date: Fri, 27 Apr 2018 09:26:54 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-ID: S+XifrZOohZ6P04w+qyv03sdvMNSPaeQ643VAcTLitrXOsIRsVmLPKl5Vh+SJOKZ0U X-TOI-MSGID: 6fe9fbed-0f35-47f6-a7f9-a1f05c3fe98a Hi, 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. Tilman 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 > 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