You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Ganesan <kg...@invest2care.com> on 2015/03/30 13:47:14 UTC

Regarding Changing the Font Appearnce of Pdf Box

Hi,

 Could you please help me changing the Default appearance of Text Fields in
Pdf AcroForm using Pdf Box. Most of the time I am using 

    COSDictionary.setString(COSName.DA, "/Helv 9 Tf") or
COSDictionary.setString(COSName.DA, PDFType1Font.HELVETICA)  but I want the
Default appearance to have the specified font when immediately the form
loaded.

Please help me.

 

Thank you,

Ganesan K.

 

Thanks & Regards

Ganesan K.

Invest2care Technologies Private Limited

+91 44 2645 0460 |+91 9003840455


 <ma...@invest2care.com> kganesan@invest2care.com |
<http://www.invest2care.com> www.invest2care.com


logo.jpg

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify
<ma...@invest2care.com> info@invest2care.com. Please note that any
views or opinions presented in this email are solely those of the author and
do not necessarily represent those of the company. Finally, the recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email. 

 

 


Re: Regarding Changing the Font Appearnce of Pdf Box

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

which version of PDFBox are you using? If you are using PDFBox 2.0 you could set the Default Apppearance on the form level. 

> Am 30.03.2015 um 13:47 schrieb Ganesan <kg...@invest2care.com>:
> 
> Hi,
>  Could you please help me changing the Default appearance of Text Fields in Pdf AcroForm using Pdf Box. Most of the time I am using 
>     COSDictionary.setString(COSName.DA, "/Helv 9 Tf") or COSDictionary.setString(COSName.DA, PDFType1Font.HELVETICA)  but I want the Default appearance to have the specified font when immediately the form loaded.


COSDictionary.setString(COSName.DA, PDFType1Font.HELVETICA)  is not OK, as you need to set the parameters for the Tf operator at a minimum. You'd also need to make sure that the font resource name is correct i.e. /Helv points to a resource either at the form level or field level which has that name.

BR
Maruan


> Please help me.
>  
> Thank you,
> Ganesan K.
>  
> Thanks & Regards
> Ganesan K.
> Invest2care Technologies Private Limited
> +91 44 2645 0460 |+91 9003840455
> kganesan@invest2care.com <ma...@invest2care.com> | www.invest2care.com <http://www.invest2care.com/>
> 	
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify info@invest2care.com <ma...@invest2care.com>. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.