Skip to content

Add a "supportsPrinting" viewer-option (bug 1957401) #19816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

Snuffleupagus
Copy link
Collaborator

This will allow us to respect the print.enabled Firefox preference, by extending this method, which will hide the toolbar and secondaryToolbar print-buttons.

This will allow us to respect the `print.enabled` Firefox preference, by extending [this method](https://searchfox.org/mozilla-central/rev/56117379696ea0cffb94cd09c14cd022a8c5e4e8/toolkit/components/pdfjs/content/PdfStreamConverter.sys.mjs#426-453), which will hide the toolbar and secondaryToolbar print-buttons.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/406e6087b17a9da/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/406e6087b17a9da/output.txt

Total script time: 0.85 mins

Published

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@Snuffleupagus Snuffleupagus merged commit 63e6566 into mozilla:master Apr 22, 2025
7 checks passed
@Snuffleupagus Snuffleupagus deleted the bug-1957401 branch April 22, 2025 13:25
@Rob--W
Copy link
Member

Rob--W commented Apr 25, 2025

In addition to this, would it make sense to detect whether printing works, and handle that accordingly? E.g. by displaying a notification, or showing the button after all.

Here is a way to detect whether printing is successful:

matchMedia("print").onchange = e => console.log(e);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants