Repository navigation
Releases: pwatx/html2pdf
Release list
html2pdf 1.0
A powerful tool that converts static website HTML pages into PDF files with bookmarks. The program reads the index.html file (must use this name) from the src folder, parses the hierarchical table of contents from the index page, generates a bookmarks.txt file, and cross-checks with the HTML files in the src folder - the directory structure should correspond to the folder and file hierarchy in the src folder. The program then converts HTML files to a single PDF document in order according to the table of contents using Node.js's Playwright library, and uses Python's PyPDF2 library to convert bookmarks.txt into PDF bookmarks.
If the directory hierarchy has more than one level, the folders and HTML files under folders in src must correspond to it. The program will automatically generate nested bookmarks for the PDF directory.