design freebies, tools and inspiration
Tools

pdfmake, Create PDF Files With Javascript

pdfmake - Create PDF files with Javascript

pdfmake is a client and/or server side PDF printing script in pure JavaScript. pdfmake is based on a truly amazing library pdfkit.org

The script is packed with features like :

  • line-wrapping,
  • text-alignments (left, right, centered, justified),
  • numbered and bulleted lists,
  • tables and columns
    • auto/fixed/star-sized widths,
    • col-spans and row-spans,
    • headers automatically repeated in case of a page-break,
  • images and vector graphics,
  • convenient styling and style inheritance,
  • page headers and footers:
    • static or dynamic content,
    • access to current page number and page count,
  • background-layer
  • page dimensions and orientations,
  • margins,
  • custom page breaks,
  • font embedding,
  • support for complex, multi-level (nested) structures,
  • helper methods for opening/printing/downloading the generated PDF.

PDF Preview

Below you will find a screenshot of a PDF file created with pdfmake.

PDF file created with pdfmake

View pdfmake on GitHub

Spread the word