Firefox' built-in PDF viewer, PDF.js, has a mozdisallowselectionprint
attribute on the <html>
tag. What does this attribute do?
Firefox的内置PDF查看器PDF.js在标签上有一个mozdisallowselectionprint属性。这个属性有什么作用?
1 个解决方案
#1
The mozDisallowSelectionPrint
attribute was added to Firefox to allow web pages to disable the print selection option in Firefox.
mozDisallowSelectionPrint属性已添加到Firefox,以允许网页禁用Firefox中的打印选择选项。
Normally, when you select text in a document and then open the print dialog (Ctrl + P or Cmd + P), you can choose the option "Selection" under "Print range".
通常,当您选择文档中的文本然后打开打印对话框(Ctrl + P或Cmd + P)时,您可以选择“打印范围”下的“选择”选项。
Because of the way PDF.js works, selecting this option when viewing a PDF document would either result in empty pages being printed or, for large documents, a browser crash.
由于PDF.js的工作方式,在查看PDF文档时选择此选项会导致打印空页,或者对于大型文档,浏览器会崩溃。
In bug 830278 it was therefore decided to allow web pages, including the PDF viewer, to disable the option to print selections by adding this attribute to the HTML
tag..
因此,在错误830278中,决定允许网页(包括PDF查看器)通过将此属性添加到HTML标记来禁用打印选择的选项。
mozDisallowSelectionPrint
is available from Firefox 19 and onwards.
mozDisallowSelectionPrint可从Firefox 19及以后版本获得。
#1
The mozDisallowSelectionPrint
attribute was added to Firefox to allow web pages to disable the print selection option in Firefox.
mozDisallowSelectionPrint属性已添加到Firefox,以允许网页禁用Firefox中的打印选择选项。
Normally, when you select text in a document and then open the print dialog (Ctrl + P or Cmd + P), you can choose the option "Selection" under "Print range".
通常,当您选择文档中的文本然后打开打印对话框(Ctrl + P或Cmd + P)时,您可以选择“打印范围”下的“选择”选项。
Because of the way PDF.js works, selecting this option when viewing a PDF document would either result in empty pages being printed or, for large documents, a browser crash.
由于PDF.js的工作方式,在查看PDF文档时选择此选项会导致打印空页,或者对于大型文档,浏览器会崩溃。
In bug 830278 it was therefore decided to allow web pages, including the PDF viewer, to disable the option to print selections by adding this attribute to the HTML
tag..
因此,在错误830278中,决定允许网页(包括PDF查看器)通过将此属性添加到HTML标记来禁用打印选择的选项。
mozDisallowSelectionPrint
is available from Firefox 19 and onwards.
mozDisallowSelectionPrint可从Firefox 19及以后版本获得。