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

Sending PJL code to network printers

Status
Not open for further replies.

aseidas

MIS
Jan 10, 2002
73
US
Hello,
I have a customer running open server 5.0.5, they just purchased a Sharp Printer/copier, they would like to set up several print queues on the sco box, each one set to send a different PJL file to change the font, pitch, duplex etc... I have all of the pjl files, I am just not sure where to put them or how to call them so each time the printer is called it sends the pjl file first. Has anyone here had any experience with this? ANy help would be greatly appreciated.

-Aseidas
 
If I am understanding your question, what you would like to do is call the same printer using a different alias for each type of print job, and have the printer interface automatically configure the printer for that type of job based on the alias.

The first thing to do is get the basic printer working so you can send jobs to it using an lp command.

How you set up the alias's depends on whether the printer is accessed using remote printing or interface files.

If the printer uses interface files, use the duplicate printer option in the print manager to create each alias, then modify each interface script so that it spools the desired printer configuration to the printer before each job.

If on the other hand the printer is a remote printer you need to create a dummy interface based printer who's interface script redirects its job to the remote printer, then duplicate that printer and modify each interface script as desired.

Obviously in order to do this you need to be familiar with basic scripting and printer configuration. The code is not real complicated so long as you know what you are doing.
 
PJL is typically a preamble to the print job.

<esc>%-12345X@PJL
@PJL Your first PJL command
@PJL Your second PJL command
...
...
@PJL ENTER LANGUAGE = Your_Printer_Language(PCL, Postscript)
Your Print Job in Your_Printer_Language
<esc>%-12345X

PJL is not where you would typically put font changes
and the like. It is fine for setting up the defaults
for a print run, but it DOES NOT provide a means for
changing things in the middle of the job; e.g., bold text
and back to medium etc. That would be done in the
printer language at hand.
Jim Asman
jlasman@telus.net
 
I'm sorry I wasn't that clear in my question although I do appreciate the responses. I have already setup all of the print queues as remote printers in scoadmin, I have placed all of the pjl files in the /usr/spool/lp/admins/lp/printers/LPx directory for each of the appropriate queues. The formatting isn't to modify things within a job but the the entire job itself, I am not going to try to make the header bold with PJL code for instance but there could very well be a queue that sets the entire job to bold. I usually just change anything I need to in the interface scripts, on this particular printer this is the only option they give you to modify the jobs. Should I just lp the PJL file to the printer in the interface script for each one of the printers?
 
Like I stated before

You job starts with the UEL code

<esc>%-12345X@PJL
Your PJL commands
Your Print Job
<esc>%-12345X

How you assemble them is up to you. It will be fine
as long as the components arrive at the printer in the order shown above. Jim Asman
jlasman@telus.net
 
I understand your solution, it is just not possible for me to implement it in this situation. The print jobs are sent from a proprietary application with thousands of reports, I cannot go in and modify 1000 programs to add PJL for one customer, it needs to take place outside of the application. I will figure it out I appreciate the help.

-Aseidas
 
I understand what you are saying. That does NOT change what the printer needs to see.

I would seem to me that the interface script could put the entire thing together.
Jim Asman
jlasman@telus.net
 
Point taken, the tech from Sharp says I &quot;should&quot; be able to send the pjl file then send the print job after it and it &quot;should&quot; keep those setting until the next pjl file is sent, I am sure there will be a conflict in a multiuser environment but he says it will work....we will see, thanks again.

-Aseidas

 
Yes. Just modify the interface script so it sends the pjl file to the printer before it spools the actual printed file(s).

There should not be a multiuser conflict because the pjl spooling will be job specific, and will always be sent as a header for every job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top