搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

microsoft print to pdf, prints only one page in Firefox

  • 2 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 cdnhermit

more options

When I want to print Ctrl & P using Microsoft print to PDF, it prints only one (1) page. This appears to be a problem with Firefox Quantum (up to date) as this is not occurring with Edge. Here is an example of pages :https://docs.microsoft.com/en-us/windows/desktop/winmsg/windowing

Print range is set to All.

This is appening all the time on microsoft pages and the help person at Microsoft confirmed that it is a Firefox problem as this does not occur in their Edge browser.

When I want to print Ctrl & P using Microsoft print to PDF, it prints only one (1) page. This appears to be a problem with Firefox Quantum (up to date) as this is not occurring with Edge. Here is an example of pages :https://docs.microsoft.com/en-us/windows/desktop/winmsg/windowing Print range is set to All. This is appening all the time on microsoft pages and the help person at Microsoft confirmed that it is a Firefox problem as this does not occur in their Edge browser.

被選擇的解決方法

Yes, this is a problem with the flex layout rule. Firefox can handle flex correctly on screen, but is unable to properly insert page breaks into elements that use flex layout. This is happening on more sites as adventurous developers try newer layout methods, and there isn't an all-purpose workaround for it, the reason being that site designs are too diverse.

A "hack" for that Microsoft layout would be to inject this style rule into the page:

@media print {
    body, div {
        display: block !important;
    }
}

What that does is override alternative display values for the body and for each div in the page. Unfortunately, on some sites that can make some hidden content visible and muck up your printout in a different way, but it works for that site.

So how would you use that?

You can inject style rules into sites automatically using an add-on such as Stylus, or there are other methods. If you want to try Stylus:

(1) Install Stylus from the Add-ons site:

https://addons.mozilla.org/firefox/addon/styl-us/

(2) While viewing the Microsoft page, click the Stylus icon, then on the drop-down, where it says Write style for: click docs to limit your rules to pages on docs.microsoft.com

<center></center>

(3) Stylus will open an editor in a separate tab. Here you can paste the rule. Then click the Save button. (See second attached screenshot.) You're done with this tab.

(4) If you return to the Microsoft page and use Print Preview, you should now see the full table. (See third attached screenshot.) Possibly you might have to reload the page for the rule to apply.

Naturally, these little style hacks tend to be a bit different from one site to the next, but for the flex problem, this is the usual workaround. Hopefully this will get fixed soon, but print fixes often lag behind other issues.

從原來的回覆中察看解決方案 👍 0

所有回覆 (2)

more options

選擇的解決方法

Yes, this is a problem with the flex layout rule. Firefox can handle flex correctly on screen, but is unable to properly insert page breaks into elements that use flex layout. This is happening on more sites as adventurous developers try newer layout methods, and there isn't an all-purpose workaround for it, the reason being that site designs are too diverse.

A "hack" for that Microsoft layout would be to inject this style rule into the page:

@media print {
    body, div {
        display: block !important;
    }
}

What that does is override alternative display values for the body and for each div in the page. Unfortunately, on some sites that can make some hidden content visible and muck up your printout in a different way, but it works for that site.

So how would you use that?

You can inject style rules into sites automatically using an add-on such as Stylus, or there are other methods. If you want to try Stylus:

(1) Install Stylus from the Add-ons site:

https://addons.mozilla.org/firefox/addon/styl-us/

(2) While viewing the Microsoft page, click the Stylus icon, then on the drop-down, where it says Write style for: click docs to limit your rules to pages on docs.microsoft.com

<center></center>

(3) Stylus will open an editor in a separate tab. Here you can paste the rule. Then click the Save button. (See second attached screenshot.) You're done with this tab.

(4) If you return to the Microsoft page and use Print Preview, you should now see the full table. (See third attached screenshot.) Possibly you might have to reload the page for the rule to apply.

Naturally, these little style hacks tend to be a bit different from one site to the next, but for the flex problem, this is the usual workaround. Hopefully this will get fixed soon, but print fixes often lag behind other issues.

more options

I mark it as solved but right now I can not validate. But you seem to know the problem and offer a workaround. I will try that and let you know. Thank you.