home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vp21beta.zip / ARTLSRC.RAR / PRINTER.PAS < prev    next >
Pascal/Delphi Source File  |  2000-08-15  |  1KB  |  52 lines

  1. //█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  2. //█                                                       █
  3. //█      Virtual Pascal Runtime Library.  Version 2.1.    █
  4. //█      Printer Interface Unit                           █
  5. //█      ─────────────────────────────────────────────────█
  6. //█      Copyright (C) 2000 vpascal.com                   █
  7. //█                                                       █
  8. //▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  9.  
  10. // To write text to the printer, simply use Write statements:
  11. //
  12. // Writeln(Lst, 'This is a printer test');
  13. //
  14. // To force a new page, call the FormFeed routine:
  15. //
  16. // FormFeed;
  17.  
  18. unit Printer;
  19.  
  20. {$I-,S-}
  21.  
  22. interface
  23.  
  24. var
  25.   Lst: Text;
  26.  
  27. procedure FormFeed;
  28.  
  29. implementation
  30.  
  31. const
  32.   cFormFeed = #12;
  33.  
  34. procedure InitPrinter;
  35. begin
  36.   Assign(Lst,'LPT1');
  37.   Rewrite(Lst);
  38. end;
  39.  
  40. procedure FormFeed;
  41. begin
  42.   Write(Lst, cFormFeed);
  43.   Close(Lst);
  44.   InOutRes := 0;
  45.   InitPrinter;
  46. end;
  47.  
  48. initialization
  49.   InitPrinter;
  50. end.
  51.  
  52.