[Poppler-bugs] [Bug 64821] [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Feb 26 10:23:43 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=64821
--- Comment #59 from Adrian Perez de Castro <aperez at igalia.com> ---
(In reply to comment #58)
> @@ +2885,5 @@
> > + * on the attribute requested, as specified in the table. If the
> > + * attribute is not defined, <code>NULL</code> is returned.
> > + */
> > +GVariant *
> > +poppler_structure_element_get_attribute (PopplerStructureElement *poppler_structure_element,
>
> Since we have convenient methods to get every property, I would not add this
> generic method for now.
Provided that there are methods for retrieving individual properties,
I think it would be okay to leave out this method for the moment. My
main motivation for having it is making it easier to work with the
Tagged-PDF structure from dynamic languages with GObject-Introspection
bindings.
Let's skip it for the moment and reconsider/rework it later on.
> ::: glib/poppler-structure-element.h
> @@ +85,5 @@
> > /**
> > + * PopplerStructureAttribute:
> > + */
> > +typedef enum {
> > + POPPLER_STRUCTURE_ATTRIBUTE_UNKNOWN,
>
> Do we use this?
The poppler_structure_element_get_kind() method returns it when the
when StructElement::getType() for the underlying object returns
StructElement::Unknown, or when a NULL structure element is passed
(by means of g_return_val_if_fail).
That being said, in Poppler elements for which StructElement::isOk()
returns gFalse are never added to the structure tree, so it should
never happen that there would be an invalid element with type
StructElement::Unknown that poppler-glib could access... So it seems
safe to remove POPPLER_STRUCTURE_ATTRIBUTE_UNKNOWN.
I have posted a patch to remove it in bug #75541
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20140226/ccd375ec/attachment.html>
More information about the Poppler-bugs
mailing list