WWW.THESIS.DISLIB.INFO
FREE ELECTRONIC LIBRARY - Online materials, documents
 
<< HOME
CONTACTS



Pages:   || 2 |

«The Linux Printing Usage HOWTO The Linux Printing Usage HOWTO Table of Contents The Linux Printing Usage HOWTO by Mark Komarinski markk ...»

-- [ Page 1 ] --

The Linux Printing Usage HOWTO

The Linux Printing Usage HOWTO

Table of Contents

The Linux Printing Usage HOWTO

by Mark Komarinski markk@auratek.com

1.Introduction

2.Printing Under Linux

3.Printing files

4.Miscellaneous Items

5.Answers to Frequently Asked Questions

6.Troubleshooting

7.References

1.Introduction

1.1 Linux Printing HOWTO History

1.2 Version History

1.3 Copyrights and Trademarks

1.4 Downloading the Linux Printing HOWTOs

1.5 Feedback

1.6 Acknowledgments

2.Printing Under Linux

2.1 History of Linux Printing

2.2 Printing a File Using lpr

2.3 Viewing the Print Queue with lpq

2.4 Canceling a Print Job Using lprm

2.5 Controlling the lpd program with lpc

2.6 The RedHat printtool

3.Printing files

3.1 Printing graphics files

3.2 Printing PostScript files

3.3 Printing PDF files

3.4 Printing TeX files

3.5 Printing troff formatted files

3.6 Printing man pages

4.Miscellaneous Items

4.1 Formatting Before Printing

4.2 The PRINTER Environment Variables

5.Answers to Frequently Asked Questions

6.Troubleshooting

7.References

–  –  –

by Mark Komarinski markk@auratek.com v1.2.2, 6 February 1998

1.Introduction • 1.1 Linux Printing HOWTO History • 1.2 Version History • 1.3 Copyrights and Trademarks • 1.4 Downloading the Linux Printing HOWTOs • 1.5 Feedback • 1.6 Acknowledgments

2.Printing Under Linux • 2.1 History of Linux Printing • 2.2 Printing a File Using lpr • 2.3 Viewing the Print Queue with lpq • 2.4 Canceling a Print Job Using lprm • 2.5 Controlling the lpd program with lpc • 2.6 The RedHat printtool

3.Printing files • 3.1 Printing graphics files • 3.2 Printing PostScript files • 3.3 Printing PDF files • 3.4 Printing TeX files • 3.5 Printing troff formatted files • 3.6 Printing man pages

4.Miscellaneous Items • 4.1 Formatting Before Printing • 4.2 The PRINTER Environment Variables

–  –  –

5.Answers to Frequently Asked Questions

6.Troubleshooting

7.References

1.Introduction This document describes how to use the line printer spooling system provided with the Linux operating system. This HOWTO is the supplementary document to the Linux Printing Setup HOWTO, which discusses the installation and setup of the Linux printing system. The material presented in this HOWTO should be equally relevent for all flavors of the BSD operating system in addition to the Linux operating system.

1.1 Linux Printing HOWTO History

Note from Mark Komarinski markk@auratek.com:

I'd like to thank Matt Foster for doing a lot of work in the re−write of this HOWTO. I'm keeping his style, and adding when necessary to keep everything updated.

Note from Matt Foster mwf@engr.uark.edu:

This version of the Linux Printing HOWTO is a complete rewrite of the one originally written by Grant Taylor grant@god.tufts.edu and Brian McCauley B.A.McCauley@bham.ac.uk. I have tried to keep with the coverage of material presented by Grant and Brian's HOWTO, but I have drastically modified the style of presentation and the depth of material covered. I feel that this makes the HOWTO more complete and easier to read. I can only hope that you agree.

1.2 Version History v1.2.2

• Re−indexed, other changes to fit in the new RedHat docs. Thanks Ed!

v1.2.1

• updates, some changes for Dr. Linux publication v1.2

–  –  –

v1.1

• revised some of the wording

• developed section on PostScript printing

• attempted to clarify some of the examples 8−)

• fleshed the discussion of the basic Linux printing utilities v1.0

• initial public release of the Printing Usage HOWTO

1.3 Copyrights and Trademarks Some names mentioned in this HOWTO are claimed as copyrights and/or trademarks of certain persons and/or companies. These names appear in full or initial caps in this HOWTO.

(c) 1995 Matt Foster (mwf@engr.uark.edu) (c) 1996−1997 Mark F. Komarinski (markk@auratek.com) All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice.

