@page size not working on firefox
See original GitHub issueHi. I’m using the pageStyle prop to set my document size and it’s working just fine on chrome, but I’m not getting the same result on firefox. What should I do to resize the pdf document on firefox?
This is how I’m using the pageStyle prop:
pageStyle="@page { size: 1754px 1240px; margin: 0px } @media print {html, body {height: 99%}}"
Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Pages won't print because the page size sent to the printer is a ...
My HP says the paper size sent to printer is 8.46 x 10.98 and it waits ... prints pages from Firefox just fine,...
Read more >Unable to set paper size at all when using Firefox built-in PDF ...
If Firefox is not using the whole sheet of paper, this can be caused by Firefox having extracted the wrong paper size settings...
Read more >Websites look wrong or appear differently than they should
This article explains how to fix problems with websites that display incorrectly in Firefox or don't work the way they should.
Read more >Web pages won't fit into browser withour having to scroll < or >
To make things smaller, press Ctrl and - at the same time. To reset the size back to normal, press Ctrl and 0...
Read more >Problem of changing paper size | Firefox Support Forum
When you change Paper Size in Firefox prefs, that size becomes to new default until it is changed again from within Firefox.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I ran into this issue as well trying to achieve landscape orientation. From what I can tell the CSS
@page size
descriptor is not supported in Firefox nor Safari:Seems to be supported in Chrome and Edge among other browsers. So I do not think it is an issue caused by this library.
Unfortunately not. I found one potential hack, rotate the content by 90° in CSS:
transform: rotate(-90deg);
. It might work if you only need to print but the content will be all wrong if saved as a PDF.Due to the inconsistent print behaviour of browsers my next steps will probably be to look into generating PDFs on the server side instead. Perhaps with LaTeX. Or something that gives more fine grained control.