pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: Applying a Normal Icon appearance to a Push-button
Date Sun, 13 Dec 2015 19:10:35 GMT
If you need additional information please let me know 


> Am 13.12.2015 um 19:52 schrieb Gilad Denneboom <gilad.denneboom@gmail.com>:
> 
> 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 <sahyoun@fileaffairs.de>
> 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
>> 
>> 

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


Mime
View raw message