From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079058315748.tru64-unix-managers.marc@archive.invalid> From: "Nagaraja, Raja" Date: Wed, 07 Jul 1999 23:53:07 +0000 To: tru64-unix-managers Subject: Summary-- How to setup Top Margin in a Post Script output X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079058315748 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