Community
Participate
Working Groups
I want to print a page in the landscape format but wasnt able to find out how to set it. The usage of a printer setup dialog is not a posibility. Why doesnt PrintData includes a field "Orientation"? I have searched the JavaDoc and the Newsgroups for a solution without success. Sincerely Matthias
PrintData api request, FH and SN to consider.
CAR does printing too. CAR?
On Windows, the landscape option is one of the many fields in the (HUGE) DEVMODE struct. Currently, we just bulk-pass the struct from the PrintDialog to the Printer without analyzing it or breaking it down into fields. I believe this was because the struct is so different on different Windows platforms? SN, do you remember? Anyhow, I agree that this is a pretty common field, and we should just take the hit and write the native code to get the struct into Java. It will allow other fields in the DEVMODE struct to be available in future if other people ask for them. Didn't look at Linux or Mac printing yet.
Please consult the other platforms to determine an API (consulting Felipe). Thanks.
In Motif (Xprint): http://xprint.mozdev.org/docs/Xprint_FAQ.html#id2876121 I believe there is X calls that allow us to set this kind of property (content- orientation:) during runtime.
This should work (I didn't test): XpSetAttributes (display, context, XPDocAttr, "*content-orientation: landscape", XPAttrMerge);
SSQ, can you check into the Mac API for landscape orientation? Thanks.
Here is the API. OSStatus PMSetOrientation ( PMPageFormat pageFormat, PMOrientation orientation, Boolean lock ); typedef UInt16 PMOrientation; enum { kPMPortrait = 1, kPMLandscape = 2, kPMReversePortrait = 3, kPMReverseLandscape = 4 };
May i ask whats the status of this request?
It is not in the plan for 3.1 sorry
*** Bug 96393 has been marked as a duplicate of this bug. ***
Darn, looks like this bug report has the information we need. Since we are API frozen, it can't be addressed for 3.1.
but please work on it on the next swt version. imho the severity of this enhancement is higher than normal -> printing is a very important part of a framework and should be included complete!
That's very annoying for the user. He might chose "landscape" in the application, or the application choses it for him, but afterwards he must remember to pick it *again* in the standard print dialog. Usually results in the wrong format being printed on (at least for me). Just think of all the trees this bug has been killing *SINCE VERSION 2.1.2*, come on!
CAR, we should just fix this. It seems that the necessary operating system support is there.
Hi all, is there now a a solution to set landscape mode using the SWT PrintDialog? and... Is the PrintDialog available for GTK (MOTIF)? greetings Thorsten
(In reply to comment #15) > CAR, we should just fix this. It seems that the necessary operating system > support is there. Is there any possibility this will be fixed in the 3.5 cycle?
Fixed > 20090424. This will be in 3.5.