26
6
I'd like to print a web document on a single page, but Chrome famously doesn't have this feature normally called fit to page or shrink to fit.
Is there a workaround?
26
6
I'd like to print a web document on a single page, but Chrome famously doesn't have this feature normally called fit to page or shrink to fit.
Is there a workaround?
29
Yes, there is a workaround. What we'll do is manually zoom the document with CSS until the contents fit appropriately.
Press F12 to launch Chrome DevTools. Make sure it's on the tab Elements and the <body>
element is selected. Now move to the Styles tab (on the right) and, in element.style
, insert the following: (just click after the opening brace {
)
zoom: 85%;
Hint: don't type the colon (:
) else you'll inadvertently launch something else; instead, just hit TAB after typing zoom
.
Now close DevTools (F12 again) and hit Ctrl+P to launch the print dialog. Check to see if the page is fitting well. If it isn't, retry with another zoom value until it's good!
8
As of version 56 you now you will have an option for Scale in the print preview. However you may have to enable it (I have version 56.0.2924.87). In the Address bar: chrome://flags/#print-scaling and change it to Enabled. This does not solve the "scale to fit" but does get you one step closer.
See this and more enhancements here: https://productforums.google.com/forum/#!topic/chrome/O7nz6Vb1kBM
This is an easier solution – Drakes – 2017-04-26T18:35:00.207
Cool! I'm on 58.0.3029.110 (64-bit)
and it works out of the box. – André Chalella – 2017-06-24T03:11:34.993
2
I only have trouble on a few websites, for them I use the extension:
Full page screen capture
(https://chrome.google.com/webstore/detail/full-page-screen-capture/fdpohaocaechififmbbbbbknoalclacl)
It creates a temporary image in a new tab which then scales correctly when you print that.
1
Whenever I want to print a whole webpage to a page of paper I do a screenshot of the page and use Windows to print the image.
Currently, I use ShareX to do the screenshot of the whole page. There are also Greenshot, Awesome Screenshot and Fireshot which worked for me.
1I can confirm in August 2016 this method works like a charm!
zoom: 85%
seems to be perfect for most pages that otherwise overflow in Chrome print preview. Thanks for posting this! – Eric Hepperle - CodeSlayer2010 – 2016-08-31T18:50:00.370What is 85%? A magic number? – Gherman – 2017-10-17T15:19:04.543
@Gherman it's just a first guess. Read until the end. – André Chalella – 2017-10-17T15:56:11.897
Well, I understand but will the same value work for any other machine? What does it depend on? – Gherman – 2017-10-18T08:06:51.503
If you are a Web developer, you can add
zoom: 85%;
to the HTML element inside a@media print
query. – posfan12 – 2018-05-27T23:38:36.103