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:thaush...@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:ad...@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:thaush...@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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org


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


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


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



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

Reply via email to