Every SaaS eventually gets the request 'can I download an invoice for my accountant?' -- here is the decision framework for PDF invoice generation in a Next.js app and how to wire it up without a third-party service.