Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

Disabling the ability to print to a PDF in the printer dialog

  • 5 antwurd
  • 2 hawwe dit probleem
  • 9 werjeftes
  • Lêste antwurd fan zeroknight

more options

I have been working on a locked down version of Firefox, and through userChrome.css and mozilla.cfg, I have been able to do get it where it behaves mostly as intended. We are looking for a way to disable the ability to print to PDF within the print dialog in Firefox. There are concerns about the ability to access the dropdown selections within the save as dialogs, that could allow users to access files they should not have access. We don't want to outright disable the ability to print, as printing to a real printer does not cause any issues. Is it possible through the mozilla.cfg or userChrome.css to remove the option to save as a PDF from the Firefox printer dialog?

Thanks for your help!

I have been working on a locked down version of Firefox, and through userChrome.css and mozilla.cfg, I have been able to do get it where it behaves mostly as intended. We are looking for a way to disable the ability to print to PDF within the print dialog in Firefox. There are concerns about the ability to access the dropdown selections within the save as dialogs, that could allow users to access files they should not have access. We don't want to outright disable the ability to print, as printing to a real printer does not cause any issues. Is it possible through the mozilla.cfg or userChrome.css to remove the option to save as a PDF from the Firefox printer dialog? Thanks for your help!

Alle antwurden (5)

more options

You can avoid the Mozilla Save to PDF printer by switching to the system print dialog, go to about:config and change print.prefer_system_dialog to true.

WARNING from the moderator team: Changing Firefox preferences from the about:config page can sometimes break Firefox or cause strange behavior. You should only do this if you know what you're doing. Please read Firefox Advanced Customization and Configuration Options to learn more.

Bewurke troch Paul op

more options

While true, your answer would get rid of the Mozilla option, it would still leave the system default one. It is easy enough to remove from Windows, but Linux does not seem to have a super easy way of restricting it, hence why I was hoping for a way to handle it within Firefox, rather than at the system level.

Appreciate the response though.

more options

As of my last update in September 2021, there isn't a direct way to remove the "Save as PDF" option in Firefox's print dialog using mozilla.cfg or userChrome.css. To address security concerns, consider user access restrictions, printer policies, third-party tools, or potentially building a custom Firefox version. For the latest solutions, check Mozilla's documentation or community support.

more options

Even if you blocked "Save to PDF", the user can still Save As other ways (Ctrl+S). On GNOME you can disable it by changing /org/gnome/desktop/lockdown/disable-save-to-disk to true but the user can still Open files (Ctrl+O).

more options

Firefox 124 will allow blocking file dialogs with the AllowFileSelectionDialogs enterprise policy.