Skip to content
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

Page sizes off by one mm? #31

Open
rkaravia opened this issue Nov 15, 2018 · 4 comments
Open

Page sizes off by one mm? #31

rkaravia opened this issue Nov 15, 2018 · 4 comments

Comments

@rkaravia
Copy link

To me it looks like some page size definitions are off by one mm, e.g. the one for A3:

body.A3               .sheet { width: 297mm; height: 419mm }
body.A3.landscape     .sheet { width: 420mm; height: 296mm }

A3 is defined as 297 x 420 mm, so I would expect it to be like this instead:

body.A3               .sheet { width: 297mm; height: 420mm }
body.A3.landscape     .sheet { width: 420mm; height: 297mm }

But maybe there is a reason where some browsers have issues with the "correct" dimensions?
Otherwise I would be happy to submit a PR to adapt them.

@shasderias
Copy link

Probably because of this:

/** Fix for Chrome issue #273306 **/

@cognitom
Copy link
Owner

Hi @rzoller,
As mentioned above, some browser inserts unwanted page-breaks at the end of the page, if we use the exact height like 297mm for A4. That's why. Thanks @shasderias!

@ShynRou
Copy link

ShynRou commented Dec 14, 2018

For those who need a fullscreen background image: you add an absolute element that you set to fill the whole sheet and make sure to add bottom: -1.2mm;.
This will make sure the last millimeter is covered without overlapping to the next page.
Works for me on chromium based browsers.

@rkaravia
Copy link
Author

rkaravia commented Dec 14, 2018

Thanks everyone for your comments and suggestions, I also ended up working around the issue by adapting the padding by 1mm, see code here.

Results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants