Operating System - HP-UX
1754898 Members
3506 Online
108827 Solutions
New Discussion юеВ

Re: Printing PDF file from Unix

 
SOLVED
Go to solution
JAYAMOHAN.V.D
Occasional Advisor

Printing PDF file from Unix

Hi all,

One of our new application running on HP Unix 11.X produces all the necessary reports in PDF format.

Is it possible to print PDF files from HPUX using lp command? Please help me with the procedure.

Thanks & Regards

Jayamohan

8 REPLIES 8
Robert-Jan Goossens
Honored Contributor

Re: Printing PDF file from Unix

Hi,

If I'm not mistaken you will need to install the acrobat viewer before you can print the pdf files.

http://www.adobe.com/products/acrobat/readstep2.html

Best regards,
Robert-Jan
Slawomir Gora
Honored Contributor

Re: Printing PDF file from Unix

Hi,

Can your printer print poscript documents?

if no you need to install ghostscript utility.

http://hpux.cs.utah.edu/hppd/hpux/PostScript/ghostscript-7.07b/
Alzhy
Honored Contributor

Re: Printing PDF file from Unix

You will need a PDF to PS/PCL converter since UNIX traditionally do not have "printer drivers" per se. lp needs to be fed with the "native" language of the target printer -- PS and PCL being the most common.

Look at GhostScript as a possible solution in addition to Acrobat Viewer...

If using acrobat, the syntax for printing to a PS capable printer is:

cat unixfile.pdf | /opt/Acrobat5/bin/acroread -toPostScript | /bin/lp -dhplaser $3

Hakuna Matata.
Steven E. Protter
Exalted Contributor

Re: Printing PDF file from Unix

You need acrobat reader to do this job. You will need to download and install it from the link above. Then go into X windows and start the reader once, answering the license agreement. Then you'll be able to print these files.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
JAYAMOHAN.V.D
Occasional Advisor

Re: Printing PDF file from Unix

Hi all,

Thanks for the reply.

We have Postscript capable printers. Currently it is used as "ftp" printers using D-Link print server.

The requirement is, while running some batch job, the application generates the reports and it has to be printed directly in the printer. Thus, opening the pdf file using acrobat and printing may not be suitable.

Can we have some other option?

If we use HP jetadmin, can we print the pdf file directly to the Postscript capable printer by just using lp command ?

Please help..

Thanks & Regards

Jayamohan
Alzhy
Honored Contributor
Solution

Re: Printing PDF file from Unix

Jayamohan,

You obviuosly missed my post. Acrobat Viewer CAN BE ran in a non-Interactive (ie for use in command line scripts or batch mode) fashion to generate postscript for printing to any PS capable printer. The following is the syntax:

cat unixfile.pdf /opt/Acrobat5/bin/acroread - toPostScript | /bin/lp -dpsprinter


You can also use ghostscript:

pdf2ps unixfile.pdf /tmp/unixfile.ps
cat /tmp/unixfile.ps | lp -dpsprinter

or

pdf2ps unixfile.pdf|/bin/lp -dpsprinter


Hakuna Matata.
Alzhy
Honored Contributor

Re: Printing PDF file from Unix

And since you'll not be launching the Adobe Acrobat Viewer .. you will not need X windows.

This is an often overlooked feature of Acrobat Reader -- that you can run it in batch mode and use it as a converter for PDF to PS... You will need to add custom fonts if need be for some speciliased priniting if the default fonts do not suffice. Simply opy your fonts to the Addobe fonts directory...
Hakuna Matata.
Steve Steel
Honored Contributor

Re: Printing PDF file from Unix

Hi


If you are not sure look at

http://www.planetpdf.com/ and

http://hpux.connect.org.uk/

You will find the same advice


Steve Steel

If you want truly to understand something, try to change it. (Kurt Lewin)