What is this?
pdfmake is a PDF document generation library written in pure JavaScript that works both server-side (Node.js) and client-side (browser).
Is it a framework or a library?
It is a library you import into your own Node.js or browser project to generate PDFs programmatically, not a standalone app.
How do I add it to a project?
Install via npm or yarn, then build from source with the provided scripts; there's also a playground to try it without installing anything.
Does it rely on other libraries internally?
It depends on pdfkit for low-level PDF rendering, plus linebreak and xmldoc internally; it requires Node.js 20 or newer to build.
Where does it run?
It runs on Node.js servers and directly in web browsers since it is pure JavaScript.
What layout features does it support out of the box?
It supports line-wrapping, text alignment, numbered and bulleted lists, tables with column/row spans and auto/fixed/star-sized widths, multi-column newspaper-style layouts, images, vector graphics, headers/footers, page numbers, margins, custom page breaks, embedded fonts, and table of contents.
Can I set PDF metadata like author or subject?
Yes, pdfmake provides helper methods for setting document metadata such as author and subject, plus methods for opening, printing, or downloading the generated PDF.
What are similar projects?
react-pdf, pdfcn, pdfkit, jsPDF, sghtmltopdf, ReLaXed, handout-remake, pdfcraft
Which topics is it in?
pdf-generation, document-processing, pdf, backend, npm, frontend, nodejs, library, javascript, web, mit, open-source