Page 1 of 1

wxPrinter & Paper Orientation

Posted: Sun Jun 10, 2018 8:43 am
by rocrail
Hi,

using wxPrinter and wxPrintout, I can select under Windows the paper orientation: Very good. :)
But the same code compiled for macOS/OSX does not provide the paper orientation option, and under Linux its disabled...

How can I get this option under macOS/OSX/Linux?

Code: Select all

    wxPrinter printer;
    printer.Print(m_Parent, this, true);
m_Parent is a wxWindow*, and this is a derived class from wxPrintout.
Screen Shot 2018-06-10 at 13.53.11.png
Orientation selection under Windows 10
Screen Shot 2018-06-10 at 15.26.51.png
Orientation selection disabled under Linux

Re: wxPrinter & Paper Orientation

Posted: Mon Jun 11, 2018 4:37 pm
by eranon
Hello, I don't have the direct answer to your concern and no Mac at hand right now, but maybe an indirect idea: what if your rotate by 90° (upstream, I mean) what you have to print?

Re: wxPrinter & Paper Orientation

Posted: Mon Jun 11, 2018 5:39 pm
by rocrail
Hi,

its the decision of the user to print landscape or portrait.
The point is that the wx behaviour is not platform independent.

Ubuntu 18 enables this option, Ubuntu 16 disables it, Windows 10 shows it and can be used, Mac does not show this option.

Re: wxPrinter & Paper Orientation

Posted: Mon Jun 11, 2018 9:21 pm
by eranon
You could provide an option of orientation upstream and then rotate if the user chooses landscape under Mac and Linux only. Also, I don't know (I'm printing in one of my apps, but not fresh) if you decide about the paper size: if yes, you could switch the width and length, then see what happens (will the driver assume you request a landscape?). Of course, again, this second way, requires you know when landscape is wanted by user (and provide your own options dialog -- maybe a simple question -- upstream).

Re: wxPrinter & Paper Orientation

Posted: Tue Jun 12, 2018 9:09 am
by rocrail
Hi,

I'm not looking for a work around, I know how to do this, but I would like to know why the standard does not work on all platforms although the all have the orientation option.

Windows: OK.
Linux: Weird because its dependent of the distribution.
Mac: No orientation option is available. (Native there is always this option.)

Re: wxPrinter & Paper Orientation

Posted: Tue Jun 12, 2018 11:10 am
by doublemax
This might be a case for the mailing list / Google group: https://groups.google.com/forum/#!forum/wx-users

Re: wxPrinter & Paper Orientation

Posted: Tue Jun 12, 2018 3:21 pm
by rocrail
Why? I do not see how to get help in a google mailing list.
I just want to provide Print Orientation on all platforms, which I cannot control as programmer with wxWidgets.

Re: wxPrinter & Paper Orientation

Posted: Tue Jun 12, 2018 3:44 pm
by doublemax
Why? I do not see how to get help in a google mailing list.
Because on the mailing list you reach the actual wx developers, especially Vadim. Maybe he has a solution, or he says it's impossible, then you can stop worrying about it.

Re: wxPrinter & Paper Orientation

Posted: Wed Jun 13, 2018 8:59 pm
by cutecode
hi
I had the same problem, and ended up creating my own dialog for print params.
I gave to user two optins for print params
1. open standart dialog
2. open my own dialog for more options

The first one I called "Printer params"
The Later "Papaer params"