Firefox' built-in PDF viewer, PDF.js, has a mozdisallowselectionprint attribute on the <html> tag. What does this attribute do?
Asked
Active
Viewed 5,540 times
4
user2428118
- 7,935
- 4
- 45
- 72
1 Answers
9
The mozDisallowSelectionPrint attribute was added to Firefox to allow web pages to disable the print selection option in 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".
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.
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..

(source: broward.edu)
mozDisallowSelectionPrint is available from Firefox 19 and onwards.
Glorfindel
- 21,988
- 13
- 81
- 109
user2428118
- 7,935
- 4
- 45
- 72