kriansa/h2p — pull request #2 by schmod (2013-06-14 20:27:01+00:00)
Title: Zoom Factors & Sessions

Adds support for passing a page zoom factor to Phantom JS. Phantom's
default zoom (or whatever) seems to produce PDFs with significantly
smaller text than the browser's native print function.

Setting this factor to approximately '1.5' seems to produce PDFs that
are roughly on par with what Chrome prints.

Also, allows us to pass a PHP Session ID to PhantomJS, which is useful
if we need to print pages that require authentication or
session-specific data.

The argument list is starting to get big-ish. We may want to refactor
the code so that the user can pass an associative array of options into
the script, rather than a long list of arguments.