搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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

  • 5 个回答
  • 2 人有此问题
  • 9 次查看
  • 最后回复者为 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.