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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lost in space AGAIN

Status
Not open for further replies.

CStaley

Programmer
Dec 14, 2007
20
0
0
US
Okay, here's the scoop and I'll leave it to all you experienced folks to help me out:

#1. using an HP5500dn networked printer (PCL6)

#2. need to store a *.prn overlay macro on the printer. I have the *.prn file, but not sure how to store it on the printer since it's a network and not a direct [DOS] connection, so "copy /b filename.prn" doesn't work. (If I just print it, I get all the codes printed out.)

#3. I need to call the macro for the overlay out of VB which is where I print the data for the form.

How can I do this without tearing out the rest of my hair? Any help would be GREATLY appreciated.

Been snooping for days on this info... but can't seem to find a clear explaination anywhere.


 
copy /b file.prn \\servername\printersharename

The printer has to be shared.

Have you made the macro permanent?

Let's assume the macro has an ID of 100

From your application, issue <esc>&f100y4X at the start, where the <esc> represents chr$(27) or hex 1B, and you should have your macro run on every page.

This assumes a PCL 5 output stream



Jim Asman
 
Thanks Jim, but I'm not sure that I'm getting it all....

the printer is on a tcip port and share named "LaserJet" so the command I attempted to send (through the DOS window) was:

copy /b file.prn \\192.168.1.102\Laserjet

What I got back was an error message that; "Windows cannot find the network path. Verify that the network path is correct... yadda yadda yadda"

I know the IP is correct, because I can ping the printer all day with no problems.... I just can't seem to get past this stumbling block.

What am I missing here?

(BTW, I greatly appreciate your help and insight.)

 
Well, the printer sits on the network alone - not connected to a printserver or computer. It is connected only to the router the same as all the other computers.

Here's what I've got (except with about 6 more computers);

comp ======\
\
comp =======---- [Router]
/
printer=====/
 
Fair enough. I have several like that.

When you print to the printer from a windows application, how do you address the printer? Does it not have a local name? How does a windows app know anything about the type of printer you are pointing to?

Did you try using the IP of a computer that "knows" about the printer?



Jim Asman
 
It is simply the default printer named as "LaserJet 5500 PCL 6"

Since it is the default printer, I simply issue a; printer.print "yadda, yadda" command from VB.



 
At the time, it actually wasn't shared anywhere. I (now realizing how dumb I was) simply shared it on the same machine I'm sending from. (as Homer would say; "Doh!")

However, I guess my point is that the printer is not directly connected to any of the computers and is therefore not necessarily shared with any other computer on the network since I'm not "printing through" any computer to get to it. Nor is there a any direct printer cable linked to any of these computers, it's all done over the network.

Each computer is set up with the printer driver pointing to a standard HP tc ip port pointing to the ip address of the physical printer.

 
Sooooo...

Share the printer. Right click on the printer icon. Click on the share tab. Click on share. Give it a share name.

Then...

copy /b file.prn \\computername\printersharename


Jim Asman
 
I did that and got the error message. But since the printer isn't connected to a computer, what in your example,would be the "computername"?

I did this:

copy /b file.prn \\192.168.1.102\LaserJet

And got the error message when it was shared as "LaserJet"

Do I need to swap around the IP and sharename?

I'll try using this computer's name and the sharename without the ip address and let you know what happens.
 
PARTIAL SUCCESS!

Sent it as:

copy /b file.prn \\cmscomp\laserjet

from the DOS prompt and didn't get an error and got a "1 file copied" message... but didn't get the desired overlay either.

The PRN overlay file is approx. 838k and I don't know if it was there and wiped out when the compiled VB program went to print, - don't know if windows sends a printer reset at the start of a print job.
 
Can you tell if the printer received data?

That is, did any lights on the printer blink indicating that data was received?

If so, was the macro made permanent?

To verify the connection, send a text file and see if it prints OK.


Jim Asman
 
Yep.Lights blinked & panel read; "Processing Job"

doesn't appear that the macro is permanent... used "ovl.exe" to create the overlay from a corel draw file and the last line (after the escape char.) is: &f1s1x10x4X

does this need to be changed to read: &fNy10X


 
Was this file created using a PCL5 driver?

Assuming it was, then it looks as though the macro was made permanent with the 10x part of the final command you indicated. The 4X part of that command would enable the overlay, however, any printer reset would disable it.

You may still need a formfeed character in your application to push the sheet through.

But just for a sanity check, temporarily add a FF to the end of your macro file and copy the file to the printer.

If yyou want me to have a look at your macro file, email it to...

jlasman at telus dot net

Jim Asman
 
PCL6 driver.... I'll immediatley install a pcl5 driver and give it a try. In the meantime, i've upload the form to this link:
take a look at it and let me know when you get it (so I can delete it and recover the space)

BTW, Thanks for your patience, I appreciate your understanding the frustration and appreciate your kindness
 
Just uploaded the PCL5c driver version... it is different than the PCL6 version, however I still have the same results.
 
You definitely want the PCL5 version.

It prints OK on my system.

Try this...

Copy the macro file to the printer.

Create a file called test that contains...

<esc>&f1y4X CTRL-L

copy that file to the printer and you should get your form.

Note that <esc> means the single escape character chr$(27),

and CTRL-L means the single character chr$(12)

You can remove the file from the website.

BTW, I assume that the panels are intended to be empty in the form, as they are when I print them.

Jim Asman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top