This post describes the author's experience of dynamically generating PDFs using NodeJs and NestJs. Initially struggling with ineffective libraries, the author eventually chose jsPDF and its extension jspdf-autotable for creating features like graphs, charts, tables, images, table of contents, and automatic page numbers. The article includes detailed code snippets for setting up and using these libraries in a NestJs service, including handling installation issues for the canvas library on M-series Apple chips and rendering charts as images with the help of puppeteer.
8 Comments
Sort: