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

styles: add page size, review margins #77

Merged
merged 1 commit into from
Mar 24, 2023
Merged

Conversation

martinetd
Copy link
Contributor

weasy print's css supports the @page 'size' attribute, allowing us to specify a pdf size different from the default A4 size.

The remarkable is 1872 x 1404 pixels, but using that makes fonts too small without further adjusments so setting a page size of half that is easier to use.

Having a proper page size, we can re-adjust the margins to better fit the new format. Also made the space between columns in FifthAvenue slightly bigger as a matter of taste.

Fixes: #75


Sorry for the delay, here's the PR. Since I brought it up in the issue I've also done a similar modification to Academy as some documents render better with a single column.

The margins are up to discussion (sorry for switching to metrics, I couldn't understand inches if my life depends on it -- might want to switch to something like em for compromise if you're similar the other way around :P) ; I honestly didn't spend very long fiddling with them.
I'd attach a sample document with that but github doesn't seem to allow attachments here, so I guess we'll do without...

weasy print's css supports the @page 'size' attribute, allowing us
to specify a pdf size different from the default A4 size.

The remarkable is 1872 x 1404 pixels, but using that makes fonts too
small without further adjusments so setting a page size of half that is
easier to use.

Having a proper page size, we can re-adjust the margins to better fit
the new format. Also made the space between columns in FifthAvenue
slightly bigger as a matter of taste.

Fixes: j6k4m8#75
@j6k4m8
Copy link
Owner

j6k4m8 commented Mar 24, 2023

This is so awesome @martinetd!! Thank you so much for contributing! Pending these status checks, I'll merge it in :D 🎉

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (cf0c702) 33.28% compared to head (15f3981) 33.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #77   +/-   ##
=======================================
  Coverage   33.28%   33.28%           
=======================================
  Files          19       19           
  Lines         688      688           
=======================================
  Hits          229      229           
  Misses        459      459           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@j6k4m8 j6k4m8 merged commit 6ef944d into j6k4m8:master Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pdf page size
2 participants