Closed NoobDoesMC closed 6 years ago
It defaults to the "screen width" (1024). You can set the width
option like this...
converter.image(fs.createReadStream('tagslegend.html'), { format: "png", width: "340" }).pipe(response);
You can run wkhtmltoimage --help
to get more options. The command line arguments map to option names, but instead of hyphens, camel case is used... e.g. the command line argument --foo-bar 123
becomes option fooBar: '123'
I'm trying to render this page into a png:
I am just rendering this like normal:
I get an image back like this:
It's 1024 pixels wide.
I'm expecting a 340 pixel-wide image.