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:
- How to test prnprint landscape printing (11.08.06) — Try the following instructions to test whether landscape printing really works on your printer: more
- Landscape printing works (Fixed bugs 11.08.06) — It seems that Chris' trick (Setting devmode.Orientation when creating the DC (09.08.06)) was the solution: landscape printing works—at least on my Samsung ML-1210 laser printer. more
- Setting devmode.Orientation when creating the DC (09.08.06) — After reading Chris' article (newcenturycomputers.net/projects/pythonicwindowsprinting.html), I decided to try whether this method is a solution for my problem Landscape printing with Win32TextPrinter without requiring SetWorldTransform(). more
- Hebrew transformation again (Problem reports 25.07.06) — Here is an updated list of known test results. more
- new option useWorldTransform for prnprint (16.12.05) — prnprint users who want to print in landscape and whose printer doesn't have the «Hebrew transformation» problem can now specify this via a command-line parameter -u or --useWorldTransform. Until now they had to use version 0.6.10 which is getting old. more
- Script for reproducing the hebrew transformation (23.09.05) — I wrote a simple python script that reproduces the hebrew transformation. Here is a mail that I posted to python-win32@python.org. more
- «Hebrew transformation» bug (20.09.05) — prnprint.py prints funny results on a Brother MFC printer. After recovering from your first impression that some hebrew spammer took control over your printer, you notice that in fact each letter is on the right place and mirrored against its horizontal axe. Funnily enough, on my Samsung ML-1200 and on a Lexmark Optra PS (visualized using Ghostscript) the same code prints correct results. more
- Printing in landscape using SetWorldTransform() (28.04.05) — Here is how Win32TextPrinter implements landscape printing using SetWorldTransform(). (Note that this doesn't work on some printers, see «Hebrew transformation» bug (20.09.05)) more
- trying to print in landscape (feature 28.04.05) — (Obsoleted by
Printing in landscape using SetWorldTransform())
Win32TextPrinter still does not support landscape printing. Some research work. more
Refering articles:
- timtools 0.6.19 released (Releases 22.08.06) — The new TIM Tools installer for Win32 on the Download page fixes the problems related to Landscape printing.
- Setting devmode.Orientation when creating the DC (09.08.06) — After reading Chris' article (newcenturycomputers.net/projects/pythonicwindowsprinting.html), I decided to try whether this method is a solution for my problem Landscape printing with Win32TextPrinter without requiring SetWorldTransform(). more