PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, September 18, 2022

[FIXED] What does the mozdisallowselectionprint attribute in PDF.js do?

 September 18, 2022     firefox, pdf.js, printing, printing-web-page, selection     No comments   

Issue

Firefox' built-in PDF viewer, PDF.js, has a mozdisallowselectionprint attribute on the <html> tag. What does this attribute do?


Solution

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..

Print dialog with the option to print a selection disabled.
(source: broward.edu)

mozDisallowSelectionPrint is available from Firefox 19 and onwards.



Answered By - user2428118
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing