You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Ken Bowen <kb...@als.com> on 2010/06/21 02:12:47 UTC

Simple fonts -- using setField

Hi,

I'm attempting to follow the model given in  
~pdfbox.examples.fdf.SetField to set values in fields in randomly  
selected forms for which I have previously extracted the basic field  
information (name, location box, etc).    A simple example throws the  
following exception:

java.io.IOException: Error: Don't know how to calculate the position  
for non-simple fonts
	at  
org 
.apache 
.pdfbox 
.pdmodel 
.interactive.form.PDAppearance.getTextPosition(PDAppearance.java:612)
	at  
org 
.apache 
.pdfbox 
.pdmodel 
.interactive 
.form.PDAppearance.insertGeneratedAppearance(PDAppearance.java:379)

My question:  Is there any way to control (set) the font to be used in  
a form text field separately from the font(s) of the enclosing form?

Thanks,
Ken Bowen