I did a search and found the link for escape codes,- but I am not sure how to modify this script to set the margins.
I started with a script that was already written on my system to set a printer to print landscape. I need to send an report that is in an ascii file to multiple printers from my application. My application allows me to execute scirpts in leu of printing to a device directly...
I am on digital alpha 4.0d (yes I know its old but I cant do anything about it!)
here is my script:
#!/bin/ksh
print_report()
{
(echo "${INITLJ4}${FONTLJ4}\c"
cat ${CONTROL} | sed -e "s/$//" -e "s/^/ /"
echo "${RESETLJ4}\c") | lp -d$DESTNAME
}
CONTROL=/usr6/users/rptdist.lis
INITLJ4="\033E\033&a3L\033&l1o5.45c2a66F\033(12U\033(s10H\033&l5H\033(s0p10h0s0
4099T\033&k11.6H"
FONTLJ4="\033(s0p17.1h8.5v0T\033&k7.0H"
RESETLJ4="\033E\033&l0o\033(s10H\033&l5H\033(s0p10h0s0b4099T\033&k11.6H"
DESTNAME=printer1
print_report
DESTNAME=printer1
print_report
****
The report prints too far to the right and needs to be moved to the left. I found the code that I need to put in...
EC&l#E
which translates to 033&l#E
But where in the above do I put it? do I put all page control commands on the what is the INIT line?
Is there a good book that explains doing this and if there is a certain order to the parameters? or are they always in the order that you see them in the manual?
Am I clear as mud on what I'm trying to do?