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.
User avatar
rocrail
Experienced Solver
Experienced Solver
Posts: 88
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

wxPrinter & Paper Orientation

Postby rocrail » Sun Jun 10, 2018 8:43 am

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
Best regards,
Rob.

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

Postby eranon » Mon Jun 11, 2018 4:37 pm

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
Experienced Solver
Experienced Solver
Posts: 88
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: wxPrinter & Paper Orientation

Postby rocrail » Mon Jun 11, 2018 5:39 pm

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.

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

Postby eranon » Mon Jun 11, 2018 9:21 pm

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
Experienced Solver
Experienced Solver
Posts: 88
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: wxPrinter & Paper Orientation

Postby rocrail » Tue Jun 12, 2018 9:09 am

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.

User avatar
doublemax
Moderator
Moderator
Posts: 12613
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxPrinter & Paper Orientation

Postby doublemax » Tue Jun 12, 2018 11:10 am

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
Experienced Solver
Experienced Solver
Posts: 88
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: wxPrinter & Paper Orientation

Postby rocrail » Tue Jun 12, 2018 3:21 pm

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.

User avatar
doublemax
Moderator
Moderator
Posts: 12613
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxPrinter & Paper Orientation

Postby doublemax » Tue Jun 12, 2018 3:44 pm

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
I live to help wx-kind
I live to help wx-kind
Posts: 181
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxPrinter & Paper Orientation

Postby cutecode » Wed Jun 13, 2018 8:59 pm

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 252 times
regards,
Alexander Saprykin
www.wxwidgets.ru


Return to “Platform Related Issues”

Who is online

Users browsing this forum: No registered users and 1 guest