Friday, September 08, 2006

peeve no. 242 is free pdf printing in hp-ux

I had a lot of masochistic fun over the past few days trying to find the right combination of program and arguments to perform free pdf printing in the HP-UX system at work. I tried acroread first, obviously, but any attempts to run it resulted in complaints about the missing libgfk_pixbuf shared library.

Believe it or not, the HP-UX machine is not used for graphical tasks. At all. Any GUI programs are immediately out, not merely because I, the grunt programmer, have no direct access to the servers, but especially because I was looking for how to print a batch of pdfs from a script. Perhaps we could use one of the remote X session utilities, but it's definitely not a priority; it's a server, for Bob's sake.

I remembered ghostscript at this point, and happily enough the HP people have a binary package for it. I installed it, looked over the man page for a little bit, and started with the device/output file combination that seemed the most applicable. No good. So I attempted some other combinations, pulled up the ghostscript online documentation for my version, and began a ritual of 1. entering a command, 2. going to the printer, 3. viciously crumpling the useless printer output, 4. going back to the cube.

After too much of this, I admitted to myself that I knew nothing. I looked up the spec for the printer. PCL is good, but PostScript is not. That explained some of my trouble...I went back to the ghostscript online docs, but this time I searched for PCL. Oh joy. For this version of ghostscript, I read this: "Ghostscript as distributed includes the PostScript interpreter; there are also interpreters for PCL 5e, PCL 5c, and PCL XL, which are not currently freely redistributable and are not included in the standard Ghostscript package." But I chose to ignore this, so I started a new general web search. Finally, I came upon a SUSE manual that gave the magic combination: use device "ljet4" and output to a temp file, then print the temp file. What a productive way to spend my time...

No comments:

Post a Comment