- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- back in the good old 7.07 ghostscript days...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2009 01:24 PM
05-05-2009 01:24 PM
back in the good old 7.07 ghostscript days...
we had Great results converting pdf to ps output, from the following command:
cat $stuff | /usr/local/bin/gs -sDEVICE=ljet4 -q -dNOPAUSE -r200 -sPAPERSIZE=letter -dPDFFitPage -dBATCH -sOutputFile=- - 2> /dev/null | /usr/bin/lp.hp -d $printer
now we find ourselves w/Ghostscript 8.62, which doesn't like the earlier syntax.
my work around, is to convert the file from the pdf2ps script...then perform the print in a separate step.
it works, but the output file is THREE times the size of the earlier method.
The network team is going to demand some free lunches, unless I can get 8.62 to shead some bytes.
any assistance would be appreciated.
the pdf2ps script is as follows:
#!/bin/sh
# $Id: pdf2ps,v 1.5 2007/09/11 15:24:49 Arabidopsis Exp $
# Convert PDF to PostScript.
# This definition is changed on install to match the
# executable name set in the makefile
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/hpux32:$LD_LIBRARY_PATH
GS_EXECUTABLE=/usr/local/bin/gs
#gs="`dirname $0`/$GS_EXECUTABLE"
gs=$GS_EXECUTABLE
if test ! -x "$gs"; then
gs="$GS_EXECUTABLE"
fi
GS_EXECUTABLE=/usr/local/bin/gs
OPTIONS=""
while true
do
case "$1" in
-?*) OPTIONS="$OPTIONS $1" ;;
*) break ;;
esac
shift
done
if [ $# -eq 2 ]
then
outfile=$2
elif [ $# -eq 1 ]
then
outfile=`basename "$1" \.pdf`.ps
else
echo "Usage: `basename $0` [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3] input.pdf [output.ps]" 1>&2
exit 1
fi
# Doing an initial 'save' helps keep fonts from being flushed between pages.
# We have to include the options twice because -I only takes effect if it
# appears before other options.
exec "$GS_EXECUTABLE" $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2009 01:31 PM
05-05-2009 01:31 PM
Re: back in the good old 7.07 ghostscript days...
Honestly, I think your current solution works.
Bigger files, but it works.
That until you learn the new syntax for ghostscript 8.62
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2009 01:36 PM
05-05-2009 01:36 PM
Re: back in the good old 7.07 ghostscript days...
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2009 02:28 PM
05-05-2009 02:28 PM
Re: back in the good old 7.07 ghostscript days...
wondering if another convert method would a good option...
does anyone have another pdf-to-ps solution? pdftops?
this is one of those times you wish your desk was closer to a unix printer :P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2009 07:22 AM
05-06-2009 07:22 AM
Re: back in the good old 7.07 ghostscript days...
Acrobat Reader can also run non-interactively to convert pdf to smaller postscript files than pdf2ps ("acroread -toPostScript ...", acroread -h will give you the syntax).
In both cases (and with ps2pdf) you can specify "-" to write the postscript to stdout and avoid needing to create a temp file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2009 07:34 AM
05-06-2009 07:34 AM
Re: back in the good old 7.07 ghostscript days...
I think I could live w/those numbers :)
thank you all for your input.
manuel