1

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

Note: for information about the other attribute on the HTML tag in PDF.js, see What does the mozdisallowselectionprint attribute in PDF.js do?.

user2428118
  • 7,935
  • 4
  • 45
  • 72

1 Answers1

6

The mozNoMarginBoxes attribute is available since Firefox version 22. It was added to Firefox to allow web pages to stop Firefox from adding the URL, page numbers and other things to the page margin when printing a document.

This is the print preview for a document without mozNoMarginBoxes:

Print preview for a document without <code>mozNoMarginBoxes</code>

And this is the print preview for a document with mozNoMarginBoxes:

Print preview for a document with <code>mozNoMarginBoxes</code>

Note that initially, the web page properties were still being displayed in the page margin when looking at the print preview. This got fixed in Firefox 29.

user2428118
  • 7,935
  • 4
  • 45
  • 72