Solved

Printing a text file

Posted on 1998-07-05
9
207 Views
Last Modified: 2010-04-16
Hi I have to do a project in pascal 7 my project is finished
and it saves a report to a text file, now I would like to write a procedure that will test if the printer is on, on-line, has paper in etc and if all these are true, it must print the text file. I need help urgently!! Please.
0
Comment
Question by:Gurkin
  • 5
  • 3
9 Comments
 
LVL 2

Expert Comment

by:omsec
ID: 1217158
I have never done that, so I only post this as Comment and not as an Anwser, but in TP/BP is a unit called PRINTER.TPU. Just add this to the USES-Clause of your program and see the Documentation about its procedures.
0
 

Author Comment

by:Gurkin
ID: 1217159
I don't have the printer.tpu unit do you know where I could get it? maybe you could mail it to me?
0
 
LVL 2

Expert Comment

by:omsec
ID: 1217160
ok...give me ur eMail or ICQ
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:Gurkin
ID: 1217161
my E-mail is : psychoted@intekom.co.za
0
 
LVL 2

Expert Comment

by:omsec
ID: 1217162
uhm i couldnt find the file on my HDDs so it probly has to be linked in the TPU Library. Just try to add Printer or Printers in the uses-clause of or program
0
 

Author Comment

by:Gurkin
ID: 1217163
thanx i appreciate your help
0
 

Author Comment

by:Gurkin
ID: 1217164
omsec I put printer in my uses and there are no problems, now how do I use it????
0
 

Accepted Solution

by:
scroll earned 50 total points
ID: 1217165
Here is the code to test if the printer is working and send something to it:

uses printer;
begin
  {$I-}
  write (lst, #0);
  {$I+}
  if IOResult <> 0 then
    write ('Printer off, not present or not ready')
  else
    write (lst, 'whatever');  {Send the string 'whatever' to the printer}
end.

Regards,
Scroll

0
 

Author Comment

by:Gurkin
ID: 1217166
Thanx a million scroll, I really appreciate it......... cheers
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question