Re: widgets connection to parents

2016-01-22 Thread Maruan Sahyoun
Hi, > Am 22.01.2016 um 15:28 schrieb Tilman Hausherr : > > 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 ma

Re: widgets connection to parents

2016-01-22 Thread Tilman Hausherr
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? for (PDAnnotationWidget widget : children) { widget.getCOSObject().setItem(COSName.PARENT, this); } Tilman Am 21.01.2016 um 16:45 schrieb Maru

Re: widgets connection to parents

2016-01-21 Thread 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

widgets connection to parents

2016-01-21 Thread Tilman Hausherr
PDTerminalField has this: public void setWidgets(List 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