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.
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.
Created attachment 71092 [details] NetBeans page setup
Created attachment 71093 [details] Text Edit page setup
Created attachment 71094 [details] NetBeans print preview (not a print dialog)
Created attachment 71096 [details] NetBeans print layout dialog
Created attachment 71097 [details] Text Edit print layout dialog
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.
Created attachment 71320 [details] Desired NetBeans printout
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)?
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.
Created attachment 71346 [details] Pages
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.
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.
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.
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.
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.