Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting dos text files to print to a network USB HP3550...

Status
Not open for further replies.

ozpophop

Technical User
Sep 14, 2003
2
AU
Newbie question..
After 25 hours of getting nowhere I've decided to post here a simple question. Has anyone been able to get a text file produced by a dos accounting package (trial balance report in this instance) to print across a network to an HP3550 USB
printer.

The server: dual Xeon 3+Gighz with 1 gig Ram.
O/S: Window 2003 server edition.
output: .prn, .txt files or .pdf if necessary
these are usually printed in prn format
to Lpt1, 2 or 3.
Workstations: New XP boxes with P4 cpu's and plenty of
ram and disk space.

Network: 5 local segment workstations, via cat5 on a
fast switch.
16 vpn connected workstations via dsl
connections within the same city.

So far: We are calling ghostprint to produce a .pdf file for each print job generated within the app. We have installed the printer on a local segment workstation and are directing the job to the HP3500 (formated to A4 132cols)
network path as defined within the batch file. Batch file as below.

txt2pdf -o %1.pdf -p fixed-132x60 %1
c:\gs\gsview\gsprint -q -printer \\server\dj3500 %1.pdf
del %1
del %1.pdf
%1.pdf

The output file is created as a .txt .. converted to .pdf and resuffixed with .pdf and placed in a polling directory.
Ghost print launches and tries to sent the file to the printer. The OS (win2003)at this point returns an error message stating that it cannot start the Windows GDI driver that was requested.

We have enclosed the \\line in " - " quotes. no quotes.

If we install the printer on the server. Alter the print command to remove "\\server\" and just have the printer name in the line of the bacth file, it works.

We have shared deleted and reshared and renamed the workstation printer until, well lets not go there.

Any help would be appreciated.

Thanks in advance
ozpophop
 
Does the format have to be .PDF? If it's raw text and can be printed directly to an LPT port (in DOS mode), then I would use the approach of mapping the LPT port to a network printer.

(DOS command-line would be:
NET USE LPT1: \\server\printer )

Then just instruct your program to print direct to LPT1:. Windows should handle the rest.

You could probably also modify the BAT file used to convert to PDF to point to a (mapped) LPT port instead of the network share name.

As an example:
1. share your USB printer on the network. ( \\server\HP or whatever name you wish)
2. On the machine running the app, map your local LPT port to the share name created in step 1. ( You dont have to use LPT1:; if you already have a local printer you can use LPT2 instead.) ( NET USE LPT1: \\server\HP )
3. In the app, direct printing to the LPT port you just mapped. (If it's raw TEXT or PostScript, you can use DOS commands to manually send a document to the printer. For example: 'copy file.txt lpt1' or 'copy file.ps lpt1'. I would imagine you could do the same with a .PRN file (Print-to-File), but I've never tried it.

Hope this helps!

/* Eric VanLente
* Bench Repair Specialist
*/
 
Thanks for your quick reply.
What would be the difference, as far as the network goes, between the same printer installed on the server and sending the same print job across the network to a mapped share to the same print dirver. This is what is stumping us. Why, using the same batch file but just altering the
print spool path can we get the job to print on the server but not on the workstation?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top