![பயர்பாக்ஸ் logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
reflow text with larger font for printout within paper bound
I visit the page http://paragraf1.cappelendamm.no/c165513/sammendrag/vis.html?tid=205854 and try to print it out.
The result is "scaled to fit page", and has a very small font. I can print in landscape mode, that solves the problem in this particular case, but I would like to be able to print in portrait mode.
If I scale the print to 100%, much of the text disappears to the right of the paper border.
I wish there were a control to re-layout the text using larger fonts without increasing the total width of the layout.
Is there a way?
தீர்வு தேர்ந்தெடுக்கப்பட்டது
The site has cleverly created a style sheet that removes the first column of the three column table when you print, but they overlooked the fact that the table width is fixed in pixels to a width too wide for portrait printing.
In this and many other cases, you can manually "hack" the page to print better, but unfortunately, there is no one-size-fits-all solution to this problem.
For example, in this case, you can remove the width setting from the three-column table with a snippet of JavaScript code.
(1) Select the following script and copy it to the clipboard:
var tables=document.querySelectorAll("table"); for (var num=0; num<tables.length; num++){tables[num].removeAttribute("width");}
(2) Open the web console by pressing Ctrl+Shift+k (it's also on the Web Developer menu).
(3) Next to the caret (>) paste the line of script and press Enter to execute it
(4) Try Print Preview to confirm that it worked. You can close the web console using the little "x" in the upper right corner of the pane, or by pressing Ctrl+Shift+k again.
I've always wanted an add-on that could fix up any page for printing, but due to the wide variety of layouts, it's hard to automate. For now, you could try one that lets you tweak the page in the Preview display: Print Edit - Add-ons for Firefox. It takes some practice to select the right element, but if you prefer really clean and usable printouts, it might be worth investing a little time to learn it. As for "smart" printing, maybe someday!
Read this answer in context 👍 0All Replies (2)
தீர்வு தேர்ந்தெடுக்கப்பட்டது
The site has cleverly created a style sheet that removes the first column of the three column table when you print, but they overlooked the fact that the table width is fixed in pixels to a width too wide for portrait printing.
In this and many other cases, you can manually "hack" the page to print better, but unfortunately, there is no one-size-fits-all solution to this problem.
For example, in this case, you can remove the width setting from the three-column table with a snippet of JavaScript code.
(1) Select the following script and copy it to the clipboard:
var tables=document.querySelectorAll("table"); for (var num=0; num<tables.length; num++){tables[num].removeAttribute("width");}
(2) Open the web console by pressing Ctrl+Shift+k (it's also on the Web Developer menu).
(3) Next to the caret (>) paste the line of script and press Enter to execute it
(4) Try Print Preview to confirm that it worked. You can close the web console using the little "x" in the upper right corner of the pane, or by pressing Ctrl+Shift+k again.
I've always wanted an add-on that could fix up any page for printing, but due to the wide variety of layouts, it's hard to automate. For now, you could try one that lets you tweak the page in the Preview display: Print Edit - Add-ons for Firefox. It takes some practice to select the right element, but if you prefer really clean and usable printouts, it might be worth investing a little time to learn it. As for "smart" printing, maybe someday!
Wow, thank you! Indeed it worked. Firefox resized the table to the page width, and formatted the text in the left column using a default size. Exactly as I wanted it.
I am now trying out the PrintEdit addon. I can see how this addon will be very useful in many other cases. In this particular case, the width of the table remains the same even if I also remove the left column (as you say, the print css removes the right column), leaving only the center column. Then Firefox must shrink the whole layout to fit the page.
I hope that one day it shall be possible to use the ctrl-+ and ctrl-- keys in the print preview. I have set view/zoom/magnify text only, and this setting should apply here too.
In the mean time, I have found that setting the minimum font size also applies to prints. In this particular case, since Firefox has to shrink the layout to fit the page, I could solve the problem by setting a minimum font size that compensates the shrinking. That is, if the font size is 12, but the scale is 70%, I only get font size 8.4. By setting the minimum font size to 18, I get font size 12.6
Thank again!