Open Bug 271744 Opened 20 years ago Updated 2 years ago

Add "Preview" button to Print dialog

Categories

(Toolkit :: Printing, enhancement)

enhancement

Tracking

()

People

(Reporter: biguniversejr, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

It would be really useful to have a "Preview" button (for Print Preview) on the
Print dialog box.  Since many sites have a "Printable Version" option that
launches a Javascript window without menus and toolbars, it is impossible to see
a preview of the page you are about to print.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
hmm, our print dialogs are native. That means there's no, and probably won't be
a preview buttton on windows (not as OS X for example).
Assignee: firefox → core.printing
Component: General → Printing
Product: Firefox → Core
QA Contact: firefox.general
Version: unspecified → 1.0 Branch
Version: 1.0 Branch → Trunk
shouldn't this be marked WONTFIX?
The print dialog on Linux is not native by any means (since there is no native
dialog).

This is really not a core issue but a UI issue; probably need separate bugs for
Seamonkey and Firefox.
Moving to toolkit since this was filed on Firefox.
Assignee: printing → nobody
OS: Windows 2000 → Linux
Product: Core → Toolkit
QA Contact: nobody
QA Contact: nobody → printing
Things have changed in the last few years...

Windows uses http://mxr.mozilla.org/mozilla-central/source/toolkit/components/printing/content/printdialog.xul, which can be adjusted easily.

Linux (GTK2) uses http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsPrintDialogGTK.cpp. Adding GTK_PRINT_CAPABILITY_PREVIEW to nsPrintDialogWidgetGTK::nsPrintDialogWidgetGTK shows the button.
Need to call print preview from nsPrintDialogServiceGTK::Show (case GTK_RESPONSE_APPLY). But how do you call a js function like "PrintUtils.printPreview(PrintPreviewListener);" from there, where PrintPreviewListener is defined by browser.js and viewSource.js, or rather execute the cmd_printPreview command?

Mac uses a native dialog (which we extend by frame options), and already provides print preview.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
Summary: Add "Preview" button on Print Dialog box → Add "Preview" button to Print dialog
(In reply to comment #5)
> Windows uses http://mxr.mozilla.org/mozilla-central/source/toolkit/components/printing/content/printdialog.xul, which can be adjusted easily.

That was wrong, the XUL dialog is only used on OS/2 and Linux-but-not-GTK2-platforms. Windows uses a native dialog as well:
http://mxr.mozilla.org/mozilla-central/source/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.