This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 149033 - print dialog setting does not match preview
Summary: print dialog setting does not match preview
Status: RESOLVED WONTFIX
Alias: None
Product: utilities
Classification: Unclassified
Component: Print (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-03 09:32 UTC by myopic4141
Modified: 2008-10-09 19:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans page setup (272.53 KB, image/png)
2008-10-03 09:33 UTC, myopic4141
Details
Text Edit page setup (756.61 KB, image/png)
2008-10-03 09:34 UTC, myopic4141
Details
NetBeans print preview (not a print dialog) (299.55 KB, image/png)
2008-10-03 09:35 UTC, myopic4141
Details
NetBeans print layout dialog (180.61 KB, text/plain)
2008-10-03 09:37 UTC, myopic4141
Details
Text Edit print layout dialog (872.50 KB, image/png)
2008-10-03 09:39 UTC, myopic4141
Details
Desired NetBeans printout (543.72 KB, image/png)
2008-10-07 21:01 UTC, myopic4141
Details
Pages (52.74 KB, image/png)
2008-10-08 11:00 UTC, Vladimir Yaroslavskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description myopic4141 2008-10-03 09:32:42 UTC
The preview, print sequence of NetBeans gives an incorrect print dialog display when setting layout.  This will be
easier to explain via screen shots.  The final printout is as it should be so this will be a look and feel issue.  I saw
it on 6.1 as well.
Comment 1 myopic4141 2008-10-03 09:33:32 UTC
Created attachment 71092 [details]
NetBeans page setup
Comment 2 myopic4141 2008-10-03 09:34:37 UTC
Created attachment 71093 [details]
Text Edit page setup
Comment 3 myopic4141 2008-10-03 09:35:58 UTC
Created attachment 71094 [details]
NetBeans print preview (not a print dialog)
Comment 4 myopic4141 2008-10-03 09:37:05 UTC
Created attachment 71096 [details]
NetBeans print layout dialog
Comment 5 myopic4141 2008-10-03 09:39:32 UTC
Created attachment 71097 [details]
Text Edit print layout dialog
Comment 6 Vladimir Yaroslavskiy 2008-10-07 16:05:20 UTC
To set orientation and margins you should use File | Page Setup dialog,
to set another options, you should use File | Print dialog, Print Options button.
When you press after this Print button to send document to printer, you
should press Ok button on appeared system print dialog. This dialog
has a set of options, but you should not touch it. All options must be
set via File | Page Setup and File | Print -> Print Options dialog.
Only options from these dialogs effect on document, another options
stored in system print dialog can't be retrieved from jdk.
Comment 7 myopic4141 2008-10-07 21:01:56 UTC
Created attachment 71320 [details]
Desired NetBeans printout
Comment 8 myopic4141 2008-10-07 21:05:50 UTC
How do I get the printout to look like the latest attached page via the NetBeans option page (two NetBeans pages per
printed page aligned vertically)?
Comment 9 Vladimir Yaroslavskiy 2008-10-08 10:59:18 UTC
As I understand, please, press on the "Show Multiple Pages" button (Alt-M). It triggers the type of output preview: show
only one page or all pages. After that you can use Zoom to adjust preview. See attached screen shot.
Comment 10 Vladimir Yaroslavskiy 2008-10-08 11:00:00 UTC
Created attachment 71346 [details]
Pages
Comment 11 myopic4141 2008-10-08 11:48:29 UTC
The Preview of my attachment (titled "Desired NetBeans Printout") is from Preview.app showing a single pdf page of what
normally would have been printed on one side of a single sheet of paper by a printer if the printer were the selected
destination device.  The same image would have been shown by Adobe Reader had I used that application to display the
generated pdf file for the screenshot.  The pdf file was the selected output destination instead of the printer so that
I could show the printed page I am trying to create in this forum (no scanner).  The display is not of multiple single
pages but multiple pages (2 in this instance) on a single page (one side of a sheet of paper).  A layout selectable
using the print dialog (see attachment "Text Edit print layout dialog") supplied by the OS.  It does not appear to be a
layout achievable without going through the system print dialog.
Comment 12 Vladimir Yaroslavskiy 2008-10-08 12:16:27 UTC
Printing in NetBeans uses standard jdk api to send data to printer. Client of jdk (print module in NetBeans) does not
know anything about pdf, types of printers etc, api does not provide such information because it is system specific. The
module just invokes jdk and passes the data. It is up to OS and implementation of jdk how produce the output: send to
file or printer, or show on screen or creare a pdf. There is no way to specify what and how to do it.
Comment 13 myopic4141 2008-10-08 17:51:06 UTC
I am going to try this again because you are failing to understand what I am saying.  When I select the "File" menu item
"Print" in the NetBeans "Menu" bar, the MacOS "Print" dialog window does not come up immediately.  Instead, I get a
dialog window titled "Print Preview" which I am assuming is part of the NetBeans program and not the "MacOS" as the
print interface which has "Page Setup", "Print Options", and "Print" buttons.  The NetBeans called dialog "Print
Options" does not have a "Layout" option as part of its "Print Options" dialog.  When the NetBeans called dialog "Print"
button is depressed to actually print the document to where ever it is going, the MacOS "Print" dialog is called (with
the following buttons:  "PDF", "Preview", "Supplies...", "Cancel", and "Print").  I get two independent dialog windows
before output is ever sent to the print device.  In the MacOS "Print" dialog, there is a "Layout" option (selected via a
pop-up menu) from which one can select "Pages per Sheet", "Layout Direction", "Border", "Two-Sided" with "Long-edged
binding", or "Two-sided" with "Short-edged binding" (features not found in the dialog window initially called by
NetBeans).  What ever the NetBeans called "Print Preview" dialog is sending the MacOS "Print" dialog, it is causing a
misdirection of the built-in "Layout" "Pages per Sheet" picture indicator in the MacOS "Print" dialog window.  Now, a
solution would be to just call the MacOS "Print" dialog through a socket directly and bypass the "Print Preview"
intermediary because the two dialogs are conflicting in indicating what is expected to be printed.
Comment 14 Vladimir Yaroslavskiy 2008-10-09 13:24:33 UTC
thank you for information, I little bit correct and summarize it: dialog "Print Options" (and "Print Preview") - from
NetBeans, "Page Setup" and "Print" - system.

