After the printer created, I sent the test file (a plain text file) to the MP C2500 with the following command:#lp -dtest01 -n1 testfileBut the lp command sent the palin text to the MP C2500 without any PCL5 symbol in the print job.

My question is: after the model file - hp5000c30 is associated with Ricoh MP C2500, the lp command should transform the print job with the PCL command/symbol, is it correct ?

Re: About the Printer Model File and the non-HP printer.

Remote printers normally do not use anything except the standard remote rmodel script which is an front end for the rlp command. The model scripts for printer (other than rmodel) in the /usr/lib/lp/model are designed for serial and parallel cables to printers and can also be used for HP JetDirect LAN cards. Substituting the hp5000c30 model for the standard rlp model is not supported -- I am surprised you got anything to print at all. However, since plain text printed out, it is somehow working.

Now a bit about PCL: PCL is nothing but plain ASCII with some defined character sequences (typically called escape sequences or PCL codes). PCL5 was the last of backward compatibility -- PC5c and PCL5e began the demise of compatible printing. So if your printer is standard PC compatible, codes like ESC E (printer reset) and ESC &l1O (landscape mode) will work just fine.

The model script you mentioned performs no translation, as is true for all printer scripts in HP-UX. The script will prepend and postpend specific escape sequences in response to lp options that are part of the script. So your symbol embedded in the print job will not be and the printer will print it according to PCL rules.

So what do you mean by "PCL sumbol". All PCL sequences start with ESC (the scape character) and follow the rules shown in the above manual. If this is not how the PCL symbol is included in the print job, you'll need to explain a bit more.

Re: About the Printer Model File and the non-HP printer.

I did associate the "rmodel" with the Ricoh MP C2500 before, but it didn't prepend/postpend any PCL codes/escape sequences into the print job I sent. That's the reason I try to associate the "hp5000c30" with the Ricoh MP C2500.

I want the model scipt prepend/postpend the PCL codes into the print job as the following example:---------------------------------------------ESC%-12345X@PJL USTATUS PAGE = OFF@PJL USTATUS PAGE=ON@PJL SET COPIES = 1@PJL ENTER LANGUAGE=PCL ESC&a5CTEXTFILE ESC&a5CThis is a testfileESCEESC%-12345XESCEESC%-12345X@PJL---------------------------------------------

But so far, the lp command only sends the print file itself without any PCL codes to the printer.-----------------------------------TEXTFILEThis is a testfile-----------------------------------

What should I do to let the model scipt prepend/postpend the PCL codes into the print job ?

Re: About the Printer Model File and the non-HP printer.

> > I want the model scipt prepend/postpend the PCL codes into the print job as the following example:

Actually, there are two languages, PCL and PJL (Printer Job Language). PJL is unique to newer HP printers and may not be supported on many older printers or non-HP printers. PCL support does not imply PJL support.

> But so far, the lp command only sends the print file itself without any PCL codes to the printer.

Well, first, I assume these codes:

> ESC&a5CTEXTFILE

are document representations of the actual code. Since the escape character cannot be displayed, it is often represented as ESC rather than \033 or 0x1b (the shell method to create the escape character). So to print a line of text starting in column 25:

$ echo "\033&a25TEXTFILE" | lp -dmyprinter

So in your ASCII file, you must insert those characters. In vi, you use the CTRL-v technique to insert a special character into a file. If your example is going to have the codes prepended, just create the first file, then print with cat:

$ cat special_codes myfile | lp -dmyprinter

Not convenient, but it works.

However, probably what you really want is the -o options listed in man net_ljx000. To get these options to work, the Ricoh printer will need to support port 9100 printing (rather than port 515) which is HP JetDirect compatibility mode. The Ricoh docs are not clear as to whether their LAN interface is JetDirect compatible, so just telnet to the printer's IPaddress using 9100 as the port:

$ telnet 12.34.56.78 9100

If you get a reply, then you are in luck and this model supports the JetDirect protocol. Delete the printer and add it back as a network printer. Use the hppi command:

Except for the speciall codes: ESC&a5CTEXTFILEESC&a5CThis is a testfile

The model scipt "rmodel" didn't insert "ESC%-12345X@PJL" in the start/end of the print file, is it normal ?

And about net_ljx000, I see an option:------------------------postscript/post, pcl Print in PostScript or PCL mode. ------------------------Does it mean the lp command will insert the PCL code into the print file with the net_ljx000 script?#lp -dmyprinter -opcl -myfile

Re: About the Printer Model File and the non-HP printer.

