help needed to print from turbo pascal

Reply

Join Date: Apr 2005
Posts: 9
Reputation: mpx10 is an unknown quantity at this point 
Solved Threads: 0
mpx10 mpx10 is offline Offline
Newbie Poster

help needed to print from turbo pascal

 
0
  #1
Apr 13th, 2005
im still struggling to print an invoice that i have made in pascal to a usb port printer. any help please. i have tried using various inbuilt function but have had no luck probably because im coding it wrong. thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 31
Reputation: Jackrabbit is an unknown quantity at this point 
Solved Threads: 0
Jackrabbit Jackrabbit is offline Offline
Light Poster

Re: help needed to print from turbo pascal

 
0
  #2
Apr 13th, 2005
Originally Posted by mpx10
im still struggling to print an invoice that i have made in pascal to a usb port printer. any help please. i have tried using various inbuilt function but have had no luck probably because im coding it wrong. thanks in advance
This works in Delphi 7 / WinXP:

Pascal and Delphi Syntax (Toggle Plain Text)
  1. program ptest;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6. SysUtils,
  7. Printers;
  8.  
  9. begin
  10. Printer.BeginDoc;
  11. Printer.Canvas.TextOut(200,200,'Hello, world!');
  12. printer.EndDoc;
  13. end.

I don't have/use Turbo Pascal so can't say if it works there as well...
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 9
Reputation: mpx10 is an unknown quantity at this point 
Solved Threads: 0
mpx10 mpx10 is offline Offline
Newbie Poster

Re: help needed to print from turbo pascal

 
0
  #3
Apr 14th, 2005
tried it in turbo pascal but it doesnt work its says cannot find file 'sysutils.tpu' thanks for your help though!! any other ideas please.
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 31
Reputation: Jackrabbit is an unknown quantity at this point 
Solved Threads: 0
Jackrabbit Jackrabbit is offline Offline
Light Poster

Re: help needed to print from turbo pascal

 
0
  #4
Apr 15th, 2005
About the only thing I could suggest would be to write the information to a file the use the Exec function (in DOS unit -- at least it is in Free Pascal) to launch NotePad or WordPad and print from there.

If you're running Windows, you could also move up to Delphi. I've also had pretty good luck with Lazarus (although I haven't used it much). It's an open source IDE for Free Pascal similar to Delphi.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Pascal and Delphi Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC