<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64821#c59">Comment # 59</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64821">bug 64821</a>
from <span class="vcard"><a class="email" href="mailto:aperez@igalia.com" title="Adrian Perez de Castro <aperez@igalia.com>"> <span class="fn">Adrian Perez de Castro</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=64821#c58">comment #58</a>)
<span class="quote">> @@ +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.</span >
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.
<span class="quote">> ::: glib/poppler-structure-element.h
> @@ +85,5 @@
> > /**
> > + * PopplerStructureAttribute:
> > + */
> > +typedef enum {
> > + POPPLER_STRUCTURE_ATTRIBUTE_UNKNOWN,
>
> Do we use this?</span >
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 <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - glib: Remove unneeded POPPLER_STRUCTURE_ELEMENT_UNKNOWN"
href="show_bug.cgi?id=75541">bug #75541</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>