Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

reflow text with larger font for printout within paper bound

  • 2 件の返信
  • 1 人がこの問題に困っています
  • 12 回表示
  • 最後の返信者: Cacadril

more options

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?

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!

この回答をすべて読む 👍 0

すべての返信 (2)

more options

選ばれた解決策

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!

more options

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!