0

hello. i have made a database to calculate wages and other figures and this database includes an invoice page. i was wondering how to print out the invoice directly from pascal. im not too sure if there is a built in function that i need to use. any help is much appriciated. thank you

2
Contributors
1
Reply
2
Views
12 Years
Discussion Span
Last Post by jwenting
0

There are built in print functions, but I've not used Pascal in ages (except Delphi now and again and there you have Windows handle the printing).
If I recall correctly you have to open the printer like a file and write to it.
This is easiest for old line printers (matrix printers) as there you can just write text lines and they'll appear on paper.
For PCL and PS printers you will need some kind of library to translate your commands to the printer language.

Turbo Pascal used to come with a demo for the printer unit (which you'll need to include).
http://bdn.borland.com/article/0,1410,20803,00.html will allow you to download Turbo Pascal 5.5 free of charge (may need free registration). Not sure if the printer unit works from Windows in command prompt though.

In Object Pascal (Delphi, and I think TP for Windows as well) you would use a TPrinter object instead.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.