Hi, currently, NamedDests in glib frontend are brokend. This is because in the pdf reference, Names trees can hold very wild strings, including byte strings, where the '\0' ending character assumption does not hold. Thus, a gchar * is not a good way of describing named destinations on the glib world. On test file,
all the goostrings are alright, but when transforming these to gchar *, some of the byte strings have a '\0' before the end of the string.
This makes these PopplerDest objects unusable. We should get some more fancy API for that (Like using GBytes? and adding some methods to check if it is a proper string or so) or not to convert the name to gchar and use the PopplerDest object instead of the name on the find_link_dest and find_link_page funcs.
Created attachment 89043 [details] [review]
So this patch fixes the issue without altering the api or abi. you can find a testcase in http://www.dim.uchile.cl/~jaliste/named_dests.pdf
Note that after the patch some of the links still are not found because the cmp function of GooString is wrong (see https://bugs.freedesktop.org/show_bug.cgi?id=26049)
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/631.