That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below.

In short, we wish to promote dissemination of this information through as many channels as possible.

However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs.

If you have questions, please contact Tim Bynum, the Linux HOWTO coordinator, at linux−howto@sunsite.unc.edu. You may finger this address for phone number and additional contact information.





–  –  –

1.4 Downloading the Linux Printing HOWTOs I recommend that if you want to print a copy of this HOWTO that you download the PostScript version. It is formatted in a fashion that is aesthetically appealing and easier to read. You can get the PostScript version from one of the many Linux distribution sites (such as SunSITE ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/).

1.5 Feedback Questions, comments, or corrections for this HOWTO may be directed to markk@auratek.com.

1.6 Acknowledgments Thanks go out to all of the people who took the time to read the alpha version of this HOWTO and respond with many helpful comments and suggestions−−−some of you may see your comments reflected in the version.

I'd also like to thank Matt Foster who did the original re−write.

2.Printing Under Linux This section discusses how to print files, examine the print queue, remove jobs from the print queue, format files before printing them, and configure your printing environment.

2.1 History of Linux Printing The Linux printing system−−−the lp system−−−is a port of the source code written by the Regents of the University of California for the Berkeley Software Distribution version of the UNIX operating system.

2.2 Printing a File Using lpr By far, the most simplistic way to print in the Linux operating system is to send the file to be printed directly to the printing device. One way to do this is to use the cat command. As the root user, one could do something like

–  –  –

In this case, /dev/lp is a symbolic link to the actual printing device−−−be it a dot−matrix, laser printer, typesetter, or plotter. (See ln(1) for more information on symbolic links.) For the purpose of security, only the root user and users in the same group as the print daemon are able to write directly to the printer. This is why commands such as lpr, lprm, and lpq have to be used to access the printer.

Because of this, users have to use lpr to print a file. The lpr command takes care of all the initial work needed to print the file, and then it hands control over to another program, lpd, the line printing daemon. The line printing daemon then tells the printer how to print the file.

When lpr is executed, it first copies the specified file to a certain directory (the spool directory) where the file remains until lpd prints it. Once lpd is told that there is a file to print, it will spawn a copy of itself (what we programmers call forking). This copy will print our file while the original copy waits for more requests. This allows for multiple jobs to be queued at once.

The syntax of lpr(1) is a very familiar one,

–  –  –

