Announcement

Collapse
No announcement yet.

Printing from the program

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

  • Printing from the program


    I am posting this for my dad, who is a powerbasic user but
    does not have internet access.

    ============

    PowerBasic v3.2
    QuickPak v1.1


    I am using PB since quite few years. Till now I was using Star 2420 color
    printer. I used to open a ".PRN" file through my program, and was able to
    print directly on the printer by using the command "print #....".
    Recently I have switched over to HP Deskjet 810 C printer. This is unable
    to print directly from the program. I also tried to make a print file, and
    then tried to print from that file through DOS print command, but it just
    printed the first line and stopped.

    I have checked the manual of the printer, but it tells that the printer
    driver required to print through any program has to be supplied by the
    program itself. Can you please guide me in the matter as to how should I
    proceed to print directly through my programs ? I have done, and still I
    am doing a lot of work through PB. It is a big handicap for me not being
    able to print as desired. Kindly send your guidence at the earliest.

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

  • #2
    The answer depends on if you are using a dos shell in Windows
    or just dos itself.

    If you are using a dos shell in Windows, when you install the
    printer driver into Windows check the use in dos box. Then make
    sure that the port is captured in the driver setup. You should
    be able to directly print to the dos printer device then. If not,
    try copying a file to the printer.

    If you are using straight dos you will probably have to write
    your own printer driver. This is because most printers now use
    the PC's computer to do a lot of their processing rather than
    having the power on-board.

    I have not written one of these drivers, but since most printers
    now require a bi-directional port I expect that there is some
    handshaking going on.

    Digging deep into the dark, dank, and not entirely reliable
    bowels of my memory I seem to recall that there used to be two
    different ways to open a printer in PB3. One printed directly
    to the printer port, the other used the DOS printer device. If
    this is still the case you need to use the second method when
    running in a dos shell under Windows for the capture to work.

    Happy coding,
    Joe.

    Comment


    • #3
      Usually HP printers have no problem accepting plain text. If you
      want to get fancy, try this
      http://www.powerbasic.com/files/pub/docs/HPCODES.ZIP

      Your DeskJet *might* accept these codes. If it doesn't, I am
      sure you can probably look the proper ones up elsewhere.


      ------------------
      Amos

      Comment


      • #4
        The 810C is a "Windows-only" printer (also known as a "GDI" printer)... it only supports DOS printing via it's own Windows driver. See http://www.pandi.hp.com/pandi-db/pro...ct=deskjet810c for the (brief) details.

        What this means is that Windows must be running, and the driver correctly configured, in order for DOS applications to print.

        This is the exact type of situation that my DOSPRINT utility is designed to help with...! you can find out more by visiting http://www.dosprint.com

        Regards,
        Lance.
        Lance
        mailto:[email protected]

        Comment

        Working...
        X