Lino Website

obsolete example : Win32PrinterDocument Test page

(Obsolete. Replaced by textprinter1.py)

   from lino.textprinter import winprn
   printerName = None # Default Printer
   d = winprn.Win32PrinterDocument(printerName)
   d.printLine("")
   d.printLine("Win32PrinterDocument Test page")
   d.printLine("")
   cols = 7
   d.printLine("".join(" "*9+str(i+1) for i in range(cols)]))
   d.printLine("1234567890"*cols)
   d.printLine("")
   d.printLine("Here is some \003b1bold\033b0 text.")
   d.printLine("Here is some \033u1underlined\033u0 text.")
   d.printLine("Here is some \033i1italic\033i0 text.")
   d.endDoc()

The printed output of this code will look roughly as follows:


Win32PrinterDocument Test page

1 2 3 4 5 6 7 1234567890123456789012345678901234567890123456789012345678901234567890

Here is some bold text. Here is some underlined text. Here is some italic text.

Refering articles:

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