datasheet
datasheet copied to clipboard
PDF Outline
Understanding the Difference between Bookmarks and the Outline in a PDF
Creating a Table-of-Contents with PDF.js
https://github.com/mozilla/pdf.js/tree/master/examples/node
CreateOptions, addOutline, insertOutline
Tools
{Adoc, TOC.json} -> [] -> html1
html1 -> [] -> PDF1
PDF1 -> [toc.js] -> TOC.json
- Parse PDF with
pdf.jslibrary https://github.com/mozilla/pdf.js - Measure page numbers for Chapters, Sections.
- Number of pages
{PDF1, TOC.json} -> [] -> PDF2
- based on printed PDF and TOC.json
- parse PDF1 using
pdf-libhttps://github.com/Hopding/pdf-lib - add headers and footers. page numbers
- add
Outlineusing https://github.com/Hopding/pdf-lib/pull/486 - save modified
PDF2
More links
- https://www.oreilly.com/library/view/pdf-explained/9781449321581/ch04.html
- https://medium.com/@jberkenbilt/the-structure-of-a-pdf-file-6f08114a58f6
- https://github.com/lillallol/outline-pdf-cjs
getOutline