* Summary-- How to setup Top Margin in a Post Script output
@ 1999-07-07 23:53 Nagaraja, Raja
0 siblings, 0 replies; only message in thread
From: Nagaraja, Raja @ 1999-07-07 23:53 UTC (permalink / raw)
To: tru64-unix-managers
Hello Managers,
I solved the problem by using a sed command. I received one answer from
Gordon Lawson who suggested to:
Simply "find" line one
and replace it with line one AND a newline.
This example will add a newline after the first
line at the top of the file and save it to another
file:
sed 1G input.file > output.file
I did not want to change in application. Later I modified the filter and it
worked with a larger top margin.
Following is the filter:
# expand expands tabs before file re-formatting to retain correct tabbing.
# The first sed command inserts the offset, then prevents insertion of
spurious
# lines by restoring a form feed to the front of any lines that originally
# started with one. (ff is expanded to ff cr)
# The second sed takes the output from the postscript filter and edits more
# appropriate parameters into it.
#
PATH=/usr/bin:$PATH
filter=/usr/lbin/ln03rof
#filter=/usr/lbin/hplaserpsof
if echo $*|grep landscape > /dev/null 2>&1
then
indent=" " #centre 132 wide jobs. DON'T use lpr -iN to offset
ysize=792 #retain top margin hardcoded into ln03rof
fontsize=9.23 #select a font size for 132 char x 67 lines,landscape
lfsize=8.06 #set the line space size to get 67 lines
spsize=5.13 #set backspace size - used for overtyping to get bold
else
indent="" #insert nothing: use -iN to offset
ysize=700 #reduce top margin hardcoded into ln03rof
fontsize=12.00 #select a font size for 80 char x 67 lines, portrait
lfsize=12.00 #set the line space size to get 67 lines
spsize=6.25 # backspace size = fontsize / 1.8
fi
cat|expand|sed -e "s/^/$indent/" \
-e "s/^${indent}
/
$indent/"|$filter $*|\
sed -e "/portrait/ s/792/$ysize/" \
-e "/top-m/ s/0.50/1.00/" \
-e "/\/Courier/ s/findfont .* scale/findfont $fontsize scale/" \
-e "/\/lfsize/ s/\/lfsize .* def/\/lfsize $lfsize def/" \
-e "/\/spsize/ s/\/spsize .* def/\/spsize $spsize def/" \
Raja
B.S. (Raja) Nagaraja
Systems Support Specialist
Systems Management Section
Business Systems Division
ACTEW Corporation
GPO BOX 366
CANBERRA, ACT 2601
AUSTRALIA
Phone: 612 6270 7443 Fax: 612 6270 7445
MailTo:Raja.Nagaraja@actew.com.au
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-07-07 23:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-07 23:53 Summary-- How to setup Top Margin in a Post Script output Nagaraja, Raja
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox