📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

10. Ghostscript.

Ghostscript is an incredibly significant program for free software-driven printing. Most printing software under Unix generates PostScript, which is typically a $100 option on a printer. Ghostscript, however, is free, and will generate the language of your printer from PostScript. .:: supplyautonomy.com ::. .:: webspeed.intensys.pl ::.

Ghostscript is available in several forms. The commercial version of Ghostscript, called Aladdin Ghostscript, may be used freely for personal use but may not be distributed by commercial entities. It is generally a year or so ahead of the free Ghostscript; at the moment, for example, it supports many color inkjets that the older Ghostscripts do not and has rather better PDF support.

The main free version of Ghostscript is GNU Ghostscript, and is simply an aged version of Aladdin ghostscript. This somewhat awkward arrangement has allowed Aladdin to be a totally self-funded free software project; the leading edge versions are done by L Peter and a few employees, and are licensed to hardware and software vendors for use in commercial products. Unfortunately, while this scheme has provided for L Peter's continued work on Ghostscript for years, it has also inhibited the participation of the wider free software community. Driver authors, in particular, find the arrangement poor. L Peter's retirement plans mandate a larger community involvement in the project, so he is considering license changes, and has established a SourceForge project.

The third version of Ghostscript is ESP Ghostscript, maintained by Easy Software Products (authors of CUPS) under contract from Epson. ESP Ghostscript is a combination of the gimp-print driver project's drivers and GNU Ghostscript, plus assorted usability patches. This version is not yet in full swing, but it will be available soon, and will hopefully simplify life for owners of Gimp-print-driven printers.

Whatever you do with gs, be very sure to run it with the option for disabling file access (-dSAFER). PostScript is a fully functional language, and a bad PostScript program could give you quite a headache.

Speaking of PDF, Adobe's Portable Document Format (at least through 1.3) is actually little more than organized PostScript in a compressed file. Ghostscript can handle PDF input just as it does PostScript. So you can be the first on your block with a PDF-capable printer.

10.1. Invoking Ghostscript

Typically, Ghostscript will be run by whatever filter you settle upon (I recommend Foomatic if your vendor didn't supply anything that suits you), but for debugging purposes it is often handy to run it directly.

gs -helpwill give a brief listing of options and available drivers (note that this list is the list of drivers compiled in, not the master list of all available drivers). .:: 693d173361fa3.site123.me ::.

You might run gs for testing purposes like: `gs <options> -q -dSAFER -sOutputFile=/dev/lp1 test.ps [Web Specs: React] .:: management.ju.edu.jo ::. '.

10.2. Ghostscript output tuning

There are a number of things one can do if Ghostscript's output is not satisfactory (actually, you can do anything you darn well please, since you have the source).

Some of these options, and others are described in the Ghostscript User Guide (the file Use.htm in the Ghostscript distribution; possibly installed under /usr/doc or/usr/share/doc on your system) are all excellent candidates for driver options in your filter system. .:: management.ju.edu.jo ::.

10.2.1. Output location and size

The location, size, and aspect ratio of the image on a page is controlled by the printer-specific driver in ghostscript. If you find that your pages are coming out scrunched too short, or too long, or too big by a factor of two, you might want to look in your driver's source module and adjust whatever parameters jump out at you. Unfortunately, each driver is different, so I can't really tell you what to adjust, but most of them are reasonably well commented. .:: management.ju.edu.jo ::.

10.2.2. Gamma, dotsizes, etc.

Most non-laser printers suffer from the fact that their dots are rather large. This results in pictures coming out too dark. If you experience this problem with an otherwise untunable driver, you could use your own transfer function. Simply create the following file in the ghostscript lib-dir and add its name to the gs call just before the actual file. You may need to tweak the actual values to fit your printer. Lower values result in a brighter print. Especially if your driver uses a Floyd-Steinberg algorithm to rasterize colors, lower values ( 0.2 - 0.15 ) are probably a good choice.

%!
%transfer functions for cyan magenta yellow black
{0.3 exp} {0.3 exp} {0.3 exp} {0.3 exp} setcolortransfer


It is also possible to mend printers that have some kind of color fault by tweaking these values. If you do that kind of thing, I recommend using the filecolorcir.ps, that comes with ghostscript (in the examples/ subdirectory), as a test page.

For many of the newer color inkjet drivers, there are command-line options, or different upp driver files, which implement gamma and other changes to adapt the printer to different paper types. You should look into this before playing with Postscript to fix things.

10.2.3. Color Printing in Ghostscript

Ghostscript's default color dithering is optimized for low-resolution devices. It will dither rather coarsely in an attempt to produce 60ppi output (not dpi, ppi - the "apparent" color pixels per inch you get after dithering). This produces rather poor output on modern color printers; inkjets with photo paper, in particular, are capable of much finer ppi settings.

To adjust this, use the Ghostscript option-dDITHERPPI=x, where x is the value to use. This may or may not have an effect with all drivers; many newer drivers (the Epson Stylusstp driver, for example) implement their own dithering and pay no attention to this setting. Some drivers can use either the regular Ghostscript or driver-specific dithering (the Canon Bubblejet .:: telegra.ph ::. bjc600 driver, for example).

Ghostscript's dithering is in fact rather rudimentary. Many things needed for good output on modern printers are simply not available in the Ghostscript core. Various projects to fix this situation—and the free software world does have the software to do so ready and waiting—are hampered by Ghostscript's licensing situation and the resulting "cathedral" development style. Beginning at the [Issues with SSL] Open Source Printing Summit 2000, however, all the necessary people are talking, so you can expect this situation to improve shortly.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this