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

Maruan Sahyoun commented on PDFBOX-2617:
----------------------------------------

The fix is there for more than half a year. It's now becoming an issue for you 
as you'd like to go from an older version of PDFBox (which) to a newer one 
(which)?

Now the fix is not only relevant to checkboxes but to how terminal fields 
(fields which descendants are not fields) are recognized in PDFBox. This is 
important where the same field has multiple occurrences in a PDF. As a side 
effect the old (wrong) behavior no longer works. Of course it's not our 
intention to break an application with a bugfix - OTOH if you are dependent on 
a bug we will not be able to fix it, which might cause issues for others.

Maybe you could provide us with a code snippet and a sample form how you are 
depending on the old behavior and we can come up with a solution?

> Group of Button fields treated as a Radio Button group
> ------------------------------------------------------
>
>                 Key: PDFBOX-2617
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2617
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 1.8.8, 2.0.0
>         Environment: Windows 7, Eclipse, JRE 1.8.0_25
>            Reporter: Gilad Denneboom
>            Assignee: Maruan Sahyoun
>            Priority: Minor
>             Fix For: 1.8.9, 2.0.0
>
>         Attachments: test.pdf
>
>
> When creating a group of identical button fields PDFBox reads them as a group 
> of radio-button fields, with each widget as a check-box, which is incorrect.
> The main field has the class PDRadioCollection and each kid is a PDCheckbox.
> Run the following code on the attached file:
> PDDocument doc = PDDocument.load( new File("test.pdf") );
> PDAcroForm form = doc.getDocumentCatalog().getAcroForm();
> List<PDField> fields = form.getFields();
> for (PDField f: fields) {
>       System.out.println("Name:" + f.getFullyQualifiedName());
>       System.out.println("Type:" + f.getFieldType());
>       System.out.println("Class:" + f.getClass());
>       List<COSObjectable> kids = f.getKids();
>       if (kids!=null) {
>               for (COSObjectable c : kids) {
>                       System.out.println("Kid Class: " + c.getClass());       
>                                         
>               }
>                       
>       }
> }
> The results are:
> Name:Test
> Type:Btn
> Class:class org.apache.pdfbox.pdmodel.interactive.form.PDRadioCollection
> Kid Class: class org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
> Kid Class: class org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to