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

John Hewson commented on PDFBOX-1982:
-------------------------------------

One of the issues I've discovered is that form field inheritance is not really 
handled in a consistent manner, for example, PDFieldFactory#isButton performs 
ad-hoc inheritance for the button field, but not the other tpes of field, while 
PDField#getKids is used within field classes to perform ad-hoc inheritance 
also. Some methods such as getWidget use this to perform inheritance but most 
others, such as getFieldFlags do not. Fixing this will need some fairly 
substantial changes so I'll open another issue for this and leave it at that.

> Standardise AcroForm Fields
> ---------------------------
>
>                 Key: PDFBOX-1982
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1982
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: AcroForm
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>            Assignee: John Hewson
>
> While working on adding the patch in PDFBOX-1847 I noticed that the digital 
> signature form field, PDSignature is deprecated, having been replaced by 
> PDSignatureField.
> Currently some aspects of the fields do not correspond with the PDF 
> specification, in particular the hierarchy of the fields and their naming. 
> There are currently 43 open issues for the AcroForm component and no issues 
> have been closed since 2011, so I've attempted some basic refactoring to give 
> us a clean slate for adding new features and fixing old bugs.
> Here's the current hierarchy of fields in PDFBox:
> PDField
>     PDChoiceButton
>         PDCheckbox
>         PDRadioCollection
>     PDPushButton
>     PDVariableText
>         PDChoiceField
>         PDTextbox
>     PDSignatureField
>     PDUnknownField
> And here's the actual hierarchy from the PDF specification:
> Field
>     Button
>         Check Box
>         Radio Button
>         Pushbutton
>     Text
>     Choice
>         List Box
>         Combo Box
>     Signature
> Note that PDPushButton and PDTextbox are in the wrong place in the hierarchy 
> and List Box and Combo Box are missing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to