Skip to content

How to install and build a PDFKit branch

alafr edited this page Mar 13, 2017 · 6 revisions
  1. Install NodeJS from https://nodejs.org/en/download/.

  2. Open command line (Windows+R).

  3. Install dependencies with NodeJS:

     npm install browserify coffeeify brfs
    
    • You can install the latest version from the official repository:

         npm install pdfkit
      
    • Or you can use a specific Github branch: (replace USERNAME and BRANCHNAME)

         npm install https://github.com/USERNAME/pdfkit/tarball/BRANCHNAME
      
  4. Compile PDFKit into a single javascript file with Browserify:

     node_modules\.bin\browserify --standalone PDFDocument --transform coffeeify --extension .coffee node_modules\pdfkit\lib\document.coffee > pdfkit.js
    
  5. Usually the compiled file can be found at C:\Users\user\pdfkit.js

Clone this wiki locally