Printing In 1.5 Pascal 
Author Message
 Printing In 1.5 Pascal

Ok, Maybe this sounds too simple, but how do you print your output screen to the print spooler with
Pascal 1.5 for Windows?  I have found the print.pas unit, yet, I still cannot get it to work.  Thanks for the
help.



Wed, 18 Jun 1902 08:00:00 GMT  
 Printing In 1.5 Pascal

Quote:

> Ok, Maybe this sounds too simple, but how do you print your output screen to the print spooler with
> Pascal 1.5 for Windows?  I have found the print.pas unit, yet, I still cannot get it to work.  Thanks for the
> help.

Joseph,

Why don't you assign the output of the file to the printer?

Ex.

Program Print;
Uses Wincrt;
Var
  OutputFile : Text;

Procedure Print;
Begin
   Assign(OutputFile,"LPT1");
   Rewrite(OutputFile);
End;

Procedure CloseFile;  {This procedure very inportant!}
Begin                
  Writeln(OutputFile,#12);
  Close(OutputFile);
End;

Begin
   Print;

   Writeln("This is a test to see if this prints!");
   Writeln(OutputFile,"This is a test to see if this prints!");

   CloseFile;
End.

The closing procedure is very important, because if you do not close the
file after, you may lock up your printer.  The #12 in the source code is
ascii code to form feed the paper.

Regards,

Scott Diorio
--
!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*
* John Scott Diorio                        !
! Webmaster, ALL SPUN-UP IN THE WEB        *
* Visit us at http://www.all-spun-up.com   !



*                                          !
! Phone: (909) 350-3304                    *
* Fax: (909) 350-3304                      !
!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Printing in Win 1.5 Pascal

2. Printing the output in Turbo Pascal for Windows 1.5

3. printing to printer in turbo pascal 1.5

4. TPW 1.5 using LPT1 to print with LEXMARK PRINTER

5. printing in 1.5

6. Problem printing color bitmap on color printer wih TPW 1.5

7. Printing with TPW 1.5

8. Printing with TPW 1.5

9. TPW 1.5 Printing Fonts

10. TPW 1.5 -Printing??

11. TPW 1.5 and printing

12. TPW 1.5 and Printing

 

 
Powered by phpBB® Forum Software