Printing from within an application is very easy, selecting the Print option from the menu.
From the command line, use the lp or lpr command.
These commands can read from a pipe, so you can print the output of commands using
There are many options available to tune the page layout, the number of copies, the printer that you want to print to if you have more than one available, paper size, one-side or double-sided printing if your printer supports this feature, margins and so on. Read the man pages for a complete overview.
Once the file is accepted in the print queue, an identification number for the print job is assigned:
> lp /etc/profile request id is blob-253 (1 file(s))
To view (query) the print queue, use the lpq or lpstat command. When entered without arguments, it displays the contents of the default print queue.
> lpq blob is ready and printing Rank Owner Job File(s) Total Size active davy 253 profile 1024 bytes davy:
> lpstat blob-253 davy 1024 Tue 25 Jul 2006 10:20_01 AM CEST
Which is the default printer on a system that has access to multiple printers?
> lpstat -d system default destination: blob
What is the status of my printer(s)?
> lpstat -p printer blob now printing blob-253. enabled since Jan 01 18:01
If you don’t like what you see from the status commands, use lprm or cancel to delete jobs.
In the graphical environment, you may see a popup window telling you that the job has been canceled.
In larger environments, lpc may be used to control multiple printers. See the Info or man pages on each command.
There are many GUI print tools used as a front-end to lp , and most graphical applications have a print function that uses lp . See the built-in Help functions and program specific documentation for more.
Why are there two commands for every task related to printing?
Printing on UNIX and alikes has a long history. There used to be two rather different approaches: the BSD-style printing and the SystemV-style printing. For compatibility, Linux with CUPS supports the commands from both styles. Also note that lp does not behave exactly like lpr , lpq has somewhat different options than lpstat and lprm is almost, but not quite, like cancel . Which one you use is not important, just pick the commands that you are comfortable with, or that you may know from previous experiences with UNIX-like systems.
If we want to get something sensible out of the printer, files should be formatted first. Apart from an abundance of formatting software, Linux comes with the basic UNIX formatting tools and languages.
Modern Linux systems support direct printing, without any formatting by the user, of a range of file types: text, PDF, PostScript and several image formats like PNG, JPEG, BMP and GIF.
For those file formats that do need formatting, Linux comes with a lot of formatting tools, such as the pdf2ps , fax2ps and a2ps commands, that convert other formats to PostScript. These commands can create files that can then be used on other systems that don’t have all the conversion tools installed.
Apart from these command line tools there are a lot of graphical word processing programs. Several complete office suites are available, many are free. These do the formatting automatically upon submission of a print job. Just to name a few: OpenOffice.org , KOffice , AbiWord , WordPerfect , etc.
The following are common languages in a printing context:
groff : GNU version of the UNIX roff command. It is a front-end to the groff document formatting system. Normally it runs the troff command and a post-processor appropriate for the selected device. It allows generation of PostScript files.
TeX and the macro package LaTeX : one of the most widely used markup languages on UNIX systems. Usually invoked as tex , it formats files and outputs a corresponding device-independent representation of the typeset document.
Technical works are still frequently written in LaTeX because of its support for mathematic formulas, although efforts are being made at W3C (the World Wide Web Consortium) to include this feature in other applications.
SGML and XML: Free parsers are available for UNIX and Linux. XML is the next generation SGML, it forms the basis for DocBook XML, a document system (this book is written in XML, for instance).
Printing documentation
The man pages contain pre-formatted troff data which has to be formatted before it can roll out of your printer. Printing is done using the -t option to the man command:
man -t command > man-command.ps
Then print the PostScript file. If a default print destination is configured for your system/account, you can just issue the command man -t command to send the formatted page to the printer directly.
Anything that you can send to the printer can normally be sent to the screen as well. Depending on the file format, you can use one of these commands:
PostScript files: with the gv (GhostView) command.
TeX dvi files: with xdvi , or with KDE ‘s kdvi .
PDF files: xpdf , kpdf , gpdf or Adobe’s viewer, acroread , which is also available for free but is not free software. Adobe’s reader supports PDF 1.6, the others only support PDF versions up to 1.5. The version of a PDF file can be determined using the file command.
From within applications, such as Firefox or OpenOffice, you can usually select Print Preview from one of the menus.
Источник
Thread: Image Viewers which can print
Thread Tools
Display
Image Viewers which can print
I want a simple fast image viewer that can also print. gpicview doesn’t seem to print.
My research so far has come up with the following.
gimp gpicview ristretto supports animated GIF gThumb fbi Shotwell qiv pqiv (scaled down version of qiv) imagemagick f-spot eog or the Eye of GNOME is a simple graphics viewer Geeqie Gwenview Mirage xloadimage
I’ve ruled out gimp because for this app I just want to view and print.
Re: Image Viewers which can print
I want a simple fast image viewer that can also print. gpicview doesn’t seem to print.
My research so far has come up with the following.
gimp gpicview ristretto supports animated GIF gThumb fbi Shotwell qiv pqiv (scaled down version of qiv) imagemagick f-spot eog or the Eye of GNOME is a simple graphics viewer Geeqie Gwenview Mirage xloadimage
I’ve ruled out gimp because for this app I just want to view and print.
I use the default image viewer with Ubuntu 10.10 (Eye of GNOME) and it does support printing, though as I do not have a printer attached, I can only confirm that it does print images to file (PDF or PS) without any problems.
And its by no means bloated or slow. If you’re under KDE, then Gwenview does the job!
Re: Image Viewers which can print
Results of my explorations for those who come hereafter. All I wanted was to be able to view, do small edits like crop and cut and paste and print.
I’ve settled on Mirage. Though their forum seems to have an out of date SSL cert. Pinta was a close second.
I’ve now tried most of these below. My comments may be wrong and if so please correct them.
gimp — big program, closer to photoshop
gpicview — no good for my needs. can’t crop
ristretto — supports animated GIF. described as picture viewer so I didn’t try it
gThumb — cropping tools etc on far right at top
fbi — geeky tool for viewing images on the console
Shotwell — photo organizer to view, and share with others.
qiv — doesn’t allow editing pqiv (scaled down version of qiv)
imagemagick geeky command line tool
f-spot awkard opening files and didn’t seem to recognise my files. not a goer
eog — Eye of GNOME (but called Image Viewer — go figure) graphics viewer. can’t edit despite having edit menu!
Geeqie needs an external editor
gwenview takes a long time to load. I couldn’t cut and paste the awkward cropping tool
Mirage — neat and simple — gets my vote and does all I want it to except keyboard shortcuts like ctrl-x for cropping
xloadimage — is this another console based app? didn’t try it
Running the installer requires that you open a command shell to enter commands. To do this, open a terminal or console window (how do I open a terminal?).
In the terminal/console, enter the following commands (type all the text after the $ character and then press enter):
These instructions assume that the hplip-3.21.8.run file was downloaded to your Desktop directory. You may have to adjust the ‘cd’ command based on where your web browser saved the file on your system.
install_1.png
Step 3: Select the Install Type
Select the install mode: Automatic (enter an ‘a’) or Custom (enter a ‘c’). We recommended that most users select the Automatic install mode (what settings does automatic install mode use?)
install_2.png
Step 4: Verify your Linux Distribution
Ensure the installer detected the correct Linux distribution. Different Linux versions use different install procedures if the incorrect version is selected, the installer may fail.
install_3.png
Step 5: Enter Your root/Superuser User Password
install_4.png
Step 6: Read the Installation Notes
Depending on your Linux distribution some steps may need to be completed before going further with the HPLIP install. Please follow any directions given.
install_5.png
Step 7: Detect Any Missing Dependencies
The installer will now detect what dependencies your system will need to install before installing HPLIP. In addition any package manager clean up steps will be ran. These are executed to try and minimize any potential package manager problems.
install_6.png
Step 8: Download and Install Any Missing Dependencies
If your system is missing any dependencies they are now downloaded and installed.
Step 9: ‘./configure’ and ‘make’ will run
./configure prepares HPLIP for install as well as your system is verified to have all the required dependencies for HPLIP.
‘make’ is then executed. Make compiles («builds») HPLIP for your system.
Step 10: ‘make install’ is Run
‘make install’ is the actual install procedure, this step is where HPLIP is actually being installed to your system.
Using ‘hp-setup’ to configure your printer
This guide will walk you through configuring your printer using ‘hp-setup’.
Step 11: Select How Your Printer will be Connected to Your Computer
The first step is to select the printer connection type:
Step 12: Select the Printer to be Configured
Next the setup tool will display printers detected (depending on the connection type selected):
Step 13: Select the PPD file (or driver) to be Used for Your Printer
The PPD files (drivers) which are most similar to your printer are displayed. Select the appropriate PPD file for your printer.
Usually you will want to select the recommended PPD file.
Step 14: Confirm the Printer Settings and Finish the Configuration Process
Click «AddPrinter» to complete the printer setup process:
Источник
Installing HPLIP
Package Install
A pre-build package is available for certain Linux distributions, based on the popularity of the distribution.
Red Hat Enterprise Linux (6.0, 7.0,8.0)
Download a package by click here.
We recommend that most users use the Automatic Installer .
Linux distributions supported by the automatic installer:
SUSE Linux (13.2, 42.1, 42.2, 42.3,15.0,15.1,15.2,15.3)
Manjaro Linux (17.1.4,18.0,18.0.4,18.1.0,18.1.2,19.0,20.0,20.2,21.0.7)
Instructions for using the Automatic Installer.
Manual Install
While this is the more traditional method to download and install HPLIP, it requires a degree of knowledge that users new to Linux may find difficult. It requires that you manually install dependencies and run build and install commands in a console/terminal.
To use it, follow the directions at our Manual Installation Instructions page.