Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat


Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-12-2012
Registered User
 
Join Date: Apr 2009
Posts: 276
Thanks: 58
Thanked 1 Time in 1 Post
How to print postscript files?

Hi, I am looking for a quick answer. How to print postscript files by using gs command? Let's say the HP printer's hostname is pname and the document name is pfile. The OS is RHEL 4 with cups enabled. I've read gs man but didn't get it well.

Thank you in advance!
Sponsored Links
    #2  
Old 09-13-2012
Registered User
 
Join Date: Mar 2011
Location: Bangalroe-India
Posts: 103
Thanks: 8
Thanked 5 Times in 5 Posts
Printing PostScript files
Printing PostScript files on a printer that has a PostScript interpreter is simple; just use lpr, and the printer will take care of all of the details for you. For those of us that don't have printers with PostScript capabilities, we have to resort to other means. Luckily, there are programs available that can make sense of PostScript, and translate it into a language that most printers will understand. Probably the most well known of these programs is Ghostscript.
Ghostscript's responsibility is to convert all of the descriptions in a PostScript file to commands that the printer will understand. To print a PostScript file using Ghostscript, you might do something like

Code:
$ gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr thesis.ps

Notice in the above example that we are actually piping the output of Ghostscript to the lpr command by using the -sOutputFile option. Ghostview is an interface to Ghostscript for the X Window System. It allows you to preview a PostScript file before you print it. Ghostview and Ghostscript can both be swiped from ftp://prep.ai.mit.edu/pub/gnu/.
The Following User Says Thank You to venikathir For This Useful Post:
aixlover (09-20-2012)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Printing Postscript files through Infoprint Manager to a Postscript printer ahetzel AIX 0 04-30-2012 11:01 AM
manipulate postscript via sed lada niva Shell Programming and Scripting 3 02-03-2009 11:36 AM
How do I print(save) words to postscript? luked Programming 0 07-02-2008 09:56 PM
UNIX and PostScript <Therapy> UNIX for Dummies Questions & Answers 2 01-30-2002 10:45 AM



All times are GMT -4. The time now is 12:47 PM.