Embed chapters/index in PDF

268 views
Skip to first unread message

Jon Ljunggren

unread,
Jun 14, 2012, 4:06:58 AM6/14/12
to dom...@googlegroups.com
Hi all!

Is there a way to insert/embed chapters/bookmarks/index to a pdf
through Dompdf (or some other pdflibrary that can work with dompdf)?
Right now I'm using Dompdf and Fpdf to create a separate index page,
but it would be so much better to have it embedded. Do You have any
tips or suggestions?

Thanks!
/Jon

BrianS

unread,
Jun 10, 2015, 6:45:26 PM6/10/15
to dom...@googlegroups.com
There is not a built-in way to create an index or TOC with dompdf. But you're in luck ... I worked out a way to do this using inline script. See the following sample in my debug helper:
http://eclecticgeek.com/dompdf/debug.php?identifier=toc-v0.6.x

The above sample creates a TOC, but with a few minor modifications you could create an index instead. The main limitation right now is that TOC/index can't be more than one page (at least, not without a lot more work on your part).

(originally posted here: https://groups.google.com/d/msg/dompdf/HI3aqD_H42k/QxnOAZ7AJg4J)
Reply all
Reply to author
Forward
0 new messages