- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Printing a PDF Document
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-30-2007 01:24 AM
05-30-2007 01:24 AM
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1090377
which talks about using xinit but it doesn't explain how direct output to the printer, or give details about the options used within the wrapper.
I can print the pdf by using the command cat tmp.pdf | acroread -toPostScript -shrink -size a4 | lp -dprinter but this doesn't appear to shrink the document to fit onto the page. Any help anybody can give would be welcomed.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2007 04:15 AM
05-30-2007 04:15 AM
Re: Printing a PDF Document
Piping the output to 'lp' should be sending it to the printer (as in that thread you quoted). Assuming that's a postscript printer, it should then print.
What are you actually getting printed?
I don't have documentation; is the order of arguments significant? If so, does 'acroread -toPostScript -size a4 -shrink' work better?
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2007 06:33 PM
05-30-2007 06:33 PM
Re: Printing a PDF Document
I do get printed output but it is doesn't reduce to fit onto the page correctly.
One other point I forgot to mention is that I need to set the DISPLAY to a valid xterminal and cannot use the Xvfb as described in the previous thread. Ideally I don't want to do this as the site where I want to implement this printing facility currently don't have any X terminals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2007 09:09 AM
06-01-2007 09:09 AM
SolutionI'm not sure if this is what you need, but it sounded relevant. We specify several orientation, sizing, and page specifications on the command line, which is formatted from a custom application.
http://www.ghostscript.com/awki/Ghostscript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2007 09:41 PM
06-03-2007 09:41 PM
Re: Printing a PDF Document
Many thanks for the idea of using Ghostscript. After some playing with the settings I've managed to get a correct sized printout from the command line using the command
gs -sDEVICE=pswrite -sPAPERSIZE=a4 -sOutputFile=%pipe%"lp -dprinter" -q -dNOPAUSE -dBATCH ducument.pdf.
As document.pdf is 2 pages I found I had to use the -dNOPAUSE option. The only thing I have found is that I get a message saying:
GNU Ghostscript 8.55: **** Could not open the file lp -dprinter .
but I still get the output sent to the correct printer.