Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (26 sloc) 1.43 KB

This is the content for the hacktivity kit.


Conversion toolchain

Prince does not offer as full-featured support for JavaScript as modern browsers do. To allow the use of libraries like jQuery (which Prince currently cannot handle) the files get "compiled" into static HTML before feeding them to Prince.


vandegraaff.js is a node.js script that uses jsdom to load the page, allow any initial JavaScript to run, and dump a static HTML version out. This gets sent to...


You need Prince 8.0 to generate the PDF version of the kit. The free version is fine.

Sample command

cat kit.html | node vandegraaff.js | prince -s stylesheets/print.css -o kit.pdf -

This creates kit.pdf that you can open with your favorite PDF viewer.

With -v, Prince may report errors like:

prince: kit.html:9: error: Tag section invalid<

These don't affect processing and should disappear with upcoming releases of Prince.


Ideally, all tests should be viewed in both a browser and converted to PDF to ensure compatability in both scenarios. The strategy above should work for QUnit pages, which can be compiled to static HTML and viewed in a browser for pass/fail status.