Hi,
Each PDField object has one or several widgets which you can get with
getWidgets(). Then do getRectangle(), adjust its values and call
setRectangle(). To ensure that the appearance is updated, call
getValue() and setValue() on the PDField object.
If you need this value to be dynamic, i.e. to be recalculated for every
value, then you'd have to calculate the length of the string with
PDFont.getStringWidth("...."). Getting the PDFont is a bit more tricky,
but if you know your form then have a look to see if it is one of the
standard 14 type 1 fonts e.g. PDType1Font.HELVETICA. If not, please
upload your PDF file somewhere because it is not here, binaries are
deleted. I'd then find or create some code to get the PDFont from the field.
Tilman
Am 23.07.2018 um 08:04 schrieb Arvind Kumar:
Hi,
*Version* - Any version with which we can solve the problem.
*Problem-*
We are using AcroForm to update the fillable PDF. We are facing issue
when trying to fill a larger text/data in the available field, Data is
getting hidden due to less space (form filed size).
Could you please suggest some better approach where I can use acroform
to fill the data using java and rows can be shifted based on data
available i.e. form feild size can be adjusted as per data size.
Please find attached image where we are filling data as "*Arvind Kumar
Mishra 1234567899999 xsd test*" on of the acrobat form field but only
"*Arvind Kumar Mishra 1234567899999*" is getting displayed. Remaining
data "*xsd test *" is not visible.
Could you please help on same. If we can do the same with open source
tool, it would be great, but any suggestion would appreciable. Thanks
for the support.
Best Regards,
Arvind Kumar
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]