You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by chitgoks <ch...@gmail.com> on 2017/03/13 05:46:11 UTC

indirect object

hi all

i wish to find out how to get the indirect object's value

e.g.

126 0 R

so if a COSDictionary 's isDirect() is false, i would like to get that
value but i cannot find which getter method to use

anyone got ideas? thank you

please advise

Re: indirect object

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 13.03.2017 um 06:46 schrieb chitgoks:
> hi all
>
> i wish to find out how to get the indirect object's value
>
> e.g.
>
> 126 0 R
>
> so if a COSDictionary 's isDirect() is false, i would like to get that
> value but i cannot find which getter method to use

You're confusing something there. A COSDictionary is just that, 
regardless if direct or indirect.

The isDirect() has a meaning about storing it when saving the PDF. You 
don't need to touch this, as an ordinary user.

What may happen you get an indirect object as result of whatever (e.g. 
getItem()), then it has the type COSObject. Then use getObject() to get 
the object.

Or avoid it, by using COSDictionary.getDictionaryObject(), or by using 
getInt() or one of the smart typed getters.

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org