Skip to content

Implemented print media queries for better PDF layout #3170

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

Merged

Conversation

Chaitanya1672
Copy link
Contributor

@Chaitanya1672 Chaitanya1672 commented Jun 15, 2024

Fixes #3166

Changes:
I have added CSS @media print queries to ensure better PDF formatting. The default print size is set to landscape, which ensures that the entire page content is included, preventing any part of the page from being cut off in the PDF.

Preview:
image

PDF:- p5.js.Web.Editor._.Fog.tank.pdf

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@raclim raclim added the Area:CSS For styling or layout issues handled with CSS/SASS label Jun 16, 2024
Copy link
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on this! I adjusted one property from size to page-orientation in client/components/RootPage.jsx because the orientation still kept showing up as portrait for me, but overall this looks good to me!

I have a small concern that this might look different for other folks as well depending on the browser/devices they're using, but I think that can be addressed as they come up, so I'm going to merge this is!

@raclim raclim merged commit d497382 into processing:develop Jul 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:CSS For styling or layout issues handled with CSS/SASS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add @media print CSS statements to be able to get usefull pdf formatting
2 participants