In PHP:
\n$request = new HTMLRequest($contentHtml);\n$request->setPaperSize(Request::A4);\n$request->setHeader($headerHtml);\n$request->setFooter($footerHtml);Gotenber version 6.x
\nsetMargins affects just content.html, header.html still has the margin.
$request->setMargins(Request::NO_MARGINS);Hello @idenisovs,
\nCould you try this solution puppeteer/puppeteer#4132 (comment)? If it works, I’ll update the documentation 😄
","upvoteCount":1,"url":"https://github.com/gotenberg/gotenberg/discussions/343#discussioncomment-1303479"}}}-
|
Hi, Is it possible to remove unwanted margin at the top of header? At the moment it look like in the screenshot. In html, body {
margin: 0;
padding: 0;
font-size: 13pt;
}In PHP: $request = new HTMLRequest($contentHtml);
$request->setPaperSize(Request::A4);
$request->setHeader($headerHtml);
$request->setFooter($footerHtml);Gotenber version 6.x
$request->setMargins(Request::NO_MARGINS); |
Beta Was this translation helpful? Give feedback.
-
|
Hello @idenisovs, Could you try this solution puppeteer/puppeteer#4132 (comment)? If it works, I’ll update the documentation 😄 |
Beta Was this translation helpful? Give feedback.
Hello @idenisovs,
Could you try this solution puppeteer/puppeteer#4132 (comment)? If it works, I’ll update the documentation 😄