Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 672581805B for ; Sun, 13 Dec 2015 18:53:01 +0000 (UTC) Received: (qmail 94645 invoked by uid 500); 13 Dec 2015 18:53:01 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 94617 invoked by uid 500); 13 Dec 2015 18:53:01 -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 94604 invoked by uid 99); 13 Dec 2015 18:53:00 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2015 18:53:00 +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 5B71B180499 for ; Sun, 13 Dec 2015 18:53:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.899 X-Spam-Level: ** X-Spam-Status: No, score=2.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id tmPOd-hm4Qqe for ; Sun, 13 Dec 2015 18:52:54 +0000 (UTC) Received: from mail-vk0-f47.google.com (mail-vk0-f47.google.com [209.85.213.47]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 4956320314 for ; Sun, 13 Dec 2015 18:52:53 +0000 (UTC) Received: by vkca188 with SMTP id a188so143310686vkc.0 for ; Sun, 13 Dec 2015 10:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=OalF8PeTPvPe5Dp7X33yiOHUYC3tvuyr2BEwGxlXsT4=; b=Tpf7oQ+22V4IDEZzFyeusWek7aWHyOBw//1gQzwyDVEd8bc7XuDEhbjI0hKEfTLCoW iJ/I4lsdBc5EGIsIiEF33lAER24trIFREJ5WQtolp8EfodlCA549BRZVnBWZ/dHfmZgh u5IQWo5J5mhQCcsEfIJYsaTKjB2JLw3Obk3Ycaz1I3XdXhgCKxJHweVSgoGxdbGsEMEA dnpqA39aLg/dpV0tRDCnjYFZ7s9Z4lMuvsaHExxvPZJ/zX8Iz6HETz4DUMwZEjTYf2+t yT5w1bdQUiFLmxjWr/JJN6X8w5P2bP1h+5oOTBVnUXG61e3mIi1+sjXxLbYeF8MahIdR T6hw== X-Received: by 10.31.138.20 with SMTP id m20mr22162986vkd.70.1450032771992; Sun, 13 Dec 2015 10:52:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.232.4 with HTTP; Sun, 13 Dec 2015 10:52:32 -0800 (PST) In-Reply-To: <88E9576F-FAE6-48F7-BE36-6821BA1031FE@fileaffairs.de> References: <88E9576F-FAE6-48F7-BE36-6821BA1031FE@fileaffairs.de> From: Gilad Denneboom Date: Sun, 13 Dec 2015 19:52:32 +0100 Message-ID: Subject: Re: Applying a Normal Icon appearance to a Push-button To: "users@pdfbox.apache.org" Content-Type: multipart/alternative; boundary=001a1144f922498fca0526cc10ae --001a1144f922498fca0526cc10ae Content-Type: text/plain; charset=UTF-8 Thanks for the info, Maruan. I'll play around with it and see what I can come up with... On Sun, Dec 13, 2015 at 6:26 PM, Maruan Sahyoun wrote: > Hi, > > you can do > > PDAnnotationWidget widget = field.getWidgets().get(0); > PDAppearanceDictionary apDictionary = widget.getAppearance(); > apDictionary.setNormalAppearance(PDAppearanceStream stream); > > Unfortunately for the appearance stream you are on you own as for the > exact look of a push button there are no details in the specification. What > you could do is look at the appearance stream as Adobe generates is and > replicate it. > > Now if you know how the content should look like you can use > > PDPageContentStream(PDDocument doc, PDAppearanceStream appearance) > > which gives you a higher level API to add content to your appearance > stream. > > Hope that helps. > > BR > Maruan > > PS: I'm planning to add the ability to add some default appearances for > the different field types when adding new fields via PDFBox but will not > start before 2.0 has been released. > > > > Am 12.12.2015 um 10:11 schrieb Gilad Denneboom < > gilad.denneboom@gmail.com>: > > > > Hi all, > > > > Using PDFBox 1.8.10 (or 2.0.0-RC2, whatever works), is there an option to > > set the Normal Icon appearance stream of a push-button? I only see a > getter > > for this property, not a setter, and attempts to find information online > > about how to achieve it have been unsuccessful. > > > > I would appreciate any tips or sample code that will help me solve this > > problem... > > > > Thanks in advance, Gilad. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > > --001a1144f922498fca0526cc10ae--