It seems I'm wrong about just needing a little adjustment. When you use WritePrinter, you are sending raw bytes to the printer, thanks to opening the device in "RAW" mode. In this mode, you would need to send the actual printer escape code that sets it to Landscape, in the language of its default driver which may be PCL or XPS, or may be something proprietary.
In contrast, MSWinPrint creates a printer device context (dc) and draws to it with GDI commands, which is a more flexible device-independent method. Apologies for the false lead, I should have tested it first. On Wed, Jun 10, 2015 at 6:43 PM, Todd Fiske <toddfi...@gmail.com> wrote: > > On Wed, Jun 10, 2015 at 2:48 PM, Hans Becker <h...@earthlink.net> wrote: > >> Does anyone by chance have sample code I could cut and paste to print >> landscape? >> > > I don't have a cut and paste example on hand, but you might benefit from > reading the source of this module, or even using it: > > MSWinPrint 1.1 : Python Package Index > https://pypi.python.org/pypi/MSWinPrint > > The method they show for setting landscape mode (setting > devmode.Orientation) looks like it will blend in with what you have with > only a little adjustment. > > Todd > >
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32