If filename is not specified, lpr expects input to come from standard input (usually the keyboard, or another program's output). This enables the user to redirect a command's output to the print spooler. As such,

–  –  –

The lpr command accepts several command−line arguments that allow a user to control how it works. Some of the most widely used arguments are: −Pprinter specifies the printer to use, −h suppresses printing of the burst page, −s creates a symbolic link instead of copying the file to the spool directory (useful for large files), and −#num specifies the number of copies to print. An example interaction with lpr might be something like

–  –  –

This command will create a symbolic link to the file thesis.txt in the spool directory for the printer named dj, where it would be processed by lpd. It would then print a second copy of thesis.txt.

For a listing of all the options that lpr will recognize, see lpr(1).

–  –  –

2.3 Viewing the Print Queue with lpq To view the contents of the print queue, use the lpq command. Issued without arguments, it returns the contents of the default printer's queue.

The returned output of lpq can be useful for many purposes.

–  –  –

2.4 Canceling a Print Job Using lprm Another useful feature of any printing system is the ability to cancel a job that has been previously queued.

To do this, use lprm.

–  –  –

The above command cancels all of the print jobs that are owned by the user who issued the command. A single print job can be canceled by first getting the job number as reported by lpq and then giving that number to lprm. For example,

–  –  –

would cancel job 31 (thesis.txt) on the default printer.

2.5 Controlling the lpd program with lpc The lpc(8) program is used to control the printers that lpd serves. you can enable or disable a printer or its queues, rearrange entries within a queue, and get a status report on the printers and their queues. Lpc is mostly used in a setup where there are multiple printers hanging off one machine.

–  –  –

A list of the available commands are in the lpd man page, but here are a few of the major commands you'll want to know about. Any commands marked with option can either be a printer name (lp, print, etc) or the keyword all, which means all printers.

• disable option − prevents any new printer job from being entered

• down option − disables all printing on the printer

• enable option − allow new jobs to enter the print queue

• quit (or exit) − leave lpc

• restart option − restarts lpd for that printer

• status option − print status of printer

• up option − enable everything and start a new lpd

2.6 The RedHat printtool Just a quick note here on RedHat's amazing printtool program. It seems to do everything that a magicfilter would do. RedHat already installs many of the programs to do the filtering. Here's how I have my printer set up under RH 4.0 with an HP LJ 4L connected to my parallel port (should be the same for other versions of RH as well).

• Become root and fire up printtool (if you su'ed, you remembered to SETENV DISPLAY :0.0 and xhost +, right?)

• Click "Add", and hit "OK" for a local printer.

• Fill in the printer device (/dev/lp1 for me)

• Fill in the input filter − Select a printer type, resolution, and paper size (ljet4, 300x300, and letter)

• Hit "OK" all the way back, and restart the lpd.

Just like rolling an /etc/printcap file by hand, you can have multiple printer definitions for each physical printer. One for different paper sizes, resolutions, etc.

3.Printing files This section covers printing the kinda of files that you'll run across in a Linux setup.

–  –  –

3.1 Printing graphics files Printing graphics files through a printer usually depends on the kind of graphics you're converting, and the kind of printer you want to send to. Dot matrix is usually out of the question due to differences in the way dot−matrix handles graphics. Your best bet in this situation is to see if your printer is compatable with an Epson or an IBM ProPrinter, then convert the graphics file to PostScript, then use Ghostscript (see next section) to print the graphics.

If you have a laser printer, things are a bit easier since many are compatable with PCL. This now gives you a few options. Some programs may output directly in PCL. If not, programs like NetPBM can convert into PCL. Last option is to use ghostscript (see next section).

Your absolutely best option is to install packages like NetPBM and Ghostscript then installing a magic filter to process the graphics files automagically.

3.2 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 $ 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/.

3.3 Printing PDF files Adobe has released an Acrobat reader for Linux, and it's available on the Adobe home page http://www.adobe.com. Its predecessor, xpdf, is also available. Both should print to a postscript device.



Pages:   || 2 |


Similar works:

«Cloud Financial Planning Pty Ltd ABN 32 206 837 858 Authorised Representative Dover Financial Advisers Pty Ltd Australian Financial Services Licensee Geelong Office Level 1 / 2a Belle Vue Arcade Highton Shopping Centre Highton Postal Address PO Box 6332 Highton VIC 3216 Victorian callers 03 5215 0400 Interstate callers 1300 85 35 48 e-mail admin@cloudfp.com.au website www.cloudfp.com.au 1 January 20XX Mr Homer and Mrs Marge Simpson 123 Simpson Street SPRINGFIELD VIC 3000 Dear Homer and Marge,...»

«EC SOCIO-ECONOMIC CHANGE, INDIVIDUAL REACTIONS AND THE APPEAL OF THE EXTREME RIGHT — SIREN EU RESEARCH ON SOCIAL SCIENCES AND HUMANITIES Socio-economic change, individual reactions and the appeal of the extreme right SIREN FINAL REPORT EUR 22069 EUR 22069 Interested in European research? RTD info is our quarterly magazine keeping you in touch with main developments (results, programmes, events, etc.). It is available in English, French and German. A free sample copy or free subscription can...»

«INTERAGENCY ADVISORY ON THE UNSAFE AND UNSOUND USE OF LIMITATION OF LIABILITY PROVISIONS IN EXTERNAL AUDIT ENGAGEMENT LETTERS PURPOSE This Advisory, issued jointly by the Office of Thrift Supervision (OTS), the Board of Governors of the Federal Reserve System (Board), the Federal Deposit Insurance Corporation (FDIC), the National Credit Union Administration (NCUA), and the Office of the Comptroller of the Currency (OCC) (collectively, the Agencies), 1] alerts financialinstitutions'[SeeFootnote...»

«Feather plucking in parrots. Feather plucking, also called feather picking or feather damaging behavior is a common behavioral disorder seen in captive psittacines, hook billed birds. These birds damage their own feathers by chewing on them, amputating, fraying, biting or pulling their own feathers out. The areas that birds usually pluck are the neck, chest, flank, wings and thighs; these are the areas that birds can easily reach with their beak. The down feathers and contour feathers are...»

«Form 604 Corporations Act 2001 Section 671B Notice of change of interests of substantial holder MRM To:Company Name/Scheme The Secretary Mermaid Marine Australia Limited Endeavour Shed 20 Mews Road Fremantle WA 6160 Fax: (08) 9431 7432 ACN: 083 185 693 1. Details of substantial National Australia Bank Limited (ACN 004 044 937) and its associated entities listed in holder Annexure A Name ACN (if applicable) give notice of a change in relevant interests 13/03/2013 There was a change in the...»

«Issue No. 1 Opportunities of Easy Panel™ Broadgate Construction Report Nathan Koekoek Bangkok, April 9th, 2013 Contents Introduction History of prefabricated panels Generic advantages Fire resistance Strength & durability Thermal & sound insulation Implications of Easy Panel™ construction Standardisation Efficiency Speed Easy Panel™ unique selling point Things to consider Perception Offsite inefficiencies To whom Easy Panel™ is suitable in particular Speed of construction Conclusion...»

«2012 Annual Convention Speaker Biographies February 11-14, 2012 Orlando World Center Marriott, Orlando, FL David B. Barr David Barr is the Chairman of PMTD Restaurants LLC and its affiliates (franchisees of KFC and Taco Bell) and Rita Restaurant Corp. In addition, he sits on the Board of Directors for Ms. Fields and TCBY, Del Frisco’s and Sullivan’s Steakhouses, and the Bistro Group (the second largest franchisee of TGI Fridays). Mr. Barr was previously the Chairman of Samuels Jewelers,...»

«Regulatory Connection Issue 11 May 2007 Welcome from CEO Welcome to the latest I would like to thank all of you for the hard work in implementing issue of Regulatory the provisions of the Code. Connection which recognises a milestone In this issue we have also published details of the funding levy for of which everyone in 2007. The total amount of the levy due from industry represents the financial services half of the total cost of funding of the Financial Regulator, the sector has reason to...»

«ISSN 1175-5326 (print edition) Zootaxa 1064: 51–64 (2005) www.mapress.com/zootaxa/ ZOOTAXA 1064 Copyright © 2005 Magnolia Press ISSN 1175-5334 (online edition) Neolyrium gen. n., first South American genus of net-winged beetles with 10-segmented antennae (Coleoptera: Lycidae) SERGEY V. KAZANTSEV Insect Centre, Donetskaya 13-326, 109651 Moscow, Russia kazantss@mail.ru Abstract New genus Neolyrium gen. n. with 10-segmented antennae is described from South America, its two species, N. duidaense...»

«CRNOGORSKA SPORTSKA AKADEMIJA, „Sport Mont“ časopis br. 12,13,14. Miroslav Smajić Slavko Molnar Fakultet sporta i fizičkog vaspitanja – Novi Sad RELACIJE BAZIČNO MOTORIČKIH SPOSOBNOSTI I SPECIFIČNE PRECIZNOSTI FUDBALERA UZRASTA 10 – 12 GODINA UVOD Problem istraživanja je analiziranje relacija bazično motoričkog prostora sa prostorom specifične preciznosti fudbalera uzrasta 10 – 12 godina. Predmet istraživanja su bazično motoričke sposobnosti i specifična preciznost...»

«Case: 1:11-cv-02548 Document #: 1-1 Filed: 04/15/11 Page 1 of 45 PageID #:8 TRADEX V. LACM, et al. EXHIBIT 1 Case: 1:11-cv-02548 Document #: 1-1 Filed: 04/15/11 Page 2 of 45 PageID #:9 EXHIBIT 1 Name of Offeree: Memorandum Number: Confidential Private Placement Memorandum March 2007 Last Atlantis Partners SPC Ltd a British Virgin Islands Segregated Portfolio Company This Confidential Private Placement Memorandum (this “Memorandum”) is provided to you on a confidential basis solely in...»

«U.S. DEPARTMENT OF THE INTERIOR GEOLOGICAL SURVEY OPEN FILE REPORT 01-312 The Containment of Soviet Underground Nuclear Explosions Vitaly V. Adushkin Institute of Dynamics of Geospheres Of the Russian Academy of Sciences Moscow, Russia William Leith U.S. Geological Survey Reston, Virginia 20192 This report is preliminary and has not been reviewed for conformity with U.S. Geological Survey editorial standards or stratigraphic nomenclature. Any use of trade, product, or firm names is for...»





 
<<  HOME   |    CONTACTS
2017 www.thesis.dislib.info - Online materials, documents

Materials of this site are available for review, all rights belong to their respective owners.
If you do not agree with the fact that your material is placed on this site, please, email us, we will within 1-2 business days delete him.