Operating System - HP-UX
1832211 Members
2584 Online
110041 Solutions
New Discussion

Printer Filter Using Xerox MX20i

 
SOLVED
Go to solution
Rootberry
Advisor

Printer Filter Using Xerox MX20i

Here is the problem. I set up the printer on a win2k3 print server. Am connecting using remote printer from an HP-UX 11.00 system.
When my users print, the character return seems to be missing as it eventually spans off the page. An example of how it prints.

1
_2
__3
___4
____5
_____6
______7
etc... eventually printing a blank page. The _ is just to space out the numbers.
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: Printer Filter Using Xerox MX20i

Windows/DOS expect lines to end in CRLF pairs but UNIX terminates lines in LF's. UNIX was here first so UNIX, by definition, is correct.

With "REMOTE" (in HP-UX speak) as opposed to "NETWORK" printers, the UNIX hosts has very few options available to lp but you can
add a simple filter to add the CRLF pairs before you call lp.

awk '{printf("%s\r\n",$0}' - | lp -dmyprinter

Note that "-" tells awk to read stdin for its input.


If it ain't broke, I can fix that.
Tim Nelson
Honored Contributor

Re: Printer Filter Using Xerox MX20i

did you ateemp BSD or not-BSD option when creating the spool entry ?
Lee Hallin
Advisor

Re: Printer Filter Using Xerox MX20i

You might try something like "ux2dos file | lp -dtheprinter". You can also do several files at once by changing "file" to "file1 file2...". This may be useful if "file1" has printer commands (landscape, page length, etc codes) to setup the printer and "file2" has the data to be printed.
Bill Hassell
Honored Contributor

Re: Printer Filter Using Xerox MX20i

Most all HP printers have a special code to tell the printer to append CR to every LF character. If the Xerox printer supports the PCL language, it may also support this escape sequence. The code is:

ESC & k 2 G

where ESC is the escape character. In shell code:

echo "\033&k2G\c"

This would be inserted into the printer script just prior to the printing loop. But only if the Xerox printer supports the line termination options in PCL.


Bill Hassell, sysadmin
Rootberry
Advisor

Re: Printer Filter Using Xerox MX20i

Okay it seems to work, not sure whether it was BSD issue or not. Or if this script just had the filter in it. But thanks to all who replied.

PERIPH=xx.x.xx.xxx was ip of the printer i x'ed it out.

Thanks again to all.
Bill Hassell
Honored Contributor
Solution

Re: Printer Filter Using Xerox MX20i

> PERIPH=xx.x.xx.xxx

Aha, you used hppi, the HP JetDirect software to add the printer. That changes everything. When you added the printer using hppi (or with SAM which calls hppi), the printer LAN card was interrogated to see if it is an HP card using port 9100. Since the above interface script is in place (it's the generic one for calling hpnpf), there should be an actual printer script that controls formatting in the model.orig directory. Since this is not set up as a 'remote printer', there is now a real formatting script in model.orig so you should be able to adjust the script to use ux2dos internally rather than use it as a filter to lp. When you added the printer, how did you pick the printer model?


Bill Hassell, sysadmin
A. Clay Stephenson
Acclaimed Contributor

Re: Printer Filter Using Xerox MX20i

You have converted this from a "Remote" printer to a "Network" printer unless that win2k3 stuff was a red herring. In any event, you now have all the control over the printer that you need.
If it ain't broke, I can fix that.
Rootberry
Advisor

Re: Printer Filter Using Xerox MX20i

Ended up using a HP LaserJet 4Si / 4SiMX printer. The Xerox Workcenter Pro Color would not let me, use remote printing. Even with the correct driver installed on the printer server or using the Jetdirect remotely. But the other Xerox M20i (newer model I think) allowed me to do this.

So to fix the WOrkCenters pro Colors problem. Like you said I ended up using Network printing, selected the driver HP LaserJet 4Si / 4SiMX and it seems to function just fine. I turned some of the options off. See document for more information.

And yes I was using a config file from a network printer, in order to format it. I messed around with the new option of printing a bit but gave up on it. Which involves adding a SuperAdmin and many other config options.
Bill Hassell
Honored Contributor

Re: Printer Filter Using Xerox MX20i

Well, this is one of those "try it and see if it works" situations. The vast majority of non-HP printers do not have a JetDirect compatible LAN card and "network printing" means: HP JetDirect LAN cards only although there is no warning about this. Well, there was a sort of warning: "no response from printer" Now why this works (and we're talking about the actual communication to the printer) could be that the Xerox LAN card has the TCP/IP JetDirect protocol, or that the Xerox LAN card is just a plain old LPR/LPD card and the JetDirect software (probably hpnpf) has been updated to handle both port 511 as well as port 9100.

So the Xerox can print plain ASCII. Since you're using an HP LaserJet 4 model script, you might try a few lp options like -olandscape and -o2 to see if the printer knows about PCL escape sequences.

You're in uncharted waters here because HP won't support or help make the competitor's printer work and Xerox likely only supports its printers on PCs. Another important note is that your version of JetDirect software (E.10.18) on HP-UX is badly, badly out of date. It appears to be the old jetadmin software which was obsoleted in 1999 due to Y2K issues. You should update to the supported version called hppi (HP Printer Installer).

http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?locale=en_US&pnameOID=18922&taskId=135&prodTypeId=18972&prodSeriesId=27349〈=en&cc=us


Bill Hassell, sysadmin