-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF: Add a Table of Contents to the metadata #47
Comments
Thanks @danburzo for all of your hard work on this project. I wanted to share that this library looks really promising for our use case of a CI publication pipeline that generates PDFs. We have explored leveraging html/css and converting to PDF and it gets us 80% of the way there. Other features such as page-sandboxed footnotes are also very hard to come by. Our current biggest obstacle is just what you stated here, we are unable to generate a ToC. The libraries that do handle ToC are proprietary and typically not compatible to be distributed with our open source software. We will be watching this project and even willing to contribute when opportunity arises. |
We may be able to have some luck with Apache PDFBox, but it's written in Java and I'm not sure yet if/how we'll be able to use it. |
I've implemented a basic TOC functionnality: #81 Not sure that's what you had in mind, but for my use case it's gonna be usefull, hope it helps. |
Hi @guybedo, thank you for the contribution! This issue specifically refers to a PDF functionality to show an Outline in the PDF structure itself rather than a separate page in the PDF. But your addition is very welcome as well :-) |
@larryboymi — unfortunately, no. I'm currently caught in dayjob work, and did not have a chance to explore this further. Any sort of insight / contribution on this subject is greatly appreciated! |
Thanks for responding... I think I'll try to create an example with hummus and then share with you... Was just hoping to shortcut lol |
I created an npm module with this functionality. Check it out and give feedback, thanks! I'll try to add some examples of how to do it in your regular flow, but the base |
Chrome 85 / puppeteer 5.2.1 you can produce tagged PDFs, and it seems an outline based on that is in the works |
A PDF generated from many web pages would benefit from a Table of Contents, implemented as PDF bookmarks. We'll probably need to post-process the PDF with something like HummusJS to write the TOC. (Also, I'd appreciate if someone with more experience would explain whether its license is compatible with our MIT License)
Related: #25
The text was updated successfully, but these errors were encountered: