In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Composition of the printer:
The printer has its own CPU, memory, operating system and even hard disk. If it is a network printer, it should also run its own web server, and users can visit its website for configuration and management.
2 the language of the printer:
The printer uses Page description language (Page Description Language,PDL) to describe the page to be printed.
PDL-encoded pages can provide a smaller amount of data and higher transmission speed than the original image. Moreover, PDL can implement a page description that is independent of device and resolution.
Mainstream PDL:PostScript, PCL5, PCL6, PDF.
PostScript is the most common PDL on linux, and almost all page layout programs can generate PostScript.
3. The working process of the printer:
When the user presses the print button in the application, a print job is sent to the printer. After receiving the job described in PDL, the printer calls its own raster image processor to convert the file into bitmap form, a process called "raster image processing". After the printer receives this bitmap, it is ready to print. Some printers can understand almost all of the mainstream PDL, while others can't understand anything. The latter printers, called GDI printers, rely on computers to do raster processing and then receive ready-made bitmap images.
4. Printer driver:
The printer driver is not really a "driver" because it doesn't have much to do with hardware drivers. Converting files into PDL that the printer can understand is all the printer driver has to do.
5 、 CUPS:
CUPS is an acronym for Public UNIX Printing system (Comon UNIX Printing System).
CUPS is based on the server / client architecture.
CUPS uses the HTTP protocol to manage print tasks, and this management interface can be opened by accessing port 631 of the host using a browser. Enter http://localhost:631 in the address bar and press Enter.
6. The choice of printer:
Before choosing a printer, you should first know how much support the product can get under linux. The most direct way is to access www.linuxprinting.org 's Foomatic database, which divides printing into four levels from Paperweight to Perfectly. There is no doubt that Pefectly printers can get the best support under linux, and users should choose this category as much as possible.
7. How does CUPS identify the printer?
When the user assigns the printing task to the CUPS, the CUPS should know the PDL used by the currently connected printer and the functions that the printer can provide. All of this information is contained in the printer's PPD file. PPD stands for PostScript Printer Description, which is the description of the PostScript printer. This file records the printer's parameters and functions, CUPS filters, and printer drivers on other platforms to determine how to send print jobs to PostScript printers. Today, every PostScript printer provides a specific PDD file, which can usually be found on the installation CD.
For CUPS, non-PostScript printers can also be described using PDD files. As long as you find the PDD file for a printer, CUPS can drive it, at least in theory.
8. How to find the PDD file for a specific printer?
Linuxprinting.org provides a large number of such PDD files. All the user has to do is download the PDD file corresponding to the printer and copy it to the CUPS directory. Typically, this directory is / usr/share/cups/model (Ubuntu is / usr/share/ppd).
Sometimes the PPD file found may be a general-purpose PPD file for a certain type of printer, so it does not perform all the functions of the printer. But at least it's better than nothing.
9. Configure the printer:
Lpoptions-d N7400 # sets the N7400 as the default printer for the current user.
Lpr example.pdf # prints the example.pdf file.
Simply pass a file name as an argument to the lpr command, and CUPS will print the file using the default printer. If multiple printers are connected, you can use the-P option to specify which printer to use to print the document. For example, the following command explicitly specifies that the file example.pdf is printed using N7400.
Lpr-P N7400 example.pdf
10. Configuration file of CUPS:
The configuration file for CUPS is called cupsd.conf and is usually saved in the / etc/cups directory. This is a text file that can be viewed using the more or less command.
Less / etc/cups/cupsd.conf
In this file, Listen localhost:631 indicates that CUPS provides services on port 631.
CUPS can provide services to other hosts on the network. For CUPS to accept print jobs from other hosts, you should find the following lines in cupsd.conf:
Order allow,deny
Replace them with the following form. Where netaddress should be replaced with the IP address of the network.
Order allow,deny
Deny from all
Allow from 127.0.0.1
Allow from netaddress
What these lines mean: Deny from all indicates that CUPS does not accept print requests from any host. But the next two lines define two exceptions: Allow from 127.0.0.1 and Allow from netaddress allow computers from native (127.0.0.1) and netaddress to use print services.
In order for hosts on the network to see the printing service being provided by the CUPS server, you should also find the following line:
BrowseAddress @ LOCAL
Modify it to:
BrowseAddress broadcastAddress:631
Where broadcastAddress should be replaced with the broadcast address of the network (for example, 10.71.84.255). All-zero and all-one host addresses are reserved as network addresses and broadcast addresses.
After saving the configuration file, restart the CUPS server for the changes to take effect:
Sudo / etc/init.d/cups restart
11. Set the class of the printer:
To add a printer class, you can use the lpadmin command, the following two commands to create a printer class office, and add printers N7400 and zoe to this class.
Lpadmin-p N7400-c office
Lpadmin-p zoe-c office
Remove a printer from the class, using the-r option:
Lpadmin-p zoe-r office
Delete classes and printers using the-x option:
Lpadmin-x zoe # remove printer zoe
Lpadmin-x office # Delete printer class office
12. Printer queue:
Lpq can query the status information of the current print job from the CUPS server.
The third in the lpq is listed as the job number of the report. To delete a print job, you can use the lprm command to provide the job number as a parameter.
For example: lprm 5 # deletes the print job with assignment number 5.
13. Status of the printer:
You can use the lpstat-t command to display status information for the current CUPS.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.