Operating System - HP-UX
1820894 Members
3887 Online
109628 Solutions
New Discussion юеВ

Re: Print PDF files with a postscript printer

 
viacava_1
Advisor

Print PDF files with a postscript printer

Hi everybody,

I would like to print PDF files onto a postscript printer. My OS is HP-UX 11.23.
I know that I can use ghostscript but I would like the spooler to make the conversion so that I can do : lp -dXXX file.pdf
I have already done it under Solaris, Linux and AIX by adding a filter to the spooler. I am afraid it is not possible under HP-UX.

My printer is a network printer using JetDirect.

Thanks for any help
Jose
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Print PDF files with a postscript printer

Have you tried something like this:

acroread -toPostScript

- or -

cat sample.pdf | acroread -toPostScript | lp


Pete

Pete
viacava_1
Advisor

Re: Print PDF files with a postscript printer

Thanks Pete for your reply but that doesn't solve my issue.

I won't print PDF files directly but through a program that does a "lp" command. That's why I want the spooler to make the conversion. This is possible with others UNIX such as Solaris and AIX.

Has anyone got an idea ?

Jose
Bill Hassell
Honored Contributor

Re: Print PDF files with a postscript printer

Yes, it's quite possible with HP-UX too. You create a custom printer script by copying the one you are using now in the spooler's interface/model.orig directory. The printer scripts process a bunch of options (if present) and insert the ghostscript filter. Depending on the script you used to install the printer, you may have to default the printer language to Postscript and of course assumes that the printer understands Postscript (most HP printers do not or require an optional Postcript module.


Bill Hassell, sysadmin
viacava_1
Advisor

Re: Print PDF files with a postscript printer

Thanks for your reply.

This is exactly what I did. It works now.

Jose
RTpub
Occasional Advisor

Re: Print PDF files with a postscript printer

Hi viacava, may I know how did you do that trick (adding the filter) on Linux? Thank you very much!
viacava_1
Advisor

Re: Print PDF files with a postscript printer

Hi RTPub,

Sorry I was mistaking about Linux. I only added a filter on Solaris and AIX. I had a request about Linux but it was cancelled before I found a solution. Sorry for the inconvenience.

Jose
RTpub
Occasional Advisor

Re: Print PDF files with a postscript printer

Hi Jose,

If the filter is written in script, would you mind sending me the sample? I'd like to try it out with my Linux box! Thank you very much!

Regards,
Raymond.
viacava_1
Advisor

Re: Print PDF files with a postscript printer

Hi Raymond,

On Solaris, I had to install Ghostscript that converts PDF to Postscript. Then, I installed the following filter in the folder /etc/lp/fd :
Input types: any
Output types: postscript
Printer types: any
Printers: any
Filter type: slow
Command: cat > /tmp/$$.ps && /usr/sfw/bin/gs -q -sDEVICE=laserjet -dNOPAUSE -dBATCH -sOutputFile=\|'lp -d prt-007 -' /tmp/
$$.ps && rm /tmp/$$.ps


I am afraid this won't work on Linux but maybe it could help.

Jose
RTpub
Occasional Advisor

Re: Print PDF files with a postscript printer

Thanks for your help, Jose, I will give it a try and see if it works.

Raymond.