pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eli colner <ecol...@yahoo.com>
Subject Changing font of PDTextbox
Date Wed, 05 Mar 2014 22:08:41 GMT
How is it possible to change the font of a textbox?

I tried 

PDDocument pdf = PDDocument.load(originalPdf);
PDDocumentCatalog docCatalog = pdf.getDocumentCatalog();
PDAcroForm acroForm = docCatalog.getAcroForm();
PDField field = acroForm.getField( "topmostSubform[0].Page1[0].Entity[0].p1-t4[0]" );
field.getDictionary().setString(COSName.DA, PDType1Font.COURIER.getBaseFont());
field.setValue("Testing font change");

I also searched for the answer to this and couldn't figure it out.
https://www.google.com/search?as_q=textbox+font&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=http%3A%2F%2Fmail-archives.apache.org%2Fmod_mbox%2Fpdfbox-users%2F&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=


Any help would be much appreciated.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message