Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to printer in columns 1

Status
Not open for further replies.

KempCGDR

Programmer
Jan 10, 2003
445
GB
Hi, I need to output stuff to a printer and I need to do it in columns. I don't want to have to learn how to use reports, so at the moment I'm outputing via

PrnOut:TextFile;

AssignPrn(PrnOut);
Rewrite(PrnOut);
Writeln(PrnOut, {string});

I want to send things in columns, so I basically need to send tab characters and I have no idea what the char code for them is. Will this even work, does this method do anything with tabs or will I have to send individual spaces? If I have to send spaces, does anyone know how to set the printer to use a monospaced font with this method?

Thanks
 
You can do that if you only need to use mono-spaced fonts, and to local (LPT1,...) printers, and can't spare the time to do it nice.

If you would like to use 'nicer' fonts and full control on pagelayout, better have a look at the Printer unit. It has a document interface, that has you 'painting' your info on a canvas, and sending that to any printer available at your Windows.

HTH
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top