搜尋 Mozilla 技術支援網站

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

Learn More

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

  • 5 回覆
  • 2 有這個問題
  • 26 次檢視
  • 最近回覆由 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!

所有回覆 (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.

由 Paul 於 修改

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.