home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7501 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  2.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!gatech!concert!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: Printing ASCII
  5. Message-ID: <1993Jan11.212104.29764@njitgw.njit.edu>
  6. Date: 11 Jan 93 21:21:04 GMT
  7. References: <1ihok0INNmb8@morrow.stanford.edu> <C0I756.CA8@undergrad.math.waterloo.edu>
  8. Sender: news@njit.edu
  9. Distribution: na
  10. Organization: New Jersey Institute of Technology, Newark, N.J.
  11. Lines: 37
  12. Nntp-Posting-Host: hertz.njit.edu
  13.  
  14. In article <C0I756.CA8@undergrad.math.waterloo.edu> gmcarthu@napier.uwaterloo.ca (Grant McArthur) writes:
  15. >In article <1ihok0INNmb8@morrow.stanford.edu> GG.MPD@forsythe.stanford.edu (Michael Durket) writes:
  16. >>Is there an interface into OS/2 printing that allows you to
  17. >>submit an ASCII file to be printed on any printer (i.e. does
  18. >>OS/2 have a general purpose ASCII to printer-dependent page
  19. >>formatting routine)? I'd like to avoid writing a routine to
  20. >>do this for my program if one already exists that I can use.
  21. >
  22. >Use LPT1: (or whatever printer port you wish) like a file.  Use DosOpen with 
  23. >LPT1: as the file name, and then treat it like a file with DosWrite() calls.
  24.  
  25. This won't work.  If you just send to LPT1 and don't engage the
  26. spooler, you'll just send directly to the printer.  If your printer
  27. can print ASCII by simply sending it ASCII (as most non-PostScript
  28. printers can), there's no problem.  But sending PS stuff without a
  29. header will result in not even a blank page.
  30.  
  31. To do this properly within an app, you should access the spooler to
  32. get your text formatted into a printer-specific file and send that.  I
  33. don't know how to do this, however.  If you're using/writing a DOS
  34. app, you've got to format it yourself, but you already knew that.
  35.  
  36. >I found that worked nicely for printed ASCII to a printer.  (My case was 
  37. >information tables to a HP emulating printer by the NULL printer driver.)
  38.  
  39. Using the WPS to drag the file over the printer icon will work.  It
  40. will ask you if the file is printer-specific or text.  If you select
  41. "printer specific", then the file will be dumped as-is.  If you select
  42. ASCII text, it will be formatted for your printer and printed (I
  43. believe) in the courier font.  This will successfully get ASCII to a
  44. PS printer without extra software.
  45.  
  46. -- 
  47.   |)  David Charlap          | .signature confiscated by FBI due to
  48.  /|_  dic5340@hertz.njit.edu | an ongoing investigation into the
  49. ((|,)                        | source of these .signature virusses
  50.  ~|~
  51.