[poppler] Problem getting object identifier
Albert Astals Cid
aacid at kde.org
Sun Nov 11 08:03:01 PST 2007
A Dissabte 10 Novembre 2007, Leonard Rosenthol va escriure:
> IIRC (I don't have the Xpdf/Poppler sources with me at the moment),
> you first need to check isIndirect() on the object. If it's
> indirect, then you can coerce to an indirectObject or objectReference
> (forget the name) class which has objectID and objectGen members.
I think Leonard means Object::isRef() and Object::getRef() that gives you a
struct Ref {
int num; // object number
int gen; // generation number
};
Albert
>
> Leonard
>
> On Nov 10, 2007, at 9:58 AM, Brad Hards wrote:
> > Hopefully this is a pretty simple poppler problem: given a Dict (or
> > the Object
> > that encompasses it), how do I get the object identifer (e.g. the
> > number that
> > appears in the PDF file).
> >
> > For example, given a dictionary entry:
> > 35 0 obj<</Type/OCG/Name(Watermark)/Usage<</Print<</PrintState/
> > OFF>>>>>>
> >
> > How do I get 35?
> >
> > I realise that there won't be one for every object (e.g. the Print
> > dictionary
> > doesn't have a direct entry number), but I'm happy to confirm that
> > there will
> > be one for each case I'm worried about.
> >
> > Brad
> > _______________________________________________
> > poppler mailing list
> > poppler at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/poppler
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list