Lino Website

#37 : Landscape printing with Win32TextPrinter

Status: Done

I had some work before getting prnprint.py to render pages in landscape orientation on some printers.

Like any TextPrinter, the Win32TextPrinter is supposed to automatically select landscape printing if pageHeight < pageWidth (specified using the pageSize parameter of the TextPrinter constructor).

To implement this, I used a Microsoft function SetWorldTransform() which requires SetGraphicsMode(win32con.GM_ADVANCED), which in turn works only on some printers and on others not.

The solution was to not use advanced graphics mode and to set devmode.Orientation when creating the device context (09.08.06)

News by project:

Refering articles:

Copyright 2001-2007 Luc Saffre.
http://lino.saffre-rumma.ee
Generated 2007-06-07 16:22:59