It can be used for creating a PDF locally, or the HTML file can also be viewed directly in the browser - both should look identical.
When I was looking into different ways of converting HTML into PDF, everything I came across did a pretty bad job at correctly supporting CSS layouts and positioning. So I ended up just using headless Chrome for printing. Perhaps WeasyPrint does a better job with CSS support?
https://github.com/jkitching/1pager-printable-html
It can be used for creating a PDF locally, or the HTML file can also be viewed directly in the browser - both should look identical.
When I was looking into different ways of converting HTML into PDF, everything I came across did a pretty bad job at correctly supporting CSS layouts and positioning. So I ended up just using headless Chrome for printing. Perhaps WeasyPrint does a better job with CSS support?