Hi,

> Am 22.01.2016 um 15:28 schrieb Tilman Hausherr <thaush...@t-online.de>:
> 
> Hi,
> 
> I know, what I meant is whether I should add code  to the setWidgets method 
> to do this automatically, or if you'd see a reason not to do it?
> 

that would be good to add it :-)

OTOH adding annotations and fields should be made much simpler which I'm 
looking to do after 2.0

BR
Maruan


> for (PDAnnotationWidget widget : children)
> {
>    widget.getCOSObject().setItem(COSName.PARENT, this);
> }
> 
> 
> Tilman
> 
> Am 21.01.2016 um 16:45 schrieb Maruan Sahyoun:
>> The spec has this (in PDF 2.0)
>> 
>> (Required if this widget annotation is one of multiple children in a field; 
>> optional otherwise) An indirect reference to the widget annotation’s parent 
>> field. A widget annotation may have at most one parent; that is, it can be 
>> included in the Kids array of at most one field)
>> 
>> BR
>> 
>> Maruan
>> 
>>  
>>> Am 21.01.2016 um 15:28 schrieb Tilman Hausherr <thaush...@t-online.de>:
>>> 
>>> PDTerminalField has this:
>>> 
>>>    public void setWidgets(List<PDAnnotationWidget> children)
>>>    {
>>>        COSArray kidsArray = COSArrayList.converterToCOSArray(children);
>>>        getCOSObject().setItem(COSName.KIDS, kidsArray);
>>>    }
>>> 
>>> 
>>> Shouldn't this also set the /Parent entry for each widget in the array? In 
>>> the code I did earlier this week ( https://justpaste.it/CreateRadioButtons 
>>> ), I was unable to get the radio buttons displayed with Adobe Reader until 
>>> the /Parent entry was set in each widget.
>>> 
>>> widget.getCOSObject().setItem(COSName.PARENT, radioButton);
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
>>> For additional commands, e-mail: dev-h...@pdfbox.apache.org
>>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: dev-h...@pdfbox.apache.org
> 


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

Reply via email to