Fox 9 and Dos Printing Commands

I am trying to send a report over the network to an HP LaserJet 4 printer attached to another computer (\\akl1\hplj4). I tried 3-different ways to print the report. Here is the original FPDOS command: !copy /b contrac1.txt+crtinvce.pcl+outfile.txt lpt1 > nul

contrac1.txt is Hex code to set up the printer.
crtinvce.pcl is bitmapped code to produce a logo.
outfile.txt is straight ASCII characters (the report).

With XP and newer, you will probably not be able to do that. The 'DOS' LPT1 isn't DOS, it is redirected thru the Windows printer driver which outputs PCL but doesn't understand it as input from LPT1. If you can print to 'file', then you can use a regular Windows program to print it. Or drag the printer over to that computer and plug it in to the parallel port. In two other questions recently, we never got this method to work. The formatting codes wouldn't get thru the driver to the printer.

0

MalibucompanyAuthor Commented: 2010-08-30

Hello n2fc... Sorry about that. Yes the data never arrives at the printer.

OK, then...
Try opening a DOS (command) prompt and entering the below command:net use LPT1 "\\akl1\hplj4" /persisitent:no
Then try your printing again...
If it works, you can make that command into a batch file and run it once each time at startup...

PS: You might also try concatenating a "page eject" control at the end (if necessary) to force the printer to flush out a partial page at end!

0

MalibucompanyAuthor Commented: 2010-08-30

Hello Dave Baldwin... The printer being used is USB. There is no parallel port on the computer. Also, reports created using standard @ … Say does print over the network. When I setup to use Printer Pooling I get the same result… The output does not make it to the printer. Any suggestions? Thanks for all your help.

Yes printing has changed a lot from DOS to Windows, you typically have a driver handling the printing, you don't simply copy a txt to the lpt port anymore.

What you could try is use the generic/textonly printer driver, first go to the control panel, printers and install that printer if it isn't there already, if it's there go to it's properties and set it up to print to your network printer.

With it you can use ??? to print to the printer. Eg you could do ??? FILETOSTR("...outfile.txt")

I have a Laserjet 4 Plus and there is no USB available for the printer so you must be using an adapter. You would have a better chance (still small) of getting to the printer if you have the Jet-Direct network card for it. Unfortunately that could slug down your network if connected to the main network because it is a 10-BaseT interface. I do have my printer on both the network interface and parallel interface on an XP computer and I am able to print over the network to it from my Windows 3.11 computer which is essentially DOS with networking.