Re: Landscape printing

From: Dmitry Karasik <dmitry_at_karasik.eu.org>
Date: 06 Jan 2006 08:51:22 +0100
To: prima_at_prima.eu.org

 Garry> Hi, I am writing a GUI program for a local non-profit group, and am
 Garry> using Prima running on a Win32 platform. The code which I have for
 Garry> displaying reports on the screen works for printing reports with
 Garry> only a few minor changes, so long as the printer is set by the user
 Garry> so that it prints in Landscape mode. I was wondering if anyone
 Garry> knows how(if) I can set the printer into landscape mode directly in
 Garry> the code so that the user doesn't have to remember to switch the
 Garry> printer to landscape mode before printing something. I know that I
 Garry> could recode the form myself for landscape printing, but it is a
 Garry> fairly complicated form and this way seems a much cleaner solution,
 Garry> if I can do it. Thanks for your help, Garry

Currently, there's no way to tell win32 guts how to set up the printer,
because of the abstraction layer over the Prima::Printer class. Moreover,
I remember from when I was writing win32 printer interface, the programmer
is given just a vector of bytes, representing printer's setting the user
has made, and I didn't encounter win32-specific printer settings ( although
there's a good chance that I've missed them). Anyway, if you happen to know
how to tell the printer setup by using native Win32 API, you could do
two things: either submit the patch to Prima so it does some win32 magic
by apc_system_action("win32.Printer.SetOrientation(0)") or something like
that. Or, alternatively, you could try to use perl Win32:: modules to
force the orientation of the printer DC - Prima::Printer::get_handle()
returns it, specifically for such purposes.
 

-- 
HTH,
	Dmitry Karasik
Received on Fri 06 Jan 2006 - 08:51:26 CET

This archive was generated by hypermail 2.2.0 : Wed 27 Mar 2013 - 10:40:22 CET