node-phantom icon indicating copy to clipboard operation
node-phantom copied to clipboard

paperSize

Open DanRamage opened this issue 12 years ago • 2 comments
trafficstars

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

DanRamage avatar Nov 08 '13 20:11 DanRamage

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

michaelklem avatar Feb 16 '14 09:02 michaelklem

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.

markstos avatar Mar 03 '14 19:03 markstos