Bug 52789 - DCR: No pageOrientation in PrintData?
Summary: DCR: No pageOrientation in PrintData?
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1.2   Edit
Hardware: PC All
: P3 normal with 4 votes (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 96393 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-22 21:08 EST by Matthias Becker CLA
Modified: 2009-04-30 21:31 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Becker CLA 2004-02-22 21:08:08 EST
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
Comment 1 Grant Gayed CLA 2004-02-23 10:21:19 EST
PrintData api request, FH and SN to consider.
Comment 2 Steve Northover CLA 2004-02-23 12:29:12 EST
CAR does printing too.  CAR?
Comment 3 Carolyn MacLeod CLA 2004-02-23 12:37:02 EST
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.
Comment 4 Steve Northover CLA 2004-02-23 12:40:07 EST
Please consult the other platforms to determine an API (consulting Felipe).  
Thanks.
Comment 5 Felipe Heidrich CLA 2004-02-23 13:04:07 EST
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.
Comment 6 Felipe Heidrich CLA 2004-02-23 13:16:22 EST
This should work (I didn't test):
XpSetAttributes  (display, context, XPDocAttr, "*content-orientation: 
landscape", XPAttrMerge);
Comment 7 Carolyn MacLeod CLA 2004-02-23 15:53:46 EST
SSQ, can you check into the Mac API for landscape orientation? Thanks.
Comment 8 Silenio Quarti CLA 2004-02-25 14:03:28 EST
Here is the API.

OSStatus PMSetOrientation (
   PMPageFormat pageFormat, 
   PMOrientation orientation, 
   Boolean lock
);

typedef UInt16 PMOrientation;
enum {
   kPMPortrait = 1,
   kPMLandscape = 2,
   kPMReversePortrait = 3,
   kPMReverseLandscape = 4
};
Comment 9 Matthias Becker CLA 2005-03-10 14:40:23 EST
May i ask whats the status of this request?
Comment 10 Felipe Heidrich CLA 2005-03-10 16:08:15 EST
It is not in the plan for 3.1
sorry
Comment 11 Steve Northover CLA 2005-05-24 21:46:11 EDT
*** Bug 96393 has been marked as a duplicate of this bug. ***
Comment 12 Steve Northover CLA 2005-05-24 21:49:31 EDT
Darn, looks like this bug report has the information we need.  Since we are 
API frozen, it can't be addressed for 3.1.
Comment 13 Michael Seele CLA 2005-05-25 01:47:01 EDT
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!
Comment 14 Jörg von Frantzius CLA 2005-06-02 12:32:47 EDT
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!
Comment 15 Steve Northover CLA 2005-10-13 11:52:22 EDT
CAR, we should just fix this.  It seems that the necessary operating system 
support is there.
Comment 16 Thorsten CLA 2006-12-13 03:08:39 EST
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
Comment 17 Richard Gronback CLA 2008-09-15 07:19:30 EDT
(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?
Comment 18 Carolyn MacLeod CLA 2009-04-24 12:58:46 EDT
Fixed > 20090424.
This will be in 3.5.