"Layout" option: Jdk provides options: orientation (landscape, portrait, reverse landscape), margins, height and width
of the document. All another options are OS specific and can not be obtain (such as Layout, Pages per Sheet, PDF etc.).

I agree with you, that showing system "Print" dialog (which allows to change some of the options) when user presses
"Print" button can confuse. The same situation on Windows: the system "Print" dialog allows to change orientation and it
is unclear for user which orientation is used: from Print Preview or system dialog. I can hide the system "print" dialog
and pass data to the printer directly. But, for example, on Windows (if you installed several printers) you can choose
one of them in the system "Print" dialog. If we hide it, default printer will be used and user can not be able to send a
document to another printer.

I'm closing as WONTFIX again, but if you disagree with me, please, reopen again and I'll hide system "Print" dialog.
Thank you for cooperation.
Comment 15 myopic4141 2008-10-09 19:11:03 UTC
WONTFIX is a bad nomenclature because it leaves one with negative connotations; but, I do not wish the MacOS "Print"
dialog to disappear; thus, will leave it as such and make a suggestion.  The one I would like to make disappear if
possible is the "Print Preview" of NetBeans since it is a subset of the MacOS "Print" including the previewing.  I am
still new to Java; but, will take a look at the print interface when I have a chance and see if I can find an algorithm
that allows direct access to the system "Print" dialogs should one exist (system "Print" dialog) and get back to you if
I find one.  Thank you for your time spent on the matter.