Advanced printing using win32ui in python - help!

D

Darcy Kahle

I am trying to do some advanced printing in python using the win32ui
module, and have run into an issue. I need to print a page landscape.
As I could not determine how to specify the orientation of the printing,
I arranged the graphic elements on the page the way it should be. When
I got to printing text, it went across the page, not down as I need it
to go. I tried to use the hDC.SetWorldTransform(0, -1, 1, 0, 0, 0)
command to rotate the print counterclockwise 90 degrees, but this
command was virtually ignored. The other solution that I can see
involves specifying that the page is in landscape mode, but as I
indicated earlier, I cannot determine how to accomplish this. The
command win32ui.CreatePrintDialog(1538).DoModal() presents the dialog
where the user can specify landscape mode, but it appears that the OK
button is not hooked up to a default callback. There is a PyCPrintInfo
object, which it looks like I can set this programmatically, and then
generate the printerDC object, but there is no documentation on how to
generate this.

Can anyone recommend to me how I could either specify the page to be in
landscape mode, or rotate the text that is printing? Any assistance
that you can provide is greatly appreciated, and I am certain that there
are others out there that want to know how to do this as well.

BTW, I am currently using WinXP and Python 2.3, but the solution should
be accessible via Win98 and up. I plan to use py2exe to run the final
product on other windows boxes.
 
L

Larry Bates

You may not want the additional overhead, but this is
pretty easy using wxPython (wxWindows Python package).
The additional benefit (which may not be important to
you) is that it is portable.

HTH,
Larry Bates
Syscon, Inc.
 
M

Michael Foord

Darcy Kahle said:
I am trying to do some advanced printing in python using the win32ui
module, and have run into an issue. [snip..]

Can anyone recommend to me how I could either specify the page to be in
landscape mode, or rotate the text that is printing? Any assistance
that you can provide is greatly appreciated, and I am certain that there
are others out there that want to know how to do this as well.

BTW, I am currently using WinXP and Python 2.3, but the solution should
be accessible via Win98 and up. I plan to use py2exe to run the final
product on other windows boxes.

I'm afraid I don't have an answer for you..... but there is a big need
for a straightforward 'print module' for windows....

It's something I have on my list to look at 'sometime' - hopefully by
finding an existing library to wrap.

Regards,

Fuzzy

http://www.voidspace.org.uk/atlantibots/pythonutils.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top