> On 19 Aug 2015, at 12:36, Tilman Hausherr <[email protected]> wrote:
>
> Am 19.08.2015 um 21:16 schrieb Roberto Nibali:
>>
>> At least for simple geometric shapes, like rectangles, this should be
>> feasible, no? Anyway, after constantly getting "null" from the
>> getCOSObject().getItem(COSName.KIDS) and nothing out of getChildren() from a
>> given PDField, I kind of gave up.
>
> That should work higher up elements.... You have to start at /Acroform and
> work with the intermediate elements (non terminal fields). The 2.0
> PDFDebugger shows you what elements are indirect objects. And then go down
> until you "hit" one of your PDField objects.
>
> It is tricky because the PDFBox code tries to hide the indirect objects from
> the ordinary user most of the time, and the COSBase objects don't know from
> what indirect objects they come.
I added a method a while ago to solve exactly this problem:
COSDocument#getKey(COSBase)
Will return the COSObjectKey which correspond a given indirect object. It does
this by examining every indirect object until it finds the one it’s after.
— John
> Tilman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]