Closed Bug 1803576 Opened 2 years ago Closed 1 year ago

Add Save page as PDF action to QuickActions

Categories

(Firefox :: Address Bar, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: daleharvey, Assigned: daleharvey)

References

Details

Attachments

(1 file)

No description provided.
Severity: -- → S3
Priority: -- → P3
Assignee: nobody → dharvey
Blocks: 1812152

David, are you a good person to ask about how I would trigger the print dialog to show ensuring the save to pdf option was selected? This is the code I currently have but it is going straight to the printer right now. Cheers

     let psService = Cc[
        "@mozilla.org/gfx/printsettings-service;1"
      ].getService(Ci.nsIPrintSettingsService);
      let printSettings = psService.createNewPrintSettings();
      printSettings.printerName = "Mozilla Save to PDF";
      lazy.BrowserWindowTracker.getTopWindow().gBrowser.selectedTab.linkedBrowser.browsingContext
        .print(printSettings);
Flags: needinfo?(dshin)

Hm, unfortunately don't know too much about frontend/chrome code.
That said, perhaps printSettings.outputFormat is what you want to modify? This seems relevant..

Flags: needinfo?(dshin)

Cheers David, Mark is there any chance you know who to ask about this? (seen you on a few reviews)

(I tried the above printSettings.outputFormat but got the same results)

I can open the print dialog with

      lazy.BrowserWindowTracker.getTopWindow()
        .document.getElementById("cmd_print")
        .doCommand();

But cant find a way to define settings using that

Flags: needinfo?(mstriemer)

Clearing needinfo, sorted over chat

Flags: needinfo?(mstriemer)
Pushed by dharvey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/42604daaa4d1 Add Save page as PDF Quickaction. r=daisuke,fluent-reviewers,kpatenio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch

:daleharvey could you consider nominating this for a release note? (Process info)

Flags: needinfo?(dharvey)

While this is enabled in nightly, we aren't looking to promote the feature as we are in discussion with rolling it into another feature and this was landed just to make sure it was included in the migration so I think we may want to skip the release notes for this particular patch.

Flags: needinfo?(dharvey)
Depends on: 1866728
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: