Foxit Reader doesn't create the outline automatically, but it gives the possibility to the user to create it. Please, take a look at the short video I have attached. That's the type of behavior I will like to have in Okular, but to be able to do it, I think that Poppler needs to be able to store the outline in the PDF file.
Swedish Fairy Tales.mp4 <https://drive.google.com/file/d/1ADdebIeWX5zdaKe7IMKIM6r-94Sryv-0/view?usp=drive_web> El lun., 23 sept. 2019 a las 18:49, Adrian Perez de Castro (< [email protected]>) escribió: > On Sun, 15 Sep 2019 20:15:35 +0300, Andy Sardina <[email protected]> > wrote: > > Hi everyone, > > > > I sometimes get PDF files that do not contain TOC. I really like that > > in Foxit Reader you can create the TOC and I would like to have the same > > functionality in Okular. I have been looking at the source code of > Poppler > > and I couldn't find a function to set an Outline object. Is anybody > working > > on it? I would like to contribute to it. > > For tagged PDFs you can probably get a very good TOC by fetching the > document's structure tree and traversing it to extract the interesting > parts. > With the GLib API you can use PopplerStructureElement [1] to inspect the > structure of the document and pick the heading elements. > > Beware that not all PDFs are tagged, so this won't work for every document > out there. For non-tagged documents, I suppose Foxit uses some heuristics > to guess which text elements are section headings. > > I hope this helps. > > Cheers, > —Adrián > > --- > [1] https://poppler.freedesktop.org/api/glib/PopplerStructureElement.html >
_______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
