Open PetrosKalafatidis opened 6 years ago
Is the margin being added on top of your page height and width?
Does it make it right to set the page_height to 10.9in?
You might also try playing with the dpi
, zoom
and disable_smart_shrinking
options.
Some people report that different systems have different default dpi setup in their headless configs.
Here's a related issue thread with some suggestions: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2893
Let me know what ends up working for you!
Thanks for your response, if I pass parameter zoom: 10 everything looks fine, but this is not acceptable because this will probably going to be broken in my server, what setting on my machine could probably affect the result ?
No 10.9in does not solves the problem,
I think your screen resolution, as well as the screen resolution of your headless xserver is a factor.
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2171
I've seen it get really crazy on a 4k monitor, the pdf coming out postage stamp sized. Try specifying a dpi of 96 and disabling smart shrinking. Maybe update wkhtmltopdf
if you are being affected by one of the issues reported in the linked issues.
I have tried disable_smart_shrinking: true, dpi: '96' Also reinstall the wkhtmltopdf this morning but nothing yet.
In my controller I am trying to create a new pdf when I use px works
When I use 'in' the page is too big.