pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akshay Rawat <proje...@akshay.cc>
Subject Re: Overriding the font of a PDField
Date Thu, 28 Nov 2013 10:39:06 GMT
Thanks for that.


In PDFBox is see that 

      dap = textbox.getDictionary().getDictionaryObject(COSName.DA)

gets the default appearance, which is a COSString. How do I use that to change the font for
the particular field.




On Nov 28, 2013, at 3:55 PM, Gilad Denneboom <gilad.denneboom@gmail.com> wrote:

> The font used has nothing to do with the value of the field. This
> information is encoded in the DA attribute of the field, which you can read
> and write using via the field's COSDictionary object. AFAIK, there are no
> direct getters or setters for this property.
> 
> 
> On Thu, Nov 28, 2013 at 11:07 AM, Akshay Rawat <projects@akshay.cc> wrote:
> 
>> I am working with an acroform which has fields. These fields specify their
>> own fonts to use when a value is set (using `setValue`).
>> 
>> Is there a way to override this font of the PDField, such that `setValue`
>> text appears in a different font.
>> 
>> I’ve asked this question here too.
>> 
>> 
>> Thanks.
>> 
>> 
>> Akshay Rawat
>> 
>> Skype: akshayrawat
>> Mobile: +91 9538780000
>> http://www.akshay.cc
>> 
>> 
>> 
>> 


Mime
View raw message