Operating System - HP-UX
1829087 Members
2395 Online
109986 Solutions
New Discussion

printing pdf documents using ghostscript on hp-ux 11.x

 
Todd Bowden
Valued Contributor

printing pdf documents using ghostscript on hp-ux 11.x

I have loaded Ghostscript 7.07. Now Im trying to print a PDF document but I get the output below. What is happening?

On a laser jet 4000 I can run the following successfully:

cat file.pdf | /opt/Acrobat4/bin/acroread -toPostscript -shrink | lp -dprinter

This works, but it does not work to a LaserJet 5si or Laserjet 4, which is why Im trying to use ghostscript.

/home/tbowden # gs -dPrinted - < o2453781.pdf
GNU Ghostscript 7.07 (2003-05-17)
Copyright (C) 2003 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 3.
Page 1
Loading NimbusMonL-Bold font from /usr/local/share/ghostscript/fonts/n022004l.pfb... 1999456 643587 1662720 370378 2 done.
Loading NimbusSanL-Bold font from /usr/local/share/ghostscript/fonts/n019004l.pfb... 2039648 688135 1682816 381216 2 done.
Page 2
Page 3
Loading NimbusMonL-Regu font from /usr/local/share/ghostscript/fonts/n022003l.pfb... 2099936 745047 1682816 387701 2 done.

Im not sure what is happening, but if someone could help I would be much appreciated.

Todd
3 REPLIES 3
Robert-Jan Goossens
Honored Contributor

Re: printing pdf documents using ghostscript on hp-ux 11.x

Hi Todd,

How about installing the acrobat reader on hpux ?

http://ftp.uni-koeln.de/WWW/acrobat-reader-3/unix/00index.htm

HTH,
Robert-Jan
Todd Bowden
Valued Contributor

Re: printing pdf documents using ghostscript on hp-ux 11.x

Thanks,

Acrobat reader 4.0 is already installed. The problem is trying to print to printers like HP Laserjet 5si. Im not sure why I cant print to this printer. I think it has something to do with PS vs. PCL.

I can print with no problem to a hp 4000 printer using Acrobat.
Gerard Leclercq
Trusted Contributor

Re: printing pdf documents using ghostscript on hp-ux 11.x

Hello Todd,

The laserjet 4 is only PCL and acrobatreader on hpux prints only in PS.
So you are right to use gs, but you should add the parameter ljet4 in the command :

gs -sDEVICE=ljet4 files ...

But as far as I know, gs cannot read pdf. So
you can arrange a script I use to concatenate pdf files :

acroread -toPostScript -size a4 files.pdf

gs -dNOPAUSE -dBATCH -dQUIET -sDEVICE=ljet4 -sOutputFile=file.lj -sPAPERSIZE=a4 files.ps

lp file.lj

Gerard