Topic: ebook

2026-09-12 · 2 min read

PDF from HTML with headless Chrome

Use the Chrome binary you already have to turn an HTML file into a print-ready PDF or a pixel-exact PNG, without installing Puppeteer: the flags, a throwaway user-data-dir so you never touch the real profile, @page CSS for A5 books, page-break rules, and the file URL escaping that bites on Windows.

pdfchromeheadlessnode.js
2026-09-12 · 2 min read

Build an EPUB from Markdown with Node.js

Generate a valid EPUB 3 from a folder of Markdown chapters using marked and jszip: the required files, why mimetype must be stored uncompressed and first, converting HTML to XHTML, the nav.xhtml table of contents, content.opf metadata, and adding a cover.

epubmarkdownnode.jsjszip

← Guides