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 56A5918851 for ; Thu, 21 Jan 2016 08:55:12 +0000 (UTC) Received: (qmail 39508 invoked by uid 500); 21 Jan 2016 08:55:12 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 39487 invoked by uid 500); 21 Jan 2016 08:55:12 -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 39476 invoked by uid 99); 21 Jan 2016 08:55:11 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2016 08:55:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 66565C0860 for ; Thu, 21 Jan 2016 08:55:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.247 X-Spam-Level: * X-Spam-Status: No, score=1.247 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id WLYSOOUHp4LQ for ; Thu, 21 Jan 2016 08:55:00 +0000 (UTC) Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 75DF120CE7 for ; Thu, 21 Jan 2016 08:55:00 +0000 (UTC) Received: from fwd30.aul.t-online.de (fwd30.aul.t-online.de [172.20.26.135]) by mailout07.t-online.de (Postfix) with SMTP id 5AC623822EA for ; Thu, 21 Jan 2016 09:54:53 +0100 (CET) Received: from [192.168.2.104] (SsUVYuZSYhgHyHvDAOxSx+xHTx5CI1CquSJSzUHQNue5-y4QZGZL-CT4WPYFXjAZ8z@[217.231.173.82]) by fwd30.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1aMB0z-0GHBUO0; Thu, 21 Jan 2016 09:54:49 +0100 Subject: Re: How do you create a Radio Button Group with PDFBox 2.0? To: users@pdfbox.apache.org References: <40D1C31DE509F444A458094468638CD90130670D97@Exchange01.rmtp.rmt.com.au> <569F579A.9020108@t-online.de> <40D1C31DE509F444A458094468638CD90130671166@Exchange01.rmtp.rmt.com.au> <40D1C31DE509F444A458094468638CD901306711E4@Exchange01.rmtp.rmt.com.au> <56A096B0.2050600@t-online.de> <40D1C31DE509F444A458094468638CD90130671226@Exchange01.rmtp.rmt.com.au> From: Tilman Hausherr Message-ID: <56A09CF3.4070706@t-online.de> Date: Thu, 21 Jan 2016 09:55:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <40D1C31DE509F444A458094468638CD90130671226@Exchange01.rmtp.rmt.com.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-ID: SsUVYuZSYhgHyHvDAOxSx+xHTx5CI1CquSJSzUHQNue5-y4QZGZL-CT4WPYFXjAZ8z X-TOI-MSGID: ab0b8210-21d3-4456-b6dc-eb61be4c80d5 Am 21.01.2016 um 09:41 schrieb Adam Steen: > I am now able to create a radio button group with "pdAcroForm.setNeedAppearances(true);", acrobat rendering things nicely for me. > > I am also able to create a group of checkboxes with default values also with "pdAcroForm.setNeedAppearances(true);", again acrobat rendering things nicely for me. > > My last hurdle is to create a radio button group with "pdAcroForm.setNeedAppearances(true);" and have a default value (or value) be displayed. > > Using your code provided earlier Tilman, I was able to set a value or a default value, but acrobat just does not want to render it. > > Is " pdAcroForm.setNeedAppearances(true);" a hack? Should I be rendering everything myself? Yes, it is a bit of a hack. Good applications should create their own appearance streams. In PDF 2.0 it will be mandatory. > > Adam > > -----Original Message----- > From: Tilman Hausherr [mailto:THausherr@t-online.de] > Sent: Thursday, 21 January 2016 4:29 PM > To: users@pdfbox.apache.org > Subject: Re: How do you create a Radio Button Group with PDFBox 2.0? > > Am 21.01.2016 um 06:51 schrieb Adam Steen: >> It seems without building an appearance I am unable to set a default value? > Indeed. I've been there too and looked through the code. > > Tilman > >> Does anyone have any ideas? >> >> Adam >> >> >> -----Original Message----- >> From: Adam Steen [mailto:adams@rmt.com.au] >> Sent: Thursday, 21 January 2016 8:26 AM >> To: users@pdfbox.apache.org >> Subject: RE: How do you create a Radio Button Group with PDFBox 2.0? >> >> Hi >> >> I did manage to get a Radio Group functioning, I have posted the code to my question on stack overflow -> http://stackoverflow.com/a/34895158/415681 >> >> The next problem will be getting a default value set. >> >> Adam >> >> -----Original Message----- >> From: Tilman Hausherr [mailto:THausherr@t-online.de] >> Sent: Wednesday, 20 January 2016 5:47 PM >> To: users@pdfbox.apache.org >> Subject: Re: How do you create a Radio Button Group with PDFBox 2.0? >> >> Here's the code I did yesterday: >> http://justpaste.it/CreateRadioButtons >> >> The problem is that Adobe does things on its own even if the appearance streams are set. This seems to be related to the appearance characteristics (/MK). I haven't been able to teach it to "do nothing", or "do it all" when I do nothing (having empty streams). >> >> Tilman >> >> >> >> --------------------------------------------------------------------- >> 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 >> > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org