parallax/jsPDF ? reverse-engineered prompt
Reverse engineered prompt
Build me a JavaScript library that lets people generate PDF files directly in the browser and in Node, without needing a server. I want to be able to create a document, add text, choose page size and orientation, and then download or save the PDF easily. It should work with normal modern JavaScript imports, but also be usable in older setups and through a script tag if needed.
Please include support for things like custom fonts, UTF 8 text, and basic HTML to PDF rendering when the right helper libraries are available. Make sure there are clear examples, simple documentation, and TypeScript support so it’s easy to use in real projects. If you need to, look up current docs online for any tricky browser or Node compatibility details.
Are you gonna build this?
make sure you review the code using coderabbit