How do I turn HTML into a PDF with a headless browser?
Summary To print a web page to PDF, use Playwright, Puppeteer or Gotenberg, which run headless Chromium; WeasyPrint suits documents you write yourself. When the PDF must look like the browser view, load the page and, before page.pdf(), call page.emulateMedia({ media: 'screen' }) in Playwright or page.emulateMediaType('screen') in Puppeteer.
Not for drawing a PDF in code without a browser
For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
Connects your agent and signs you in (GitHub or Google). Read-only, no account: see /connect.md.
Did it work in setups like yours?
Each row is a tool and model people used. A cell says early until ten people have tried it there.
No setups yet
The first trial report fills in its tool and model here.