RedHat 7.2 PDF generation problem using a2ps and ghostscript
David Woo
davidwoo at swbell.net
Thu Jul 11 14:08:10 CDT 2002
I have a script that runs correctly on RedHat 7.1 and 7.0 and SCO
Openserver 5.0.6 to produce a PDF file from ASCI text. The script uses
the GNU programs a2ps and ghostscript to transform the ASCII text file
into a PDF file. The only thing that is not working is that the
LANDSCAPE orientation always ends up as PORTRAIT when viewing the pdf or
printing it. Here is resulting commandline of the script:
a2ps -r --columns 1 --major rows --borders no -f 8 -l 135 -B -q
ASCII_FILE -o - | gs -q -dNOPAUSE -sDEVICE=pdfwrite -sPAPERSIZE=letter
-sOutputFile=ASCII_FILE.pdf - 2>/dev/null
Explanation:
-r = landscape
-f 8 = font
-l 135 = 135 columns across the page
ASCII_FILE = the input file
ASCII_FILE.pdf = the output file
I have broken down the script into two steps - creating the postscript
file with a2ps and then converting that postscript file to a pdf file.
I have taken the postscript file created on RedHat 7.2 and transferred
it to the other platforms - RedHat 7.0 and 7.1 and SCO - and then used
ghostscript on those platforms to SUCCESSFULLY create the landscape pdf
file. So I think the problem is with ghostscipt running on RedHat7.2.
I have upgraded the ghostscript and a2ps on RedHat 7.2 to:
[root at snsng RPT]# a2ps --version
GNU a2ps 4.13
Written by Akim Demaille, Miguel Santana.
[root at snsng RPT]# gs --version
6.52
[root at snsng RPT]#
Here is a snippet of the ps file that was created:
[root at snsng RPT]# pg ASCII_FILE.ps
%!PS-Adobe-3.0
%%Title: ISSDTE002
%%For: root
%%Creator: a2ps version 4.13
%%CreationDate: Thu Jul 11 09:48:07 2002
%%BoundingBox: 24 24 588 768
%%DocumentData: Clean7Bit
%%Orientation: Landscape
%%Pages: 4
%%PageOrder: Ascend
Maybe there is some global override setting on the ghostscript on the
RedHat 7.2 server that is preventing landscape? Has anyone else had
this problem and know of a solution? Thanks in advance for any help.
David.
More information about the Kclug
mailing list