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!

SCO OpenServer 6: Printer Interface Script Edit 1

Status
Not open for further replies.

Tranbo

IS-IT--Management
Apr 14, 2010
75
US
I print report in text format. Some how the first page the "date and time stamp" override each other. Just don't know where to look to edit in the interface script to take care of this problem.

suppose to be like this on the first page

Date:11/02/11 Time:06:56:53

But the "Time:06:56:53" is printed on top of "Date:11/02/11"


Thanks for your help.
 
Have you looked closely at the output before it hits the printer? Disable the printer, send a job from your application, then look for the file here:
/usr/spool/lp/temp
The file to review is the one with the "-1" extension. I would do a hex-dump of the file. Your application might be sending printer control codes which are not compatible with the printer.
# hd 1234-1|head (for example).
If the file looks OK, you can try using a simple interface script (such as /usr/spool/lp/model/dumb).

You could just print from UNIX and see if you get similar symptoms:
# who|lp -d{printer_name}



"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
# pwd
/usr/spool/lp/temp
# disable HP4250
printer "HP4250" now disabled

-- Printed the report and view as suggest. does it suppose to print "Date 10/03/11 Time 09:48:23 " ?


# more 230-1

Top part:
----------------------------------------------------------------------------------------------
ESC(s0PESC&k2SESC&l0L^M^MDate 10/03/11 Time 09:48:23


End part:

----------------------------------------------------------------------------------------------

^M^M -- End of report --
^MESC(s0PESC&k0SESC&l1L
 
You've got PCL codes in the data, so this isn't truly just "text". My best guess is that the data is sending <CR> (^M) without <LF>. Which is pretty odd. In most cases, it's the opposite problem (<LF> without <CR>). You can determine that for sure by printing the hex-dump of that file.

If you have control over those PCL codes, you might try adding this one to the mix:
(ESC)&k3G
That might cause the output to look double-spaced though.

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
yes it is HPLaserJet interface using PCL V

if I comment this code it will not print. what does it all mean?

mdouble) 0<${file} eval ${FILTER} | lprpp $italics $le
ngth $nroff -o 2>&1

The complete quote look like this.

=================================================================

cooked) echo "\r\c"
0<${file} eval ${FILTER} | lprpp $italics $
length $nroff 2>&1;;
mdouble) 0<${file} eval ${FILTER} | lprpp $italics $le
ngth $nroff -o 2>&1
echo "\033&l2H\c"
0<${file} eval ${FILTER} | lprpp $italics $l
ength $nroff -e 2>&1;;

=================================================================
 
this code "(ESC)&k3G" stop the date and time from overlap when print

what is the quote for "space"? Where do you get more info on these code?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top