No announcement yet.

DOS printing in Win2000

  • Filter
  • Time
  • Show
Clear All
new posts

  • DOS printing in Win2000

    I'm running a BASIC DOS program under windows 2000.
    All seems to work well except printing. When printing
    small (under two pages) volume the printer immediately
    prints and then hesitates about 5 to 8 seconds before
    printing out the remainder of the print. This does not
    apprear to happen on long print jobs of say ten or more

    I do not have this effect under W95/W98.

    Have tried setting properties to various combinations of
    not spooling, direct to port and all seem to lead to the
    same effect.

    The printer is an OKI 320 with bidirectinoal cable. Have
    tried OKI and Proprinter drivers without success.

    Any suggestions? I'm not well versed in windows 2000 and
    welcome any suggesions.

    Mike T.


  • #2
    Firstly, it is a bit unclear whether you are trying to solve the 8 second "pause", or the overall delay before printing starts.

    Have you 'captured' the LPT port so that that the data goes through the spooler? (To do this under Win2K, you need to use the Command-Line NET utility, ie, something like this: NET USE LPT1 \\pcname\printername /persistent:yes)

    Next, what method of printing is your code using? (LPRINT or OPEN "LPT1:" AS #1)

    The problem with LPRINT-based printing is that the spooler does not know when the print job is completed as there is no specific "close" operation. The spooler has to wait for a time-out to decide the print job has finished.

    When using OPEN "LPT1:", etc, you finish the task with an explicit CLOSE #1 statement, so the spooler can "see" the print job has completed.

    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    mailto:[email protected]


    • #3
      Things get worse with Windows printers, most of which are without
      a character set, & so can't print from DOS at all, even under
      windows. I have started converting my software so that, under
      Windows, it prints to a file, & then shells to a small .EXE that
      prints through the API. Fortunately I have been printing via
      OPEN for years.




      • #4
        Yes, that is basically what my DOSPRINT package does, but with some additional features like Print Preview, etc.

        JFYI, I'm just about to release V2.0 which can print images too (BMP/JPG/GIF/TIF/PNG/etc).

        mailto:[email protected]