We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@page
1.49.1
A simple python program to reproduce the issue: https://gist.github.com/Jwiggiff/b451f65fc6910c29ff50ffd3f118f2b4
I expect no margin to be added to the printed PDF. i.e. the crop marks should be at the edge of the page, and it should be a one page PDF.
It seems playwright adds a margin to the PDF.
This specifically happens when the HTML contains a CSS @page rule, but the page.pdf call has prefer_css_page_size=False.
page.pdf
prefer_css_page_size=False
I've also tried adding margin: 0 in the @page rule as well as setting all margins to 0 in the page.pdf call.
margin: 0
- Operating System: [Ubuntu 22.04, MacOS 15.1.1] - CPU: [Apple M2 Pro] - Browser: [Chromium] - Python Version: [3.12] - Other info:
The text was updated successfully, but these errors were encountered:
For PDF, it is what it is, we just return what browser generates, it is not standardized.
Sorry, something went wrong.
No branches or pull requests
Version
1.49.1
Steps to reproduce
A simple python program to reproduce the issue:
https://gist.github.com/Jwiggiff/b451f65fc6910c29ff50ffd3f118f2b4
Expected behavior
I expect no margin to be added to the printed PDF. i.e. the crop marks should be at the edge of the page, and it should be a one page PDF.
Actual behavior
It seems playwright adds a margin to the PDF.
Additional context
This specifically happens when the HTML contains a CSS
@page
rule, but thepage.pdf
call hasprefer_css_page_size=False
.I've also tried adding
margin: 0
in the@page
rule as well as setting all margins to 0 in thepage.pdf
call.Environment
The text was updated successfully, but these errors were encountered: