Originally posted by: ChuckLavin
Hi --
I am trying to figure out how to get a custom app that prints lineprinter-formatted reports on an AIX 5.3 box to output these reports as PDF files. I've come up with a way using enscript and Ghostscript that seems to work, except for a problem I'm having with the page margins.
As these reports were originally formatted 132 columns wide and 65 lines deep for 14" greenbar paper, I need to output landscape and in a reduced font to letter-sized paper. Because of this, the PDF file comes out with a lot of white space along the top and right of every page (as seen in portrait orientation) when enscript uses the default Letter media type. Additionally, the left margin (portrait; would be the top margin on the landscape report) is too narrow to allow for the page to be punched. So I want to change the page margins to correct these shortcomings.
I am using enscript with the following options:
-l (that's a lowercase "L")
-r
-f Courier8
-M LetterNM
In the /usr/lib/ps/MediaSizes file, I created a new entry named LetterNM which is a copy of the Letter entry but with the llx, lly, urx and ury values changed.
The problem is that, no matter what values I enter in these four columns, the PDF file comes out looking exactly the same each time: narrow left and bottom margins, and wide top and right margins (as seen in portrait mode). And it comes out looking identical to what would have come out if I had used the Letter type.
I'm getting very confused and frustrated. I can't find any docs anywhere to help me out of this. I know that enscript is at least finding the LetterNM media type, because if I change the -M parameter to something bogus enscript shoots out an error. But it's not obeying the margins I'm entering. I've entered some really screwy things in there -- one rev should have have given me 2.5" margins all around -- and they're being ignored.
The output from the enscript call is piped to gs with a -sDEVICE=pdfwrite flag. I'm not specifying any special page formatting in the gs call.
I've set up laser printers to print these large reports on this system, and I've done essentially the same thing: change to a reduced font, specify landscape printing, adjust the margins, and send off the print job.
Can anyone help me sort this out? What am I doing wrong?
Which is the lower left corner of the page if enscript is called with the -r option (does it make a difference)?
Thanks,
CL
#AIX-Forum