Closed Bug 1669854 Opened 4 years ago Closed 4 years ago

Add an nsIPrintSettings API that frontend code (print.js) can use to provide a set of non-contiguous print ranges

Categories

(Core :: Printing: Setup, task, P1)

All
Unspecified
task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: dholbert, Assigned: emilio)

References

Details

(Whiteboard: [print2020_v84] [old-ui+])

Attachments

(2 files)

Right now, nsIPrintSettings has a getter for non-contiguous page-ranges (GetPageRanges) but there's no setter.

This means that, once we add UI to let users provide non-contiguous page ranges, there's not yet any way for the UI to send those page ranges down to the platform code.

(The getter only has a non-trivial implementation on linux right now, and it's backed by a GTK print dialog API. So the linux-only getter-implementation isn't something that would be usable by our tab-modal print dialog.)

So: we'll need to add a nsIPrintSettings API that the frontend code can use to provide these page ranges; and then these should be made available via the existing GetPageRanges getter.

Once we do that, things should Just Work in the print preview & in actual printed output, thanks to bug 1661868 (which made our page layout code consume & honor the ranges that are provided by the GetPageRanges getter).

Whiteboard: [print2020]
Component: Printing → Printing: Setup
Product: Toolkit → Core
Hardware: Unspecified → All
Version: unspecified → Trunk
Priority: -- → P2
Whiteboard: [print2020] → [print2020_v84] [old-ui+]
Severity: -- → N/A
Priority: P2 → P1
Assignee: nobody → emilio
Flags: needinfo?(emilio)

... which is an array of pairs of ranges, and use it instead of the
existing printRange / startPage / endPage settings.

Flags: needinfo?(emilio)
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e897247f1afc
Add a single pageRanges print setting. r=nordzilla
Blocks: 1675956
Attached file Bug 1669854 - Two minor follow-ups. (deleted) —

One suggested by Jonathan in the review (as the ALLPAGES bit is just 0).

One pointing to bug 1675956, where we could possibly improve the system
dialog to use non-contiguous page ranges.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Regressions: 1681051
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: