Printing

Differences between revisions 41 and 42
Revision 41 as of 2016-11-17 15:23:41
Size: 24086
Editor: mpt
Comment: + reply to juancarlospaco
Revision 42 as of 2016-11-17 15:42:07
Size: 23953
Editor: mpt
Comment: condenses “Rationale”
Deletions are marked like this. Additions are marked like this.
Line 115: Line 115:
But for users, this approach was error-prone, inefficient, and complex. It was error-prone because if the print preview was requested before the Print dialog, it failed to show the effects of settings changed in the Print dialog, contributing to mistaken choices — as well as discouraging people from using the print preview altogether, contributing to further mistakes. It was inefficient because even when Print dialog choices ''could'' be previewed, this usually resulted in the Print dialog disappearing and needing to be reopened later — and/or the preview was a static PDF that didn’t update to reflect later choices. And it was complex because it resulted in an app’s “File” menu containing two or three menu items devoted to printing, rather than just one.

Instead, today, the state of the art — demonstrated in Chrome/Chromium, in OS X, in iOS, and in a current draft design for Gnome — is for the print preview, app-independent print settings, and app-specific print settings (if any) to be present all in the same dialog. This lets you see the effect of settings without navigating to a separate window and back again. It also lets the Print dialog show the number of sheets to be printed, so that you can make adjustments accordingly, which was not possible when the Print dialog was dismissed before the app had even assembled the print job. (Any document-specific Page Setup dialog should still be separate, because it should exist only if it affects things that aren’t printing anyway.)
But for users, this approach was error-prone, inefficient, and complex. Error-prone, because if the print preview was requested before the Print dialog, it failed to show the effects of settings changed in the Print dialog, contributing to mistaken choices. Inefficient, because even when Print dialog choices ''could'' be previewed, this usually resulted in the Print dialog disappearing and needing to be reopened later — and/or the preview was a static PDF that didn’t update to reflect later choices. And complex, because it resulted in an app’s “File” menu containing two or three menu items devoted to printing, rather than just one.

Instead, today, the state of the art — demonstrated in Chrome/Chromium, in OS X, in iOS, and in a current draft design for Gnome — is to combine the '''print preview, app-independent print settings, and any app-specific print settings all in the same dialog'''. This lets you see the effect of settings without navigating to a separate window and back again. It also lets the Print dialog show the number of sheets to be printed, so that you can make adjustments accordingly, which was not possible when the Print dialog was dismissed before the app had even assembled the print job. (Any document-specific Page Setup dialog should still be separate, because it should exist only if it affects things that aren’t printing anyway.)

Matthew Paul Thomas, Canonical

This is an incomplete but living specification for how printing should work in Ubuntu. Eventually it will cover printer setup, settings, the Print dialog, and event notifications.

Printer properties

Icon for a printer

In theory, a PPD can provide a customized icon representing that particular printer model. In practice, hardly any printers do.

For the purpose of this specification, a printer’s icon is the custom icon in the PPD if there is one, otherwise a generic printer icon. In either case, the icon should be overlaid with an error emblem if the printer has an error; otherwise the Warning /!\ warning icon if the printer is low on paper or supplies.

Listing manually configured vs. broadcast printers

(bug 314408)

printers-listed.png

Ubuntu can use printers that are set up manually, and printers that are broadcast by a remote Cups server. Broadcast printers are a security issue: An attacker might set up a printer nearby with a name that seems to be associated with your organization, tricking you into printing confidential information to that printer. (A similar issue exists with Wi-Fi networks.)

To avoid this, we should not ask people whether they “trust” a printer. Instead, wherever available printers are listed, they should be listed in up to three sections:

  1. The default printer, with the heading “Default printer” whenever there are any other printers;
  2. “Configured printers”, Whenever there are any;
  3. “Discovered printers”, whenever there are any.

“Printers” settings

The “Hardware” section of System Settings should have a “Printers” panel. The panel should list available printers, and show status and settings for each one.

settings-printers.wide.gif

(The settings are placed alongside the printer list, and the settings categories avoid hierarchical navigation, so that you can easily compare the same status or setting for different printers. For example, before printing a large print job, you can easily flick through to see which printer has the most toner. The settings categories are shown in a radio menu, rather than tabs, because the number of categories depends on the printer and is often large.)

The printer list

settings-printers-list.png

settings-printers-categories.png

“Printer status”

settings-printers-status.png

If you choose “Manage Print Jobs”, the jobs window for that printer should open (if it is not open already) and take focus.

As much as practical, the controls in the “Copies & Pages”, “Job Details”, “Color”, and “Finishing” sub-panels should be presented in the same way, and in the same order, as the equivalent controls in the Print dialog.

“Policies”

settings-printers-policies.png

“Allowed users”

settings-printers-allowed-users.png

“Installable options”

settings-printers-installable-options.png

“Printer options”

The “Printer options” view is auto-generated from information from the printer driver.

“Copies & Pages”

settings-printers-copies-pages.png

“Page Setup”

TBD

Other settings categories

The other categories of printer settings are auto-generated based on information from the printer driver.

Adding a printer

(Cups event: printer-added)

A printer may be plugged in and recognized automatically, or manually added through system-config-printer.

If a new printer is plugged in and recognized automatically while a Print dialog is open, the dialog should update to select it as the printer for that print job.

If a new printer is plugged in and recognized automatically while the Printers panel of System Settings is open, the list of printers should scroll to show the new printer, and it should be selected in the list.

If a new printer is plugged in and recognized automatically while neither a Print dialog nor System Settings (any panel) is open, System Settings should open to the Printers panel, the list of printers should scroll to show the new printer, and it should be selected in the list. (This is analogous to a USB storage device window opening when it is connected.)

Removing a printer

(Cups event: printer-removed)

TBD: If you have jobs queued on the printer you’re removing, the confirmation alert should let you move them to another printer.

There should be no notification when you remove a printer. If a Print dialog is open when you remove a printer, it should disappear from the list of printers. If that printer was selected, the dialog should revert to the default printer.

Rationale

In the 1990s and 2000s, most apps provided print UI using a Print dialog, sometimes a separate Print Preview window, and (for documents with persistent page layout) a Page Setup dialog. This made architectural sense for slow PCs, because it allowed the operating system to provide a consistent Print dialog, and rendering the print preview was often a slow process.

print-ui-abiword.small.png

AbiWord is an example of this traditional model: a Print dialog, a separate Print Preview window, and a separate Page Setup dialog (not shown).

But for users, this approach was error-prone, inefficient, and complex. Error-prone, because if the print preview was requested before the Print dialog, it failed to show the effects of settings changed in the Print dialog, contributing to mistaken choices. Inefficient, because even when Print dialog choices could be previewed, this usually resulted in the Print dialog disappearing and needing to be reopened later — and/or the preview was a static PDF that didn’t update to reflect later choices. And complex, because it resulted in an app’s “File” menu containing two or three menu items devoted to printing, rather than just one.

Instead, today, the state of the art — demonstrated in Chrome/Chromium, in OS X, in iOS, and in a current draft design for Gnome — is to combine the print preview, app-independent print settings, and any app-specific print settings all in the same dialog. This lets you see the effect of settings without navigating to a separate window and back again. It also lets the Print dialog show the number of sheets to be printed, so that you can make adjustments accordingly, which was not possible when the Print dialog was dismissed before the app had even assembled the print job. (Any document-specific Page Setup dialog should still be separate, because it should exist only if it affects things that aren’t printing anyway.)

print-ui-chromium.small.png

Chromium on Ubuntu. The number of sheets to be printed, displayed at top left, depends on headers and footers (an app-specific setting), as well as number of copies, paper size, and duplex (normally app-independent settings).

print-ui-os-x.small.png

The standard print sheet in OS X. App-independent settings are at the top, app-specific settings below. The preview at left changes based on both.

print-ui-iphone.small.png

iOS printing this specification on an iPhone. Pages removed from the “Range” are greyed out in the preview below.

To achieve this, the app and the Print dialog should be able to communicate in four ways:

  1. The app should be able to invoke the Print dialog with suggested defaults for some app-independent settings. For example, if you are printing a photo that has a landscape aspect ratio, the app should be able to set the page orientation to landscape by default. Or if you are printing an A3-sized document, the app should be able to suggest A3 paper size, disregarded if the printer can’t print at that size.
  2. The app should be able to provide the Print dialog with UI for setting app-specific options, if any, and should be able to perform validation and dependency changes on those controls (because often they will be too interdependent to be declarative). (Compare OS X addAccessoryController, Windows PrintDlg.)

  3. The Print dialog should be able to notify the app about changes the user has made to app-independent print settings that will affect how the app prints, particularly page dimensions and color settings. (For example, a Web browser will print a page differently depending on page size, just as it displays the page differently depending on window size. And a map app may adapt its output to black-and-white printing differently from how a spreadsheet does.) (Compare Android onLayout().)

  4. The app should be able to provide the print system with an updated preview of the print job, whenever either app-independent print settings or app-specific settings change in the Print dialog. The OS can then transform that preview based on color and N-up printing settings, before updating the preview shown in the dialog.

print-ui-structure.png

This does not mean that every app must have app-specific print settings; many won’t. And it does not mean that every app must provide a live preview. If there are no app-specific settings, and the file is a common type such as a bitmap or PDF, the app may not need to be involved at all, because the OS can provide its own preview.

Structure

print-dialog.narrow.png

Basic job options

The basic options are choosing a printer, number of copies, and page range.

TBD: Add duplex.

The “Printer:” menu should contain a list of all known printers, a separator if there are any, “Add Printer…”, a separator, and Create PDF”. The default should be the default printer if there is one, or “Create PDF” if there is not.

The default value for “Copies:” should be:

  1. the value supplied by the app, if any (for example, the number of copies the previous time that document was printed);
  2. otherwise the previous value set for any print job in that app, if any;
  3. otherwise 1.

The field should allow only numeric characters.

In the page range controls:

  • “Current page” and “Selection” should be present if the application specifies that these are meaningful for the current job.
  • For simplicity, the dependent controls for “Range” should be two fields that accept only digits, dashes, and commas.
    • By default, the fields should contain “1” and the number of sheets in the job, making it easier to (for example) omit the last page.
    • Choosing “Range” should focus the first field.
    • In the first field, typing “-” should automatically focus the next field (since other platforms allow entering a range that way).
    • As an advanced trick for people who want to print non-consecutive pages, typing a comma in either field should automatically convert them to a single field. If you typed the comma in the first field, the combined field should contain only the contents of the first field. If you typed the comma in the second field, the combined field should contain the current range in the form “{from}-{to},”. Either way, the caret should be placed at the end, ready to enter more pages.

The “Y pages on Z sheets” text should update instantly to reflect the number of copies and the page range.

Printing

(Cups events: connecting-to-device, job-created)

printing-launcher.png

Whenever you queue a print job, if the jobs window for that printer is not open already, it should open: minimized on the PC, and in the background on other form factors. Each printer in this state should appear as its own application in the Launcher.

The name of the Launcher item (as shown in its tooltip) should be the name of the printer. The icon should be the icon for the printer, including any emblem showing state. When any jobs are queued or printing, the icon should also have a standard Launcher badge with the combined number of jobs. And if all non-cancelled jobs have been successfully completed, it should have a green checkmark emblem. (The window should not close by itself, though you can close it at your leisure.)

Each printer Launcher item should have a quicklist menu, containing a “Pause” item, followed by an item of the form “Cancel 1 Job” or “Cancel All 14 Jobs”.

When a version of Ubuntu implementing this Launcher item is installed, com.canonical.Unity.Panel systray-whitelist should be rewritten to remove scp-dbus-service (because the system-config-printer notification area item is no longer needed).

Printing succeeds

(Cups event: job-completed)

printing-completed.png

On all form factors, when a print job completes, a notification should appear. It should have the icon of the printer, the name of the printer as its title text, and body text of the form ‘“Name of Job” has printed.’

Something goes wrong

Some of these error conditions involve an alert. This is a dialog that emits the standard alert sound (if any) when it opens, and requests attention if it opens in the background. Because it does not have a parent, it should have the title “Printing Error”, and a minimize button and no other buttons in its title bar. It should use the printer’s icon, overlaid by the error or warning emblem as appropriate.

error-alert.png

error-alert.narrow.png

Erratum: “Printing Problem” should be “Printing Error”.

Erratum: The alert should have a title, “Printing Error”.

The secondary text for all of these alerts should be:

  • “You have {number of jobs} jobs queued to print on this printer.”, if the alert is appearing because you are printing to the printer.
  • “There are {total number of jobs} jobs queued to print on this printer.”, if the alert is appearing because you look after the printer.

Missing software

If Cups reports the cups-missing-filter event, an alert box should appear: ‘The printer “Name of printer” can’t be used, because required software is missing.’ unless this is job-specific

A cover or door is opened

If Cups reports the event cover-open or door-open, an error alert box should appear: ‘A cover is open on the printer “Name of printer”.’, or ‘A door is open on the printer “Name of printer”.’, respectively.

Printer gets low on toner, paper, or other supplies

(Cups events: printer-state-changed "toner-low", "media-low", "marker-supply-low")

There should be no notification when a printer becomes low on toner, paper, or other supplies, unless you have print jobs in progress or queued for that printer.

If you do, then:

  • If System Settings is not open, a notification should appear with:
    • the icon of the printer,
    • primary text ‘The printer “Name of Printer” is low on toner.’, ‘The printer “Name of Printer” is low on paper.’, or ‘The printer “Name of Printer” is low on supplies.’
    • secondary text of the form “1 job in progress” or “2 jobs queued” or “1 job in progress, 2 queued”.
  • If System Settings is open displaying any panel other than “Printing”, an error alert box should open, with the same icon, primary and secondary text as for the notification above, and buttons “Pause Printer”, and “Continue Anyway”. If you choose “Pause Printer”, System Settings should navigate to “Printing”, navigate to the printer in question (revealing the low-toner/low-paper/low-supplies warning in the settings interface), and request focus.
  • If System Settings is open displaying “Printing”, it should navigate to the printer in question (revealing the low-toner warning in the settings interface), and request focus.

Printer runs out of toner, paper, or other supplies

(Cups event: printer-state-changed "toner-empty", "media-empty", "marker-supply-empty")

There should be no notification when a printer runs out of toner, paper, or other supplies, unless you have print jobs in progress or queued for that printer.

If you do, then:

  • If System Settings is not open, an alert should appear with:
    • primary text ‘The printer “Name of Printer” is out of toner.’, ‘The printer “Name of Printer” is out of paper.’, or ‘The printer “Name of Printer” is out of supplies.’
    • secondary text of the form “1 job in progress” or “2 jobs queued” or “1 job in progress, 2 queued”
    • buttons “Settings…” and “OK”.
    If you choose “Settings…”, System Settings should open to “Printing”, navigate to the printer in question (revealing the error in the settings interface), and request focus.
  • If System Settings is open, it should navigate to “Printing” if necessary, navigate to the printer in question (revealing the error in the settings interface), and request focus.

If a Print dialog is open with that printer selected, it should remain selected, but its icon should have an error emblem, and “Print” should be disabled. The error message “ (X) This printer is out of toner.” or equivalent should appear alongside the “Cancel” and “Print” buttons, to explain why “Print” is disabled.

Printer goes offline

(Cups event: offline)

There should be no notification when a printer goes offline, unless you have print jobs in progress or queued for that printer.

If you do, then:

  • If System Settings is not open, an alert should appear with:
    • primary text ‘The printer “Name of Printer” has gone offline. Check that it is still connected to power.’
    • secondary text of the form “1 job in progress” or “2 jobs queued” or “1 job in progress, 2 queued”
    • buttons “Settings…” and “OK”.
    If you choose “Settings…”, System Settings should open to “Printing”, navigate to the printer in question (revealing the error in the settings interface), and request focus.
  • If System Settings is open, it should navigate to “Printing” if necessary, navigate to the printer in question (revealing the error in the settings interface), and request focus.

If a Print dialog is open with that printer selected, it should remain selected, but its icon should have an error emblem, and “Print” should be disabled. The error message “ (X) This printer is offline.” should appear alongside the “Cancel” and “Print” buttons, to explain why “Print” is disabled.

Miscellaneous error

(Cups event: other "Printer error"`)

There should be no notification for a miscellaneous error, unless you have print jobs in progress or queued for that printer.

If you do, then:

  • If System Settings is not open, an alert should appear with:
    • primary text ‘The printer “Name of Printer” has an unknown problem.’
    • secondary text of the form “1 job in progress” or “2 jobs queued” or “1 job in progress, 2 queued”
    • buttons “Settings…” and “OK”.
    If you choose “Settings…”, System Settings should open to “Printing”, navigate to the printer in question (revealing the error in the settings interface), and request focus.
  • If System Settings is open, it should navigate to “Printing” if necessary, navigate to the printer in question (revealing the error in the settings interface), and request focus.

If a Print dialog is open with that printer selected, it should remain selected, but its icon should have an error emblem, and “Print” should be disabled. The error message “ (X) This printer has an unknown problem.” should appear alongside the “Cancel” and “Print” buttons, to explain why “Print” is disabled.

Multiple errors

For now, multiple errors with the same printer should be presented separately. They may be combined in future if this turns out to be useful.

Other events

(Cups event: job-stopped)

There should be no notification if a job is stopped, assuming that you stopped it yourself.

Similar work

Ideas

  • On the first window drawing on this page, have you considered using Tabs instead of the Combo that says "Printer Status" ?, (it also eliminate the redundancy of Show Jobs Button). - juancarlospaco

    • Unfortunately it isn’t practical to use tabs, because (a) the number of categories is variable, depending on the printer, and (b) even if the printer didn’t add any categories, there wouldn’t be enough space for the standard categories to fit as tabs. I’ve now fixed the “Show Jobs” redundancy by making it a separate window launched from the first category, rather than being its own category. Using standalone windows will allow things like dragging a queued job from one printer to another. —mpt
  • On "toner-empty" status, making the "Print" button inactive is a very bad idea, in my opinion. The machine is trying to be smarter than the user this way. Consider two situations: 1. The toner isn't empty, only the system thinks it is (I'm encountering this right now - I bought a new original toner and Ubuntu says there's no toner left) 2. There's very little toner left, but the printer tells Ubuntu it's empty - the user won't be able to use that little left. -- Both situations are real-life situations and with the new functionality it wouldn't be possible to override this. I don't think a "toner-empty" message should be treated as high-profiled as a paper-jam for example. - Wojtek Krawczak

Printing (last edited 2017-01-20 13:19:36 by mpt)