Re: Printing in Windows
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 13, 2001
- 491 views
Hi Jonas, when printing in Windows you have to do all the positioning yourself. To ensure that words begin on a new line, you must always measure the size of the text you intend to fit on the line and if it doesn't fit, reduce it by one word and try again until it does fit. Then you can "print" the line. You must give X and Y positions before each print instruction to make sure you are positioned correctly. You can think of printing in windows as having a page and placing characters anywhere on any "pixel" address, and when the page is complete, issuing an "end-page" command. Then you can start the next page. Its very messy and prone to easy mistakes, particularly when using multiple fonts etc... This is all theory, 'cos I haven't tried with Win32lib yet, just VB and C. ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower." ----- Original Message ----- From: "Jonas Temple" <jktemple at yhti.net> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, March 14, 2001 12:58 AM Subject: Printing in Windows > > > To all, > > I wondered if anyone has tried-and-true routines to print text in > Windows using the Win32Lib routines for printing? I am looking > specifically for: > > - Ways to handle word wrapping > - How to detect when data should flow onto a new page (my program could > print multiple pages) > > TIA > > Jonas > > > >