node-html-pdf
node-html-pdf copied to clipboard
There some margins/padding in output pdf
Hello!
When I put <div> with absolute position at (0, 0) it appeared in page at top left corner, but without this style properties it appeared with some margins (or page padding) about 2 x 2 mm. My html don't have any styles. It is possible to deal with it?
Thank you.
p.s. ver. is 2.2.0
Me too. And I've already set border: '0'
@AssKicker0214 I have found solution
body {
margin: 0;
}
try it
Thank you for your information, but it's weird because I don't even have a 'body', I just pass a 'div' to the 'html-pdf' plugin. I've tried your suggestion but nothing happened. Maybe I should pass a whole 'html' instead. Thank you very much!
At 2018-02-27 05:56:56, "code-by" [email protected] wrote:
@AssKicker0214 I have found solution body { margin: 0; } try it
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@AssKicker0214 lets try whole html
Sounds like phantom.js emulates what most browsers do by default, ie. a margin on the body. (and if you're passing a div it will wrap it)
didn't work, same problem here