-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header and footer are unusually small #5029
Comments
Both problems you can see here. |
This happens in the Node version as well, so probably best if we look at it from that POV. Repro: const { chromium } = require('playwright');
(async () => {
var browser = await chromium.launch();
var page = await browser.newPage();
await page.goto("https://www.google.com");
await page.pdf({
path: "try.pdf",
headerTemplate: "<h1>Header</h1>",
footerTemplate: "<h1>Footer</h1>",
displayHeaderFooter: true,
margin: { top: "0.2in", bottom: "0.2in", left: "0.2in", right: "0.2in" }
});
await browser.close();
})(); |
Did you try bumping the font size? See https://stackoverflow.com/questions/49943479/puppeteer-header-and-footertemplate-doesnt-work |
Closing as per suggestion above. |
How I can add it center of footer ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I started doing some tests with Playwright Sharp and I needed to add header and footer. I ended with code like this...
Problem is, header and footer are very small. I don't know why. I tried some HTML templates I had, I tried code above. It's always like this.
Second problem is, when I would try to make it bigger with
font-size
style for example, text become bigger but page content except margin space seems to be over header and footer (like wrongzindex
or something). What is happening?Is it Playwright Sharp or main library issue?
The text was updated successfully, but these errors were encountered: