PDF generation is one of those things that works perfectly… until real users touch it.

On localhost:

npm run dev

Open Chrome → print → PDF.

Done.