Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

microsoft print to pdf, prints only one page in Firefox

  • 2 réponses
  • 1 a ce problème
  • 1 vue
  • Dernière réponse par 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.

Solution choisie

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.

Lire cette réponse dans son contexte 👍 0

Toutes les réponses (2)

more options

Solution choisie

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.