Announcement

Collapse
No announcement yet.

Printing from PBDOS in Win98

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

  • Lance Edmonds
    replied
    One more idea... uncapture LPT2 in the 740 driver settings... this leaves the driver installed, but stops the driver from capturing the port from DOS app's.

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

    Leave a comment:


  • Lance Edmonds
    replied
    Nothing secretive about it... the device "lpt2:" tells PowerBASIC to handle every thing itself, but without the colon, PowerBASIC treats it a normal device and uses the BIOS to handke the I/O.

    While it may not solve your problem (depending on how the 740 driver is capturing LPT2), did you actually try it?

    Another solution to consider would be adding a 3rd port to the PC - mnau add-on cards are available for this, and cost very little - often much less then your time trying to get the existing setup to work!

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

    Leave a comment:


  • Colin J Donoghue
    Guest replied
    OK, some clarification. There is no network involved in this app. My computer is running stand-alone and so is the client's computer the program is intended for. Both are running win98 but whereas my machine has no printers allocated to lpt2, the client's computer has an Epson 740 inkjet allocated to lpt2, but with an A/B switch box in the lpt2 line to allow selection of either the Epson or the dot-matrix printer.
    Now, since I used 'open "lpt2:" for output', I thought that the program would address the port directly, but it appears to do so via the Epson driver. The data sent to the dot-matrix printer is pure ascii, no printer control characters. The output is printing on double-run tractor labels, spacing controlled by line-feeds and TABs.
    It is not an option to remove the Epson driver from the client's machine. I guess I could set up a generic dot-matrix driver for lpt2, but I don't think there's a way to change printer drivers from a dos program, and I can't really expect the user to go into Start/Settings/Printers and change the driver, then do it again when the other printer is required.
    Lance: I boggled somewhat at your reply, where you stated that leaving the colon off an'lpt(n):' command causes the program to print via bios. Is that right?? I have never heard of this, and it doesn't seem to be in the docs anywhere that I can find. I could imagine something like 'lpt2:/b' for bios, but to just leave the colon off sounds unlike any other command I know of. Or is it a quirk of Pb?
    Apologies for the lengthy post,
    Colin.
    PS. If I reboot the client's computer into dos mode, the printer works properly. In a dos window, it doesn't.

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

    Leave a comment:


  • Amos Vryhof
    Guest replied
    First, what type of data are you trying to print?

    If it contains special ASCII characters, they might be part of the
    control code set for the printer.

    If you are just printing plain text, try the following at your
    command prompt to see if the printer can have raw text sent to it

    X:\>echo Printer Test>lpt2

    The printer should output a single string reading Printer Test

    If this works, your printer has no problem printing plain text,
    and the problem lies elsewhere.



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

    Leave a comment:


  • Lance Edmonds
    replied
    "My machine has no printer allocated to lpt2, but the other has an Epson 740 inkjet running from lpt2"

    Your situation is a little unclear.

    Do you mean there is a an Epson 740 physically attached to LPT2 on the problematic machine, or is it just a driver that is installed on that machine, and configured to use LPT2?

    Obviously the 1st thing to try is to uninstall the 740 driver (and install the correct driver for the printer) and see what difference it makes. Other factors, such as using RAW instead of EMF (in the spooler/port settings) may make some difference too. Mostly it depends on whether this is SHARED on a network or is for local printing only.

    Maybe you could explain the situation a little more precisely? Is network printing involved? What are the actual printers physically attached to LPT2 on the problematic PC?

    You may also try OPEN "LPT2" instead of OPEN "LPT2:" - this sends all the data through the BIOS instead of PowerBASIC's internal LPT handler.

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

    Leave a comment:


  • Scott Slater
    replied
    If you are accessing this printer accross a network then map the dot-
    matrix to LPT3 on the machine with the Inkjet on LPT2. Then change your
    code on that machine to open "LPT3:" instead. On the other hand if you
    are not using a network then this won't help...


    Scott


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

    Leave a comment:


  • Colin J Donoghue
    Guest started a topic Printing from PBDOS in Win98

    Printing from PBDOS in Win98

    I have an app written in PBDos 3.5 that accesses two printers at once on lpt1 (laserjet) and lpt2, (high-speed dot-matrix) which runs fine on my development machine, but on another machine the dot-matrix printer delivers total garbage. My machine has no printer allocated to lpt2, but the other has an Epson 740 inkjet running from lpt2. I think the Epson driver is wrecking the output from the dos program, even though I am accessing lpt2 with 'open "lpt2:" for output' and PRINT#ing the data. Is there a way to bypass the Epson driver? or what can I do to fix this? Obviously I could remove the Epson driver, but the owner would probably object when he came to use the Epson.


    ------------------
Working...
X