wxPrinter & Paper Orientation

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

wxPrinter & Paper Orientation

Post 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.
Orientation selection under Windows 10
Orientation selection under Windows 10
Orientation selection disabled under Linux
Orientation selection disabled under Linux
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: wxPrinter & Paper Orientation

Post 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?
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: wxPrinter & Paper Orientation

Post 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.
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: wxPrinter & Paper Orientation

Post 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).
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: wxPrinter & Paper Orientation

Post 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.)
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxPrinter & Paper Orientation

Post by doublemax »

This might be a case for the mailing list / Google group: https://groups.google.com/forum/#!forum/wx-users
Use the source, Luke!
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: wxPrinter & Paper Orientation

Post 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.
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxPrinter & Paper Orientation

Post 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.
Use the source, Luke!
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxPrinter & Paper Orientation

Post 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"
Attachments
1111111.png
1111111.png (49.26 KiB) Viewed 2981 times
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
Post Reply