Hi Nyga,I don't want the printer to printout the PCL codes.But I want the printer to follow the PCL codes.I hope the print job could be inserted the PCL codes while printing.Could you show me how did you configure Ricoh printer as a network printer ?

Re: About the Printer Model File and the non-HP printer.

> I don't want the printer to printout the PCL codes. But I want the printer to follow the PCL codes.

If you send the correct codes, they will not be printed.

> I hope the print job could be inserted the PCL codes while printing.

You can insert the codes into the print file, or concatenate them in front of the print file as I noted above. Did you try any of the commands I listed above?

Could you show me how did you configure Ricoh printer as a network printer ?

Did you try using the command addqueue as I listed above?

I'm sorry I did not explain PCL codes very well. Putting the text:

echo "ESC&a5CTEXTFILE" | lp -dmyprinter

will print exactly what you see in this echo statement. The string "ESC" means nothing to the model script or to the printer -- it prints exactly what you see.

As I mentioned, the string "ESC" is a convention to represent the single character 033 (in octal) or 0x1b (in hexadecimal). You must insert the ready-to-print codes in front of the textfile you want to print. I mentioned how to use vi with the CTRL-V feature but if that is not something you know about, you can try the echo command I listed above:

echo "\033&a25TEXTFILE" | lp -dmyprinter

The shell code \033 is converted to the escape character.

However, you probably don't want all this detail, so add the printer with a different queue name using the addqueue command as I listed above. Then print the fie in landscape mode like this:

lp -dmyprinter -o landscape testfile

or print in compressed font with:

lp -dmyprinter -o c testfile.

Please tell us what you hyave tried and if you get an error message, please show it (like addqueue not found) which will help greatly in assisting you.

Re: About the Printer Model File and the non-HP printer.

Hi Bill,Appreciate for your continuous replies.I know the what is the output of ---------------------------echo "\033&a25TEXTFILE" | lp -dmyprinter--------------------------- and also the PCL codes won't be printed.

And pardon me for unfamiliar with HP UX printing system.The lp command in HP UX semms to send the print job (plaintext) directly to the remote printer without anything changed/inserted, right ?

I am looking for a way that automatically interpret the print job in the PCL code/format.

I will try the "addqueue" you mentioned and will focus on:lp -dmyprinter -o pcl

Re: About the Printer Model File and the non-HP printer.

> The lp command in HP UX semms to send the print job (plaintext) directly to the remote printer without anything changed/inserted, right ?

No. The lp command does nothing with the text except to send it to the printer. PCL codes are interpreted by the printer. If the code is not meaningful to the printer then (at least on HP printers) the codes are printed on the paper. Otherwise, they are interpreted by the printer and the intended feature is activated on the printer. The lp command is nothing but a file sender.

When you use a printer script like net_ljx000, the -o options (like -olandscape) will prepend the file with the escape sequences and the printer will respond -- if it can. Remember that that this is not an HP printer, so you may have to contact Ricoh to see what PCL codes actually work.

The option -opcl simply tells the printer to enter PCL (as opposed to POSTSCRIPT) rather than automatically detect the language being used. But this is for HP printers that support PJL (printer job language).

Re: About the Printer Model File and the non-HP printer.

We currently are using several Ricoh printers (Aficio MP C4500 & C3500) with HP-UX 11.11, set up as network printers.

The printer queues were created with HPPI, using the net_lj5x model script (per Ricoh support), with the following settings: Default Printing Language = [AUTO] PostScript Level = [Level 1]

I know basic PCL commands work, and all application formatting works, but have not specifically tested Postscript. Though we are not currently using C2500 printers, we have in the past, and I believe the setup was the same.

...skid in sideways, chocolate in one hand, martini in the other, totally worn out and screaming, "WOO HOO what a ride!"

Re: About the Printer Model File and the non-HP printer.

Hi again,

>is it possible to create multiple printer>queues pointed to one physical printer in HP UX ?

It should be possible, but what is the sense?You can create 'remote printer' where the jobs are directed to another network printer, also at the same server.So this will end in one queue.You also should be able to define the printer with his ip address and give different names, but why?Do you expect that this will make the prints faster with several queues?

Re: About the Printer Model File and the non-HP printer.

> I just want to create different queses with different default settings...

This is very easy with JetDirect (network) printers. Just repeat the addqueue command giving a different queue name to each printer. Then cd to the /etc/lp/interface/model.orig directory and edit each of the queue files to set your default values. Since you did not specify what model script you used, I can't guide you as far as how to set the paper size, banner page on/off, default character size, etc.