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

Generation of A0 PDF #3

Open
tzok opened this issue Sep 13, 2021 · 8 comments
Open

Generation of A0 PDF #3

tzok opened this issue Sep 13, 2021 · 8 comments

Comments

@tzok
Copy link

tzok commented Sep 13, 2021

Is there a way to generate a PDF in A0 format?

Saving a page as a PDF in A0 format does not scale - the PDF is a huge blank page with slides in one column.

@tzok
Copy link
Author

tzok commented Sep 13, 2021

I found that you can print the page using a smaller page size and then resize it manually. The example poster from GitHub fits on the A2 page and after resizing it with Inkscape, it looks fine on A0. So this is a workaround, but maybe you know of a better approach?

Anyway, thanks for this great project regarding academic posters!

@cpitclaudel
Copy link
Owner

(Short answer: type javascript:document.getElementsByTagName("html")[0].style.zoom = 2 in your address bar before printing)

Long answer: Here's what I do (with Chrome):

  • Set Layout to portrait
  • Open 'More settings" section
  • Set paper size
  • Adjust "Scale" to fill the poster

This works up to size A1, where a scale of 170 does the trick.

For size A0, since Chrome doesn't let me increase "scale" past 200, I add a "zoom" property from CSS, and then printing with "scale" set to 115 fills an A0 page:

html { zoom: 2; }

A convenient way to do this is from the address bar, where you can just type javascript: document.getElementsByTagName("html")[0].style.zoom = 2.

(See the discussion in the comments of https://academia.stackexchange.com/a/173015/24520 for a bit more details)

@cpitclaudel
Copy link
Owner

I wonder if it would be worth adding this zoom setting to a "media: print" rule in the stylesheet.

@tzok
Copy link
Author

tzok commented Sep 14, 2021

Great! Thanks a lot. I will definitely give it a try.

@Panadestein
Copy link

Hello @cpitclaudel

Thank you for this very nice project. I was hesitant on whether to open a new issue, because my question is very related to this one. Would it be possible to somehow enforce a two column layout of the poster when printing to PDF? The thing is that some conferences do not accept landscape posters, but only vertical ones.

@cpitclaudel
Copy link
Owner

@Panadestein I can think of two ways to do this. One is to use a CSS grid instead of a flexbox, and force it to have exactly two columns. The second one is to change the flex-direction of main to row instead of column (to get left-to-right, top-to-bottom layout) and then adjust the scale when printing.

@Panadestein
Copy link

Thanks a lot, Clément. The first suggestion worked best for me. I used something in this direction:

grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));

which renders to 2 nice columns when printing to A0 format.

@cpitclaudel
Copy link
Owner

Great news @Panadestein , thanks for the update! If your poster is public, feel free to add a link here :)

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

No branches or pull requests

3 participants