One solution that usually works is to use pdfjam from the texlive distribution
> pdfinfo in.pdf
Producer: Acrobat Distiller 6.0.1 (Windows)
Page size: 612 x 792 pts (letter)
Page rot: 0
File size: 66676 bytes
PDF version: 1.4
> pdfjam --outfile out.pdf --paper a4paper in.pdf
> pdfinfo out.pdf
I had the same issue and I couldn't print any images either with most GTK+ applications.
The latest GTK3 (3.22) requires the package gtk3-print-backends for printers to be listed in GTK3 print dialogs.
Installing that package did the trick for me.
I'm running Arch Linux.
In a nutshell, a spooler consists of:
a background program
a directory per printer
a file per print job
In your case, the foreground program (lpr) sends its print jobs to cups, which stores it and then uses serial, parallel, USB, network, ... communication to actually start the printing process.
So that's why nowadays even when the printer runs out of ...
You can use the vim editor to pretty print arbitrary files vim can read. Use the following to create a PostScript file.
-c 'hardcopy > output.ps' \
-c quit <input_file>
If you want a PDF file, add && ps2pdf output.ps to the command line.
You can also write a small script that pastes the current clipboard content into a temporary ...
There are two traditional printing interfaces in the unix world: lp (the System V interface) and lpr (the BSD interface). There are three printing systems available on Linux: the traditional BSD lpr, the newer BSD system LPRng, and CUPS. LPRng and CUPS both provide a BSD-style interface and a System-V-style interface.
Nowadays, CUPS is the de facto standard ...
There is also Muttprint. It does support UTF-8 and its output looks decent by default. Muttprint uses LaTeX and provides hooks for customization.
Since I am printing mails from different environments I can't use a default printer. Thus I have set it up (via ~/.muttrc) to use a PDF viewer where I can dynamically select a printer:
set print_command='set -e; ...
You can configure CUPS defaults for your account by running the lpoptions command. Run lpoptions -l to see what options are available for your printer, and determine which one corresponds to the color/monochrome choice. For example, with this output
$ lpoptions -l | grep Color
ColorModel/Color Model: Gray Black *RGB CMY CMYK KCMY
I would set ColorModel to ...
CUPS understands many different types of files directly, including text, PostScript, PDF, and image files. This allows you to print from inside your applications or at the command-line, whichever is most convenient! Type either of the following commands to print a file to the default (or only) printer on the system:
Use the -d ...
To cancel a print job :
List all jobs:
Rank Owner/ID Class Job Files Size Time
active bob A 11 zarma.txt 8000 10:12:10
Delete the job by it's id, which is 11 here:
You must be root to delete jobs that you don't have initiated.
If the printer is not the default printer, add the -P option, e.g....
You can use vim.
vim -c hardcopy -c quit /path/to/file
This will print the file and quit immediately. By default, vim prints with syntax highlighting.
If you need to print from stdout of some command, you can do this:
cat some_file.c | vim -c hardcopy -c 'quit!' -
If you want to save the .ps for later, you can do that by adding redirection to the ...
The shortest path here is probably to use a2ps, it generates monospaced postscript by default.
You can install a2ps with brew, i.e. brew install a2ps
Depending on its setup, it will send the output directly to stdout or lp, override with -o. Also, a2ps recognizes several programming languages and pretty-prints them.
a2ps -o output.ps infile.text
A print spool is effectively a buffer, managed per job, with a program (the spooler) responsible for receiving jobs from submitting programs and feeding them to one or more printers. The point of a spool is to handle communication between two systems with different speeds, and to control access to shared devices. The former means programs can submit print ...
I see this line in the logs (/var/log/cups/error_log):
m_Job initialization failed with error = 48
A web search indicates that many HP printers, including yours, require a proprietary plugin to print, and that you will see this message if you haven't install this plugin (e.g. Fedora bug #611255).
The logs from hp-check -t confirm this:
error: Required ...
The print server running CUPS is the only machine that needs to have the drivers. Read about CUPS on Wikipedia for example - in Overview section it states this quite clearly :
CUPS allows printer manufacturers and printer-driver developers to more easily create drivers that work natively on the print server. Processing occurs on the server, allowing for ...
You have 2 choices.
Wireless USB Bridge
You can either get a little wireless/USB device that will share the printer out via wireless. You then connect to it using IPP such as ipp://<ip address of wireless bridge>/USB_queue.
A device such as this would be up to the task: NETGEAR PS121 USB 2.0 Mini Print Server.
We use such a device where I work. ...
Thx to @RuiFRibeiro I found some resources on the AskUbuntu site and one of them was pointing to an obsolete cups.org FAQ, which led me to a link that I had missed before: https://www.cups.org/doc/network.html . This page lists the most important differences:
The AppSocket protocol (sometimes also called the JetDirect protocol, owing to ...
Have a look at the files in /etc/cups
I do not have a Fedora 15 system to hand - but looking at a recent RHEL box, the relevant bits are in /etc/cups/cupsd.conf
# Administrator user group...
SystemGroup sys root
# Restrict access to configuration files...
Require user @SYSTEM
When called without any options, column makes each delimited strings align to the nearest TAB-STOP COLUMN. In a terminal, that is typically on every 8th character column.. Have a look at this example:
Create a file (ztxt) containing some tab-character \t delimited strings, spread over 3 lines which end with newline-character \n:
The right place to set options for the (/this) printer, is in /opt/brother/Printers/mfc9340cdw/inf/brmfc9340cdwrc. The problem of always resulting in a DuplexTumble printing, was forced by the respective code-line (BRDuplex=DuplexTumble) in this configurations file.
Setting the option in question to BRDuplex=DuplexNoTumble, and restarting the cupsd service (...
You should be able to list the printer options with
(add -p and the name of the printer if it is not the default). You should see lines like
InputSlot/Media Source: *Auto Main
i.e. lines in the format of keyword/longer description: value value ..., with one of the values having a * to show it is the default. The actual keywords and values ...
Three or four times I've had my CUPS driven printer quit, with the `pending' or other such problems and I've never fixed the printer until I've installed a new Linux. I am not stupid but it makes me feel stupid that I can't figure out how in hell to fix CUPS once it's gone wrong. I want something different or have the CUPS geniuses damn well tell you how ...
See the pdfseparate and pdfunite commands from poppler-utils. The first to separate the pages from each document into individual files, and the second to merge them in the order you want in a new document.
Also note that since scanners give you raster images anyway (which some like yours can concatenate into a PDF files), maybe you can configure it to ...
Maybe you are looking for lpoptions ?
Use lpoptions -l in order to know what's the name for your printer.
You can play it like thi (example with an HP Photosmart) :
lp -o scaling=//100// -oColorModel=KGray image.jpg
Printing via CLI
One method would be to use html2ps.
$ html2ps http://example.com/file.html | lpr
$ html2ps http://example.com/file.html | lp -d someprinter
Saving to PDF
As an added bonus if you just want to keep it as a PDF file you can use ps2pdf like so:
$ html2ps http://example.com/file.html | ps2pdf - somfile.pdf
Print a Web ...
PCL and PostScript (PS) are not driver specifications but page description languages (PDL): if your printer supports either of these, the job of the printer driver would be to convert the print job to either PCL or PS.
Both PCL and PS can do high-quality photos. But PCL is actually more efficient with large high-resolution bitmap images, especially when ...