Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Print Media Query in Chrome

1622174839
Jiboux
Pro
Sheet Author
Compendium Curator
Hello there, Has any developper worked already on a version with @media print ? I understand the basics on how to do it with CSS (i.e. format the divs to chose what appears or not ...etc), but I have an important issue on the scaling/page break. The sheet doesn't fit into just one page, but the PDF printer always crops it to one page, without breaking to the next page. If I adjust the zoom in the print preview, I can clearly see all my data, but when in zoom 100%, it doesn't let anything overflow to a second page. I have tried to put my external div wrapper in overflow: visible ! important; in the @media print media query, and also tried to introduce some page-break-after:always ; but never achieved to get a second page. Anyone fought against the same (Testing on Chrome) Thanks
1622212569
Andreas J.
Forum Champion
Sheet Author
Translator
I'm not aware of any sheets or authors who have included @media print CSS in their sheets, but I've collected some minor stuff on the wiki, which could be expanded upon when you or someone makes progress on this: <a href="https://wiki.roll20.net/CSE#Make_sheet_Print-Friendly" rel="nofollow">https://wiki.roll20.net/CSE#Make_sheet_Print-Friendly</a> How easy it it to adjust a sheet to be print friendly can vary greatly depending on how the sheet is made, so can't give any off-hand-advice without seeing the sheet code. Sharing a github link to the sheet code would be useful. Think using the Browser Web Dev Tools to manually edit the live css can help you out in making the print conform better: <a href="https://wiki.roll20.net/Sheet_Author_Tips#Web_Developer_Tools" rel="nofollow">https://wiki.roll20.net/Sheet_Author_Tips#Web_Developer_Tools</a>
1622239232
Jiboux
Pro
Sheet Author
Compendium Curator
Thanks Andreas, The sheet is not currently on Github, because we are in the works for a new version where we would like to integrate the @media print... BTW some of the stuff that you link in the wiki is already done in the base.css (like white background, no background image ...etc)... But really where I am blocked is this overflow to a second page... I'll continue to poll my friend google.&nbsp;
1622313458
Jiboux
Pro
Sheet Author
Compendium Curator
OK, I may have found the trick... For anyone looking at the same I played a bit with the developper tools to force the CSS, and it seems it comes from the wrapper roll20 ui-dialog being position:fixed !important, and when changed to «position: static !important » works OK… Not very familiar with this, but seems should make the trick if I change it in the CSS...