/// <reference path="PhantomPdfGenerator.js"/>

var system = require('system');
var webpage = require('webpage');
phantom.injectJs('PhantomOutput.js');
phantom.injectJs('PhantomInit.js');
phantom.injectJs('Measure.js');
phantom.injectJs('MarginMeasure.js');
phantom.injectJs('PhantomPdfRenderer.js');
phantom.injectJs('PhantomPdfGenerator.js');

var generator = new PhantomPdfGenerator(console, system.stdin, webpage.create);
generator.waitForInputThenGenerate();