1. printing to a printer

Does anyone know if a library exists already to make things all beautiful
and stuff when you print to a printer?  heh.....what I mean is ..ability to
change fonts, etc...maybe draw lines...

I'm searching the archives, but so far, no luck.

Michelle Rogers

new topic     » topic index » view message » categorize

2. Re: printing to a printer

Michelle Rogers wrote:
> 
> Does anyone know if a library exists already to make things all beautiful
> and stuff when you print to a printer?  heh.....what I mean is ..ability to
> change fonts, etc...maybe draw lines...

If you are using Windows, then just treat the printer like you would 
a bitmap or window.

For example, when using win32lib you can do this sort of thing...

include win32lib.ew
   without warning

   sequence prect
   sequence printparms
   integer lY

   printparms = getPrinter()
   prect = getRect(Printer)
   VOID = startDoc("My Report")
   VOID = startPage()
   setFont(Printer, "Arial", 24, Bold)
   setPenPos(Printer, 5, 5)
   wPuts(Printer, "Title Heading")
   lY = 5 + getTextHeight(Printer, "|")
   setPenColor(Printer, Black)
   setPenWidth(Printer, 20)
   drawLine(Printer, 0, lY, prect[3], lY)

   setFont(Printer, "Times New Roman", 12, Normal)
   setPenPos(Printer, 5, lY + 3)
   wPuts(Printer, "This is a test line.")

   VOID = endPage()
   VOID = endDoc()


-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view message » categorize

3. Re: printing to a printer

On Sat, 25 Sep 2004 10:33:33 -0700, Derek Parnell
<guest at RapidEuphoria.com> wrote:

<snip>
btw, I see you put my print updates into 0.60.6

Many thanks,
Pete
PS please don't imagine anything untoward, I mean it: a plain, honest,
thanks.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu