The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sorting Files / Combing Fields / Printing ccfc1986 Shell Programming and Scripting 12 12-03-2007 10:38 AM
Dynamically Creating and Printing to Files Laud12345 Shell Programming and Scripting 0 03-02-2005 09:07 AM
printing number of files ONLY in ~ directory fasdafdsf UNIX for Dummies Questions & Answers 4 06-23-2002 06:39 PM
Printing Problems in unix ... ( Bar-cdoe - Ip Printing) QuickSilver UNIX for Advanced & Expert Users 3 06-04-2002 07:48 AM
Printing .TIFF files elbryan UNIX for Dummies Questions & Answers 3 09-05-2001 11:12 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2004
Registered User
 

Join Date: May 2004
Posts: 9
Stumble this Post!
printing PDF files

Hi all:

I'm trying to resolve a print issue in HPUX.

Background:

An ascii report file was being produced by a program. It was being sent to the printer via internal commands, to wit:

let #send_status = 0
let $send_cmd = 'lp -d lp03 /ps/tmp/edsprint/eds*.N.LIS'
call system using $send_cmd #send_status WAIT
if #send_status <> 0
Show 'Error in sending Report /ps/tmp/edsprint/edsprint.N.LIS to lp03 Status = ' #send_status
else
Show 'Report /ps/tmp/edsprint/edsprint.N.PDF sent to printer lp03 '
end-if



This works fine.
The user however, wanted the additional ability to view the report in the browser, so I changed the program to produce the report as a .PDF file. The user can bring up the report in the browser OK, but the above set of commands (with the file extension of "LIS", now changed to "PDF") is sending garbage to the printer (it looks like the junk you get when you try to print something using the wrong driver). I tried different printers, but no joy.
I can ftp the file to a Win2000 box and bring it up with Acrobat reader OK and print it OK, but even using the the Unix command line to print it produces garbage.

I've been bugging our UX admin for ideas, but I'm not getting anywhere. Anyone got any suggestions?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-19-2004
s93366's Avatar
Registered User
 

Join Date: Apr 2002
Location: sweden
Posts: 152
Stumble this Post!
Does the printer have postscript enabled? If not enable it... it can be done from within sam..
Reply With Quote
  #3 (permalink)  
Old 05-19-2004
Registered User
 

Join Date: May 2004
Posts: 9
Stumble this Post!
Yes, it's PS enabled.
Reply With Quote
  #4 (permalink)  
Old 05-19-2004
s93366's Avatar
Registered User
 

Join Date: Apr 2002
Location: sweden
Posts: 152
Stumble this Post!
does the physical printer support postscript.?
Reply With Quote
  #5 (permalink)  
Old 05-20-2004
Registered User
 

Join Date: May 2004
Posts: 9
Stumble this Post!
Re: printing PDF files

Hi all:

Well, my Ux Admin came through after all. He installed Acrobat5 (and did some tweaking - I'll post back with the details if they're relevant) and I changed the commands as follows:
Quote:
let #send_status = 0
let $send_cmd = 'cat /ps/tmp/edsprint/eds*.W.PDF |/opt/Acrobat5/bin/acroread -toPostScript |lp -d lp03'
call system using $send_cmd #send_status WAIT
if #send_status <> 0
Show 'Error in sending Report /ps/tmp/edsprint/edsprint.N.PDF to lp03. Status = ' #send_status
else
Show 'Report /ps/tmp/edsprint/edsprint.N.PDF sent to printer lp03 '
end-if
Looks like it worked. Thanks for the help, guys.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0