[ 
https://issues.apache.org/jira/browse/PDFBOX-5439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17540190#comment-17540190
 ] 

Maruan Sahyoun commented on PDFBOX-5439:
----------------------------------------

I don't know how that form has been created but there is indeed a form field 
called Undefined (that's its name) with 6 locations (widgets).

If you look at these in Acrobat you will find Undefined#0, Undefined#1.. - 
that's Acrobats way to show the form field - Undefined - and its locations #0, 
#1, ...
Now if you set a tooltip this will be done on the field level so that all 
locations will share the same tooltip. The same is true if you set a field 
value. All fields will have the same. Now looking at the form I think the 
intention was to have independent fields. But that's not what's in the form.

Nothing wrong with PDFBox here. The forms fields need to be adjusted to match 
the needs. 
.

> Details of form fields with same form field name not getting stored using 
> PDAcroform
> ------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-5439
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5439
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: AcroForm
>            Reporter: Shubham Gupta
>            Priority: Minor
>         Attachments: Expected And Actual Result.docx, SAMPLE PDF.pdf, sample 
> code.txt
>
>
> Steps to reproduce:
>  # Develop a program that will take the PDF in PDDocument and then get the 
> Acroform details in PDAcroform now in a list of PDField try to get all the 
> fields. (I have attached a sample code for a better understanding of the 
> team).
>  # Now use a PDF which is having forms and keep two form fields with the same 
> name (let's say you are using Adobe Acrobat when you will go to tools and 
> then to Forms and then to Edit Form option and when you will click any form 
> field TEXT FIELD PROPERTIES will open. Just Go Click on the General tab and 
> Keep the two form fields names the same.)
>  # Now if the PDF contains in total of 10 form fields, the list the we got 
> from pdfbox that we have will be of size 9, This is because PDAcroform is not 
> taking those form fields that have the same form field name, they are storing 
> only those form fields whose name are unique. 
>  # This needs to be improved so that a developer using PDFBOX library, which 
> is by the way superb,  wants to validate those Form Fields which have no 
> tooltip and the duplicate form fields are the ones that don't have a tooltip 
> but since only one is getting stored he will get the wrong result every time, 
> I have given a simple example to make the team understand but this needs to 
> be improved.
> Please find the attachment for your reference.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to