You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by SolidAndShade <so...@fastmail.fm> on 2013/06/12 14:25:50 UTC

How to find the font used in a PDF's fillable field

Hi everyone,

I've been looking through the API docs but can't figure how to get the
font used in a particular PDField. Can anyone explain how to do this? I
need it to properly set up line wrapping for the field. Once I have the
font as a PDFont object, I can use the getStringWidth method to figure
out where the line breaks should be when pasting long text strings into
a multiline text field. I understand that if I can get a TextPosition
object associated with a fillable field, I can use that to get the font
used there, but I haven't found a way to do that either. Thanks for your
help.

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/help/overview_quotes.html