alexscheelmeyer / node-phantom

bridge to PhantomJS from Node.js
317 stars 117 forks source link

paperSize #76

Open DanRamage opened 11 years ago

DanRamage commented 11 years ago

When trying to create a node-phantom version of the rasterize.js from phantom.js, there is no paperSize attribute available in node-phantom. Is there a way to set the page size for the PDF?

Dan

michaelklem commented 10 years ago

Have you tried something like this: page.set('paperSize',{format: 'Letter', orientation: 'landscape'},function(err){});

markstos commented 10 years ago

There's an unmerged pull request that adds paper size support. See here:

https://github.com/tmorozov/node-phantom/commit/a0f3de61450332fc47eb6f077022c1bb1a44fc36

I've haven't tested it myself.