Announcement

Collapse
No announcement yet.

DOS printing to Windows-only printers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DOS printing to Windows-only printers

    Just to keep from hijacking the other thread and confusing
    people.

    Peter,

    Would you mind explaining ( in detail for the slow ones like me )
    how to configure a DOS window to print to a windows-only printer?
    Without calling a Windows program to read some text file and using
    only a DOS program. Is it operating system or printer or driver
    dependent?

    I don't mean to nag but would really love to know the answer.

    Thanks.


    ------------------

  • #2
    Using "NET USE LPT1: \\MYCOMPUTER\MYPRINTER /PERSISTANT:YES" should do.
    M$ confirms that some (epson)printers have compatibility issues with DOS programs.
    If you map a windows printer to a DOS recognized port (LPTx: ), it should work.


    ------------------
    Regards,
    Peter



    [This message has been edited by Peter Lameijn (edited June 10, 2007).]
    Regards,
    Peter

    Comment


    • #3
      Peter,

      May I ask which OS and printer model? Cause I've not been able to
      get that to work with windows-only printers ( the ones that do
      not understand any of the old esc-codes and need to be installed
      in Windows to work ). and judging from the non-responses from
      others here, no one else has.

      that does work for the older DOS-compatible printers. I've used
      it to connect to lots of dot-matrix printers and quite a few
      of the laserjets ( but not the cheap inkjets & lasers that are
      around today ).

      I'm not picking on you. I just want to know.

      Okay?



      ------------------

      Comment


      • #4
        Paul -

        every Epson ink jet I've had, running W95 thru XP, has performed exactly as per DOS 6.x when connected to LPT1:
        some Canon ink jets functioned identically.

        and that includes utilities I myself wrote starting in IBMBasic, rolled over into QB and later rolled into PBDOS - with explicit <Esc> sequences to control margins, lines per page, perf skip, fonts, etc.

        ------------------

        Comment


        • #5
          What he's referring to are commonly called "Winprinters" or "GDI Printers", and are typically low-end inkjet printers which don't have a built-in language like PCL (or like some of the cheap Lexmark printers, use a proprietary, undocumented interface). Instead, they depend on the operating system to do all of the heavy lifting, rendering the text to a bitmap and then sending it to the printer at a fixed rate. Those printers don't understand things like control sequences because they literally have no "brains" to do them. All they know how to do is print bitmap images.


          ------------------
          Mike Stefanik
          www.catalyst.com
          Catalyst Development Corporation
          Mike Stefanik
          sockettools.com

          Comment


          • #6
            Tom,

            The point is we were only talking about windows-only printers.
            The kind that can NOT be used in a pure DOS environment.
            Running DOS under Windows is not a pure DOS environment.
            Windows-only printers do NOT understand the traditional
            esc-codes. They only operate when driven by a Windows driver.

            Peter said that he knows a way to allow DOS programs to print
            to those printers when run in a DOS-window.
            I keep asking for details as nothing I've been able to do will
            allow this.

            Yes, I've been printing to the old-style DOS capable printers
            from within Windows for around 10 years and still do today.
            From old DOS QBasic-interpretted programs & QB compiled programs
            and even a bunch of DOS-based COBOL programs.

            How much clearer can I make myself and the question?


            ------------------

            Comment


            • #7
              Paul,

              Last times I used it was with a Networked HP Laser and an USB connected OffeceJet V45. I don't have them
              here, so I cannot test it... (Using W2K)


              ------------------
              Regards,
              Peter
              Regards,
              Peter

              Comment


              • #8
                If they were LaserJet printers that use PCL, then that's not a GDI printer. What's being discussed are along the lines of the Lexmark WinWriters. In most cases, you're talking cheap inkjets, not laser printers.


                ------------------
                Mike Stefanik
                www.catalyst.com
                Catalyst Development Corporation
                Mike Stefanik
                sockettools.com

                Comment


                • #9
                  Originally posted by Mike Stefanik:
                  If they were LaserJet printers that use PCL, then that's not a GDI printer.
                  I suspect that any printer addressed via a windows printer driver other than Generic/Text is a GDI printer, whether or not is has PCL or Epson/IBM emulation or whatever. For example, an application which I look after uses a dot matrix printer. User purchased a new printer and installed it as per the manual and the application didn't print any more. Once a Generic/Text driver was set up for the printer and it was mapped to LPT1, everything worked as before.




                  [This message has been edited by Chris Holbrook (edited June 11, 2007).]

                  Comment


                  • #10
                    Paul,

                    Are you aware of the DosPrint utility that Lance Edmonds has available
                    to do this? I think you can download a demo to test at www.dosprint.com
                    I think this will do what you are asking.

                    HTH,
                    Gary
                    Thanks,
                    Gary Stout
                    gary at sce4u dot com

                    Comment


                    • #11
                      What we do at work is this:

                      Add a Generic Text Only printer and assign it to LPT1: ( we don't actually
                      have a printer on this port and for what we are doing here it's better that
                      we don't ).

                      Then we add a printer with TCP/IP printing * We create a IP port to print to.
                      This will work as long as you know the port your actual printer prints to.
                      (my HP Office Jet prints to USB02 as a port)

                      Go in to the settings for the Generic Text Only printer and enable printer pooling
                      and assign the port for your actual printer as a pooled port.

                      When you print to LPT1: since you don't have a printer actually on LPT1: the spooler
                      will send the job to the next or pooled port which is you actual printer.

                      ------------------
                      Warped by the rain, Driven by the snow...

                      padgettjatcomcastdotnet
                      Warped by the rain, Driven by the snow...

                      jimatluv2rescue.com

                      Comment


                      • #12
                        Peter,

                        Both of those sound like they are DOS-compatible printers. Not
                        the winprinter/GDI printers being discussed. so unless you have
                        a winprinter/GDI printer to test with, I don't see it working.

                        Gary,

                        Yes, I've actually got his products & use them occasionally.
                        But it's not the point of this thread.

                        Jim,

                        That might work. I tried a simple test. added a generic/textonly
                        printer on lpt1 & pooled it. also pooled a LJ 1018 on a USB port.
                        went to DOS & ran a quick qb program to print 25 lines to lpt1.
                        it didn't pool the print to the first available printer ( the lj).
                        it just keeps coming up & saying an error writing to lpt1.
                        maybe I need to reboot first. I'll check on this later.


                        ----------

                        This thread was just to get more detail info from Peter about
                        how he was able to print to a winprinter from DOS without using
                        any additional Windows programs. He had mentioned in the other
                        thread that it was possible but I couldn't make it work. I was
                        really just curious as to how he got it to work. For me, it
                        doesn't. I'll go back to work now.

                        Thanks.


                        ------------------

                        Comment


                        • #13
                          I use the command "NET USE LPT1: \\MYCOMPUTER\MYPRINTER" on my Win2000 PC to print to Minolta printer on the LAN.

                          Usually I use EDIT to print text files.

                          As the release name I used a name 8 bytes long, do not know if that makes any difference.

                          Regards

                          ------------------

                          Comment


                          • #14
                            You should be able to test it by opening a command prompt and do a:
                            print text.txt statement ( text.txt being a text file on your PC )


                            ------------------
                            Warped by the rain, Driven by the snow...

                            padgettjatcomcastdotnet
                            Warped by the rain, Driven by the snow...

                            jimatluv2rescue.com

                            Comment


                            • #15
                              When I enter "print test.txt" it prints my file test.txt

                              ------------------

                              Comment


                              • #16
                                At this point I can't see why there would be a difference from printing
                                within PB.. perhaps tech support could shed some light.

                                ------------------
                                Warped by the rain, Driven by the snow...

                                padgettjatcomcastdotnet
                                Warped by the rain, Driven by the snow...

                                jimatluv2rescue.com

                                Comment


                                • #17
                                  If the printer doesn't have electronics in it (like older HP LaserJets do have) a printer driver is required.
                                  DDOC, DOSPRINT or XPRINT can read the a file and print it.
                                  I would not USE NET USE LPT1 since that may conflict with printer drivers.

                                  ------------------


                                  [This message has been edited by Mike Doty (edited June 12, 2007).]
                                  How long is an idea? Write it down.

                                  Comment


                                  • #18
                                    Try this from a command line type edit. In the edit..or
                                    type something. then print what you typed. If it prints
                                    you can get PowerBasic to print also. Check the LPT number
                                    in edit and attach the printer in powerbasic.

                                    ------------------
                                    Leonard Belcher
                                    "Life begins at 140"
                                    Kawasaki Ninja ZX-10
                                    Leonard Belcher
                                    "Life begins at 140"
                                    Kawasaki Ninja ZX-10

                                    Comment


                                    • #19
                                      Hi,

                                      some GDI driver do emulate a PCL or ESC/P or IBM Proprinter.
                                      If yours do, than you can print, but do not hope on help by
                                      the printer support.

                                      I have a PCL/6 color laser and tried to set the printer to
                                      PC8 font permanently, because I need this for direct 'dos'
                                      printing. The panel do allow this, but the printer still print
                                      in Roman 8. So I wrote to support about this error ...

                                      'we will not support DOS printing anymore, so no help, no info'

                                      What I want to say is, forget DOS printing, forget DOS go to
                                      XPRINT in PowerBasic 8.03 ... ;-)


                                      ------------------
                                      Regards,
                                      Hubert

                                      ------------------------------------
                                      http://familie-brandel.de/index_e.html

                                      Comment

                                      Working...
                                      X