pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilad Denneboom <gilad.denneb...@gmail.com>
Subject Re: Multiple instances of the same field name
Date Thu, 17 Mar 2016 18:19:20 GMT
The "#0" is not a part of the actual field name, it's just a convention
used by Acrobat to show that the field has more than one widgets. To access
these widgets using PDFBox you can use the getKids method of PDField.

On Thu, Mar 17, 2016 at 5:26 PM, Kevin Ternes <KTernes@thegeneral.com>
wrote:

> How do I deal with incoming PDFs that appear to have more than one field
> with the same name?
> When I open the doc with Acrobat, I see fields "EffectiveDate#0" and
> "EffectiveDate#1".
> I am trying to manipulate the position/width/height of the two fields, #0
> and #1, independently.
>
> But when I use PDFBox,
>   PDField pdField0 = pdAcroForm.getField("EffectiveDate");
> I get an instance and I can get/set the field value.
>
> But...
>   PDField pdField0 = pdAcroForm.getField("EffectiveDate#0");
> returns NULL.
>
> I am not allowed to change the names of the fields.  Otherwise, I would
> change them to EffectiveDate_0 and EffectiveDate_1.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

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