Latest commit f5b4f67 Dec 11, 2016 @devongovett committed on GitHub Merge pull request #579 from M3ssman/master
Enhanced Doc for standard Fonts
Failed to load latest commit information.
fonts Add new self-generating guide Feb 18, 2014
.gitignore Add script to generate website Feb 23, 2014 Update docs Nov 28, 2014 Make sure doc scripts current directory is right Apr 14, 2014 Turn github highlighted code blocks into normal markdown code blocks Apr 14, 2014 Fix paper sizes link Oct 28, 2016
guide.pdf Rebuild pdf guide Aug 26, 2016 Update Nov 7, 2016
template.jade Add link to browser demo in docs Apr 14, 2014 Merge pull request #579 from M3ssman/master Dec 10, 2016 Fix typo in radialGradient arguments Nov 22, 2016

PDFKit Guide

The PDFKit guide can be read a number of ways. The first is online at You can also read the guide in PDF form, in this directory or online.

Both the website and the PDF guide are generated from the Literate CoffeeScript (runnable Markdown) files in this directory. The examples are actually run when generating the PDF in order to show the results inline. The file in this directory is actually quite short. It parses the markdown files into a tree structure using markdown-js, syntax highlights the code examples using codemirror, compiles and runs the code examples and puts the results inline, and generates the PDF using PDFKit. You can read the generator script source code to get a feeling for how you might do something slightly more complex than the guide itself shows.

The markdown syntax used is pretty much standard, with a couple tweaks.

  1. Code example output is references using the image notation, using the alt text as the example number starting from zero in the current file, and the title as the example output height. E.g. ![x](name "height").

  2. Page breaks are added before h1 and h2s, unless there are two in a row. h3 is treated the same as h2 but can be used to avoid this in the case you need multiple h2s on the same page.

  3. The horizontal rule syntax (* * *) denotes an explicit page break