Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
3738
views
Ubuntu Linux - Slow printing with lp command
I asked here some months ago how to print and check results with lp command (CUPS) in Ubuntu. After few working around, I was able to print normal text files. I was able to print selecting some options (double sided print, media size, paper tray input, etc.) I got the linux drivers here (PPD files):...
I asked here some months ago how to print and check results with lp command (CUPS) in Ubuntu.
After few working around, I was able to print normal text files. I was able to print selecting some options (double sided print, media size, paper tray input, etc.)
I got the linux drivers here (PPD files): https://www.openprinting.org/download/PPD/
Now I have a little problem: When I send a .pdf file to the printer (Ricoh MP Aficio 1106 EX connected by TCP-IP), the print goes slow, getting +30 seconds to send the file to the printer. The .txt files print at the moment I send them. Do you have any idea how to solve it?
I tryied change the socket of the machine to 9100 port, but that only generates errors.
EDIT1:
I tryied using LPR command, instead LP:
lpr -sPrinterIP /absolute/path/to/file.pdf
But works slowly too.
EDIT2:
I installed qz-tray, a kind of print server/API. When I try PDF demo, it prints slow too.
EDIT3:
I tryied now with default PDF viewer (EVINCE) because I though I have a lack of memory and printed the same file. It worked well, at normal speed.
EDIT4:
I tyied some other drivers (generic and recomended by the printer maker ones), same speed.
EDIT5:
I found this link: https://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS
But cannot understand if filtering is "f..king me off", because my printer is a PCL one (and i am using a pxl driver...). Could anyone explain me this?
EDIT 6:
Found the origin of the problem: When I print a text-only-pdf file, it works like a charm. But when I send an image-pdf file, the print enters in a pre-print process (I cannot completely assure this) and get +30seconds to send any package to printer (this checked with wireshark).
I can asume that PPD file (driver file provided by Ricoh Support) has anything in the code that send any order to process the file.
I found this in the PPD file. I think is the root of this slowing problem:
*%========== Ghostscript Command line ==========
*FoomaticRIPCommandLine: "(printf '\033%%-12345X@PJL\n@PJL JOB\n@PJL SET COPIES=&copies;\n'%G|perl -p -e "s/\x26copies\x3b/1/"
(gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -dNOMEDIAATTRS -dNOINTERPOLATE %B%A%C %D%E | perl -p -e "s/^\x1b\x25-12345X//" | perl -p -e "s/\xc1\x01\x00\xf8\x31\x44/\x44/g"
(printf '@PJL\n@PJL EOJ\n\033%%-12345X&apos"
*End
Found this article https://lists.linuxfoundation.org/pipermail/printing-foomatic/2012/002791.html taht confirms my ideas: the ppd driver is rendering all files with ghostcript.
EDIT 7:
Ricoh support told me that "lp" printing command may be using "default PDF viewer" to process the file, and slow the print process. I don't know how to check it.
Thanks a lot.
Barragán Louisenbairn
(43 rep)
May 26, 2017, 05:50 PM
• Last activity: Jul 3, 2025, 09:06 AM
0
votes
0
answers
44
views
How can I cause lp to be able to print a jpeg?
`Lp` will not print an image to a printer when the image is stored as a jpeg. If I convert the image using `convert image.jpeg image.png` and then `lp image.png`, then lp will print the png to my printer. But, `lp image.jpeg` fails to queue any print job or show any error. General web reports that `...
Lp
will not print an image to a printer when the image is stored as a jpeg. If I convert the image using convert image.jpeg image.png
and then lp image.png
, then lp will print the png to my printer. But, lp image.jpeg
fails to queue any print job or show any error.
General web reports that lp
can print a jpeg
, but my Debian 13 basic install won't do it and such has been the case many years of previous installs.
I could create a function which converts a jpeg
to a png
automatically, but I imagine lp
uses libraries to convert files for printing. I have no idea how lp
performs basic conversion or what toolboxes it uses. What do I need to install to enable lp
to directly print jpeg
image files?
* I am using the cups printing system and systemctl status cups.service
says that the service is active
and the scheduler is running
.
* file -bi
reports image/jpeg; charset=binary
for the images that lp
cannot print.
* apt-cache policy cups-filters-core-drivers
says that the latest trixie/main and sid/main package candidate, version 1.28.17-6
is installed.
Paul
(238 rep)
May 31, 2025, 12:03 AM
• Last activity: May 31, 2025, 09:30 PM
3
votes
1
answers
2122
views
lp & Epson WF: set quality of printing
I use Epson WF 7510 printer, and I can print in any quality I choose (draft/normal/best) using system tools (OS X). But I cannot change the quality of printing in command line: `lp -o EPIJ_Qual=...` has no effect. How can I change the quality of print? The output of `lpoptions -l` is as follows: EPI...
I use Epson WF 7510 printer, and I can print in any quality I choose (draft/normal/best) using system tools (OS X). But I cannot change the quality of printing in command line:
lp -o EPIJ_Qual=...
has no effect.
How can I change the quality of print?
The output of lpoptions -l
is as follows:
EPIJ_PSrc/Page Setup: *2 3
EPIJ_Size/Paper Size: 1 74 76 6 23 *0 10 2 3 70 28 29 97 7 25 27 112 26 4 5
EPIJ_Medi/Media Type: *0 12 92 13 15 97 117 93
EPIJ_Ink_/Grayscale: *1 0
EPIJ_Mode/Mode: *0 3
EPIJ_APri/Automatic: 0 *1 2
EPIJ_Manu/Custom: *0
EPIJ_Qual/Print Quality: 301 302 303 *304 305 306 307
EPIJ_Hori/Mirror Image: *0 1
EPIJ_CMat/Color Settings: *0 1 2 3
EPIJ_CCor/Mode: 3 *6
EPIJ_Gamm/Gamma: 0 *1
EPIJ_UEpL/EPSON Color LUT: *0 1
EPIJ_ERGB/E-RGB: *0 1
EPIJ_ECAv/Advanced Settings: *0 1
EPIJ_Brit/Brightness: -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
EPIJ_Cont/Contrast: -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
EPIJ_Satu/Saturation: -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
EPIJ_Cyan/Cyan: -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
EPIJ_Mage/Magenta: -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
EPIJ_Yell/Yellow: -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
EPIJ_ATon/Scene Correction: *7 11 12 13 4 8
EPIJ_AFil/Sharpen: *0 1
EPIJ_AGai/Sharpness Option: *1 2
EPIJ_ACam/Digital Camera Correction: *0 1
EPIJ_DCCT/Image Purelyzer Option: *0 1
EPIJ_OSColMat/ColorMatching: *1 2
EPIJ_HdofClSp/Use Generic RGB: 0 *1
EPIJ_OSCMProf/CustomColorMatchingProfile: *0 1 2 3
EPIJ_REye/Fix Red-Eye: *0 1
EPIJ_Bdls/Borderless: *0 1
EPIJ_exmg/Expansion: 0 1 *2
EPIJProfileSpec/EPSON Profile: *0 1
ColorModel/ColorModel: *RGB Mono
MediaType/MediaType: *0 12 92 13 15 97 117 93
Resolution/Resolution: 120x120dpi 360x360dpi *720x720dpi
PageSize/Media Size: *A4 A4.NMgn EPKG EPKG.NMgn EPPhotoPaper2L EPPhotoPaper2L.NMgn A6 A5 A3 A3.NMgn EP13x19 EP13x19.NMgn B4 B5 EPPhotoPaperLRoll EPPhotoPaperLRoll.NMgn EPIndexCard5x8 EP8x10in EPHiVision102x180 EPHiVision102x180.NMgn EP100x148mm EP100x148mm.NMgn Env10 EnvDL EnvC4 EnvC6 Letter Legal Custom.WIDTHxHEIGHT
EPIJ_BSSv/Skip Blank Page: *0 1
EPIJ_Silt/Quiet Mode: *0 1
EPIJ_BkPr/Permit temporary black printing: *0 1
EPIJ_OPT_Bi_D/High Speed Printing: 0 *1
EPIJ_ENAL/Warning Notifications: 1-0_2-0_3-0_4-0 *1-1_2-1_3-1_4-1
Usage of other options like -o EPIJ_Hori=1
has effect.
pantlmn
(131 rep)
Sep 24, 2015, 02:05 AM
• Last activity: Apr 3, 2025, 11:04 AM
1
votes
1
answers
186
views
How to print on endless paper on a CUPS printer using lp/lpr?
The Situation ----------------- I'm trying to print on a [Brother QL-570](https://support.brother.com/g/b/producttop.aspx?c=us&lang=en&prod=lpql570eus "Brother support page") I set up on a Raspberry Pi using CUPS. The printer is working well using `lp -d Brother_QL-570 test.pdf`. However, when I ins...
The Situation
-----------------
I'm trying to print on a [Brother QL-570](https://support.brother.com/g/b/producttop.aspx?c=us&lang=en&prod=lpql570eus "Brother support page") I set up on a Raspberry Pi using CUPS.
The printer is working well using
lp -d Brother_QL-570 test.pdf
. However, when I insert an endless label (a 30m long, 62mm wide label) I want it to print the exact length of the pdf file. For example, if the pdf provided has a format of 62x200, I want the printer to produce a 62mmx200mm long label.
If I use my Windows machine this works, but with lp, it doesn't.
lpoptions -p Brother_QL-570 -l
yields the following: https://pastebin.com/yBJHw7a7 . CUPS has [these settings](https://drive.google.com/file/d/1R5uMX46Qfb52yDMFanejrm6Em7EVoYKj/view?usp=sharing)
The printed label is always 62mmx100mm.
I did use brpapertoollpr_ql570 -P Brother_QL-570 -n long_label -w 62 -h 200
in combination with lpr -P Brother_QL-570 -o media=long_label test.pdf
to successfully to print 62mmx200mm labels, but creating a new media size for every new pdf I want to print would be quite tedious.
Log files
-----------------
Job 26 is from windows (working)
Job 27 is from lpr (too short)
[CUPS error_log](https://pastebin.com/SUdu1wDj)
printjob-data captured following [this guide](https://wiki.ubuntu.com/DebuggingPrintingProblems#Capturing_print_job_data)
job 26
job 27
MrGlue
(11 rep)
Aug 25, 2023, 02:47 PM
• Last activity: Jul 20, 2024, 04:17 PM
2
votes
2
answers
6346
views
Unable to print with lp "No such file or directory"
I have a setup that worked fine (on Synology NAS), until a recent update. lp can apparently not print, even though the printer seems to exist okay: ``` $ lpstat -p -d printer HP8210 is idle. enabled since Fri 25 Feb 2022 11:35:36 AM CET printer HP8740 is idle. enabled since Mon 28 Feb 2022 10:28:47...
I have a setup that worked fine (on Synology NAS), until a recent update.
lp can apparently not print, even though the printer seems to exist okay:
$ lpstat -p -d
printer HP8210 is idle. enabled since Fri 25 Feb 2022 11:35:36 AM CET
printer HP8740 is idle. enabled since Mon 28 Feb 2022 10:28:47 AM CET
$ ls -l /opt/bin/lp
-rwxr-xr-x 1 root root 18568 Oct 7 2018 /opt/bin/lp
$ /opt/bin/lp -d HP8740
/opt/bin/lp: No such file or directory
$ echo "foo" | /opt/bin/lp -d HP8740 2>&1
/opt/bin/lp: No such file or directory
I assume that "No such file or directory" means that something is incorrect regarding the printer/device configuration? It is reported here as an incorrect/inadequate output: https://bugzilla.redhat.com/show_bug.cgi?id=1811716
Looks lpr works fine, though.
How can that be troubleshot?
Edit: Added ls output, lpr output, and link to issue reported against lp on the output message.
Dennis Thrysøe
(121 rep)
Feb 28, 2022, 11:54 AM
• Last activity: Apr 25, 2024, 04:08 AM
6
votes
1
answers
19168
views
How to add a USB printer using lpadmin
I'm trying to use this old technology called USB ;) I call it old because all the tutorial that I find on-line deal with wireless printers or IP ones. The man for `lpadmin` is very unclear how to go about adding a USB printer, and so I come here for some help. When I print `dmesg` I can see my print...
I'm trying to use this old technology called USB ;) I call it old because all the tutorial that I find on-line deal with wireless printers or IP ones.
The man for
lpadmin
is very unclear how to go about adding a USB printer, and so I come here for some help.
When I print dmesg
I can see my printer being detected over USB
usb 1-1.3: new high-speed USB device number 7 using dwc_otg
usb 1-1.3: New USB device found, idVendor=03f0, idProduct=2b17
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: HP LaserJet 1020
usb 1-1.3: Manufacturer: Hewlett-Packard
usb 1-1.3: SerialNumber: FN0JW5E
usblp 1-1.3:1.0: usblp0: USB Bidirectional printer dev 7 if 0 alt 0 proto 2 vid 0x03F0 pid 0x2B17
# My question is
How can I add it, because it seams this command is adding the printer but there is no communication, and I'm not sure if I have malformed the USB part:
lpadmin -p HP1020 -E -v "usb://Hewlett-Packard/HP%20LaserJet%201020?serial=FN0JW5E" -m lsb/usr/hplip/HP/hp-laserjet_1020-hpijs.ppd
Also, what would be the simplest command to check if I can communicate with the printer. I don't need to print anything, just to be able to see there is communication. This will help me debug the drivers.
David Gatti
(275 rep)
Mar 11, 2017, 10:34 AM
• Last activity: Apr 17, 2024, 11:53 AM
0
votes
1
answers
171
views
Print two half-sized copies of a two-sided document at once
I have a two-sided, us-letter format document that I'd like to print two copies at once, by resizing it to half letter (a.k.a. [statement, or organizer L](https://en.wikipedia.org/wiki/Paper_size#Half_letter)). My current workflow is very inconvenient: - The original document is two-sided, A, B, C,...
I have a two-sided, us-letter format document that I'd like to print two copies at once, by resizing it to half letter (a.k.a. [statement, or organizer L](https://en.wikipedia.org/wiki/Paper_size#Half_letter)) .
My current workflow is very inconvenient:
- The original document is two-sided, A, B, C, etc.
- Using PDFSam's [mix-pdf](https://pdfsam.org/mix-pdf/) , duplicate each page (so that the document is A, A, B, B, C, C, …),
- Using pdfjam, resize the document and have two pages by page (so that I have A A on the same page, on landscape mode, one of top of the other, etc.),
- Print using
lp -o sides=two-sided-long-edge
.
I am sure there is a simpler way to achieve this, but couldn't find it. An additional hurdle of my current way of doing is that pdfjam introduces extra margin, that I have to remove using trim
.
Clément
(378 rep)
Nov 25, 2023, 03:02 PM
• Last activity: Nov 26, 2023, 08:40 PM
0
votes
0
answers
160
views
Using the lp command triggers rcu_sched self-detected stall on CPU
When I use an old printer via the lp module, and after having loaded the module `modprobe lp`, if I output characters to the lp0 module, `echo 1>lp0`, my computer desktop gets stuck, (but connecting to my computer remotely is not a problem) This is my dmesg log: lp0: using parport0 (interrupt-driven...
When I use an old printer via the lp module, and after having loaded the module
modprobe lp
, if I output characters to the lp0 module, echo 1>lp0
, my computer desktop gets stuck, (but connecting to my computer remotely is not a problem)
This is my dmesg log:
lp0: using parport0 (interrupt-driven).
rcu: INFO: rcu_sched self-detected stall on CPU
rcu: 0-....: (1 GPs behind) idle=866/0/0x7 softirq=37271/37271 fqs=6350
(t=15000 jiffies g=56737 q=16517)
Task dump for CPU 0:
task:swapper/0 state:R running task stack: 0 pid: 0 ppid: 0 flags:0x0000002a
Call trace:
dump_backtrace+0x0/0x1e8
show_stack+0x18/0x28
sched_show_task.part.110+0xdc/0xf4
sched_show_task+0xc4/0xd0
dump_cpu_task+0x44/0x54
rcu_dump_cpu_stacks+0xc0/0x104
rcu_sched_clock_irq+0x870/0xa80
update_process_times+0x60/0xa0
tick_sched_handle.isra.20+0x40/0x58
tick_sched_timer+0x4c/0xa8
__hrtimer_run_queues+0x104/0x348
hrtimer_interrupt+0x114/0x328
arch_timer_handler_phys+0x30/0x40
handle_percpu_devid_irq+0x88/0x210
generic_handle_irq+0x30/0x48
__handle_domain_irq+0x64/0xc0
gic_handle_irq+0xc0/0x138
el1_irq+0xc8/0x180
efi_header_end+0x9c/0x35c
irq_exit+0xa4/0xc0
__handle_domain_irq+0x68/0xc0
gic_handle_irq+0xc0/0x138
el1_irq+0xc8/0x180
arch_cpu_idle+0x18/0x28
default_idle_call+0x54/0x17c
do_idle+0x204/0x278
cpu_startup_entry+0x24/0x58
rest_init+0xbc/0xcc
arch_call_rest_init+0x10/0x1c
start_kernel+0x4f4/0x528
When I
,the terminal displays CPU 0 running at 100%
So I want to know why this problem arises, I don't have any clue
O SCAR
(1 rep)
Oct 16, 2023, 07:33 AM
• Last activity: Oct 21, 2023, 03:20 PM
18
votes
4
answers
16265
views
Printing two pages per sheet from the command line
Say I start off from a PDF document, say of 12 pages, viewed with **evince**. To produce another PDF of 6 sheets, with a page setup of two pages per side, I normally use the "Print to File" device listed in the ^P dialogue window. This works out pretty neatly. I would like to translate this operatio...
Say I start off from a PDF document, say of 12 pages, viewed with **evince**.
To produce another PDF of 6 sheets, with a page setup of two pages per side,
I normally use the "Print to File" device listed in the ^P dialogue window.
This works out pretty neatly.
I would like to translate this operation for the command line.
- To my understanding, this is not an operation that **pdftk** can do. Please cross check.
- The command
lp
, which would accept the option -o number-up=2
, does not recognize any device called "Print to File", which indeed does not show up in lpstat -p -d
.
- I am aware of the post What is “Print to File” and can it be used from command line? . I have installed **cups-pdf** whereby a new printer named PDF is acknowledged. However, the print quality of a simple text file is way too raw (for example, no print margins to start with). Moreover, if I reprint an existing PDF file on this device, say lp -p PDF existing.pdf
, evince can't even manage to open that copycatted output, while this is not the case with the "Print to File" way.
- I had a look at man evince
. At the bottom, it touches upon a few print preview options and redirects to a GNOME-developer project page . Admittedly I am not able to make sense and use of it.
Is there actually a way to combine the flexibility of the command line with the print quality that I obtain from that "Print to File" option in the GUI evince?
My test case, again, would be to create from the command line a PDF out of a source document printed with two pages per sheet.
Thanks for thinking along.
XavierStuvw
(1179 rep)
Jan 9, 2016, 09:45 PM
• Last activity: Sep 9, 2023, 11:47 AM
0
votes
0
answers
102
views
How to print multiple pdfs using pipe and stdin?
I am attempting to print multiple pdfs from the command line: ``` locate FilesIwantToPrint | grep pdf | lp - ``` This prints the list of pdfs on one page instead of printing the files themselves. Is it possible to achieve the latter behaviour?
I am attempting to print multiple pdfs from the command line:
locate FilesIwantToPrint | grep pdf | lp -
This prints the list of pdfs on one page instead of printing the files themselves. Is it possible to achieve the latter behaviour?
Noga Ha
(1 rep)
Aug 9, 2023, 08:47 AM
• Last activity: Aug 9, 2023, 09:07 AM
2
votes
0
answers
1081
views
Thermal Printer - Send image via /dev/usb/lp0
I am working with a Raspberry Pi Zero W, and I am attempting to print an image (jpg/png) file to the printer. Currently, I am having success using commands such as `echo "hello" /dev/usb/lp0` and sending commands using commands such as `echo -e "1B6D" | xxd -r -p | tee /dev/usb/lp0`. My trouble come...
I am working with a Raspberry Pi Zero W, and I am attempting to print an image (jpg/png) file to the printer. Currently, I am having success using commands such as
echo "hello" /dev/usb/lp0
and sending commands using commands such as echo -e "1B6D" | xxd -r -p | tee /dev/usb/lp0
.
My trouble comes when I want to send an image via the usb/lp0
method. Is it possible?
Furthermore, I want to mention that using cups with the driver was also unsuccessful, and adding the printer using lpadmin was not successful either.
# lpadmin -p Citizen -v serial:/dev/usb/lp0
# lp hello -d Citizen
lp: Destination "Citizen" is not accepting jobs.
Hamza ALI
(21 rep)
Feb 11, 2020, 08:54 AM
• Last activity: Feb 15, 2023, 06:41 PM
0
votes
1
answers
185
views
Printer printing blank page between copies when using lp -n 2
Would anyone know why printer prints blank page between copies when running following? ``` $ lp -d Brother_HL_L2370DW_series -n 2 -o fit-to-page -o MediaType=stationery-heavyweight -o Quality=High -o PageSize=Custom.4x6in file.pdf ```
Would anyone know why printer prints blank page between copies when running following?
$ lp -d Brother_HL_L2370DW_series -n 2 -o fit-to-page -o MediaType=stationery-heavyweight -o Quality=High -o PageSize=Custom.4x6in file.pdf
sunknudsen
(327 rep)
Dec 3, 2022, 06:33 PM
• Last activity: Feb 15, 2023, 11:25 AM
0
votes
1
answers
157
views
Rotation issue: How to print slides, 4-per-page, using CUPS lp
I am trying to print 4-slides per page using CUPS lp (in landscape). However, the pages do not emerge rotated no matter what I do. (It looks terrible!)[![enter image description here][1]][1] I get the same result whether: 1. I use CUPS to rotate, `-o orientation-requested=4` 2. if I use pdf90 to rot...
I am trying to print 4-slides per page using CUPS lp (in landscape).
However, the pages do not emerge rotated no matter what I do.
(It looks terrible!)
I get the same result whether:
1. I use CUPS to rotate,

-o orientation-requested=4
2. if I use pdf90 to rotate, pdf90 --suffix 'foo' file.pdf
3. if I do nothing.
Here is the code I use:
lp -o fit-to-page -o number-up=4 -o number-up-layout="btlr" -o page-border="single-thick" -o sides=two-sided-short-edge file.pdf
Benben
(121 rep)
Dec 19, 2022, 08:09 PM
• Last activity: Dec 20, 2022, 10:01 PM
2
votes
1
answers
1704
views
How to print a document and finish with stapler in Linux/Unix?
Is it possible to print a document & staple it using the lp command in Linux/Unix? If there are other ways in *nix, I am open for options. Linux : Oracle Linux Server release 6.5 Printer: Ricoh MP C4504 I tried the "HPStaplerOptions=1StapleRightAngled" option mentioned in below discussion but it did...
Is it possible to print a document & staple it using the lp command in Linux/Unix? If there are other ways in *nix, I am open for options.
Linux : Oracle Linux Server release 6.5
Printer: Ricoh MP C4504
I tried the "HPStaplerOptions=1StapleRightAngled" option mentioned in below discussion but it did not work.
https://unix.stackexchange.com/questions/440895/print-multiple-documents-and-finish-all-of-them-with-stapler-using-lp-in-linux
This is the command I tried.
lp -c -d0321 -n1 -o "HPStaplerOptions=1StapleRightAngled" testpage.pdf
And here are the reported options from
lpoptions -p 0321
:
auth-info-required=none copies=1 device-uri=lpd://print.company.com/0321?timeout=60 finishings=3
job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0
number-up=1 printer-info=0321 printer-is-accepting-jobs=true
printer-is-shared=true printer-location printer-make-and-model='Local Raw Printer'
printer-state=3 printer-state-change-time=1666715772 printer-state-reasons=none printer-type=4
printer-uri-supported=ipp://localhost:631/printers/0321
Thanks.
maskeerr
(45 rep)
Oct 24, 2022, 06:17 PM
• Last activity: Nov 1, 2022, 11:28 AM
0
votes
1
answers
188
views
lp print-quality not working
Running following command works, but printer always prints really fast. ```shell cat /Users/sunknudsen/Downloads/7663f4bd.pdf | lp -o media=4x6 -o print-quality=5 ``` Printing same file using macOS print dialog and selecting “Best” quality results in slowing (and better) printing. Is `print-quality=...
Running following command works, but printer always prints really fast.
cat /Users/sunknudsen/Downloads/7663f4bd.pdf | lp -o media=4x6 -o print-quality=5
Printing same file using macOS print dialog and selecting “Best” quality results in slowing (and better) printing.
Is print-quality=5
equivalent to “Best”?
sunknudsen
(327 rep)
Sep 27, 2022, 11:52 AM
• Last activity: Oct 25, 2022, 12:22 PM
1
votes
1
answers
567
views
Printing PDF using lp results in toner not adhering to paper
Printing 7433c27f.pdf using `lp` results in toner not adhering to paper. ```shell lp -o media=4x6 /Users/sunknudsen/Downloads/Superbacked/7433c27f.pdf ``` [![7433c27f.pdf][1]][1] Strangely enough, printing same PDF using “Preview” app on macOS works fine (using “File” / “Print…” menu item). Ideas? [...
Printing 7433c27f.pdf using
Strangely enough, printing same PDF using “Preview” app on macOS works fine (using “File” / “Print…” menu item).
Ideas?
lp
results in toner not adhering to paper.
lp -o media=4x6 /Users/sunknudsen/Downloads/Superbacked/7433c27f.pdf

sunknudsen
(327 rep)
Sep 24, 2022, 05:18 PM
• Last activity: Sep 25, 2022, 09:05 AM
1
votes
1
answers
297
views
print .mbox file with html content
I have to print an email for the district office. I use `Evolution` as Email program and I can save the emails in `.mbox` format. However when I save those email to a `.mbox` file and then do `lp example.mbox` it will print the email in an unreadable way. It has `html` content, but I can't open the...
I have to print an email for the district office.
I use
It has
Or can I tell the printer how to treat that file somehow? I don't know how to render that html, it is correctly rendered in
I use
Evolution
as Email program and I can save the emails in .mbox
format.
However when I save those email to a .mbox
file and then do lp example.mbox
it will print the email in an unreadable way.It has
html
content, but I can't open the .mbox
in Firefox
.
Is there a way I can convert .mbox
to .pdf
?Or can I tell the printer how to treat that file somehow? I don't know how to render that html, it is correctly rendered in
Evolution
, but I can't print it from there because Evolution
does not find my printers.
theerrormagnet
(259 rep)
Apr 2, 2022, 06:08 PM
• Last activity: Apr 5, 2022, 09:06 AM
1
votes
0
answers
259
views
Formatting text for printing to laser printers as well as line printers
I have a large custom built application for a client that runs on Java on a Linux system. It produces a number of outputs (bills, etc) that are automatically printed on multiple printers. The way it is designed that there is a table defined for each user specifying the printer assigned to him. All u...
I have a large custom built application for a client that runs on Java on a Linux system.
It produces a number of outputs (bills, etc) that are automatically printed on multiple printers. The way it is designed that there is a table defined for each user specifying the printer assigned to him. All users sit at fixed seats in multiple offices so this table doesn't change (much).
Previously, they had a few large line printers for the larger offices and Epson dot matrix printers for the smaller ones.
The application would generate each bill as a txt file and place it in a filesystem directory. I have a bash script that runs in a loop that looks for new files in each directory and sends it to print using the lp command, then deletes the txt file. The way it figures out which printer to send to is simple; the name of the printer is the same as the name of the directory.
After a long period of use, the line and dot matrix printers are falling apart and being replaced with laser printers. I updated my script that all laser printer names and corresponding directory names end with "-PS" and the lp command pipes it thru enscript to convert to PostScript.
Now, I am thinking of adding some formatting to the bills. Nothing fancy, just bold headings and perhaps some font formatting.
Reading up on enscript, I see that I can add escape codes as in Stack Exchange sample given here. That would fulfil the needs here.
However, if I add the escape codes to the txt file, while it would work for laser printers, it won't if that user has been assigned to a line or dot matrix printer. The script uses plain lp for them without piping thru enscript.
Any ideas would be welcome.
Hussain Akbar
(145 rep)
Jan 14, 2022, 01:55 PM
0
votes
1
answers
1030
views
How to center an image on a page with lp?
OS is Debian 10. I'm trying to print a batch of images with lp. So far so good. Scaling works great, for example. Right now I'm printing with: lp -d "$printer_name" -o ppi=100 -o position=center 1.png However, positioning is not functioning. Leaving position off centers the image top to bottom, but...
OS is Debian 10. I'm trying to print a batch of images with lp. So far so good. Scaling works great, for example.
Right now I'm printing with:
lp -d "$printer_name" -o ppi=100 -o position=center 1.png
However, positioning is not functioning. Leaving position off centers the image top to bottom, but puts it on the left side of the page.
position=right
has the same result. position=center
has the same result. position=left
has the same result. position=top
puts it at the top left. position=bottom
puts it at the bottom left. It's like lp
just can't move the image over to the right side of the page for some reason.
What is going on here?
Printing in gimp or firefox works correctly and I can definitely print on the rest of the page.
cat pants
(167 rep)
Aug 11, 2021, 11:44 PM
• Last activity: Aug 14, 2021, 06:32 AM
0
votes
1
answers
317
views
Printing to Impact Printer from Command Line
I have a Raspberry Pi running Raspbian and I bought an impact printer (Epson LX-350) that I plan on hooking up to the computer via USB cable once it arrives. My goal is to be able to have a script periodically output lines of ASCII text to the printer as certain events happen. I don't care about it...
I have a Raspberry Pi running Raspbian and I bought an impact printer (Epson LX-350) that I plan on hooking up to the computer via USB cable once it arrives. My goal is to be able to have a script periodically output lines of ASCII text to the printer as certain events happen. I don't care about it being pretty, in fancy fonts, large font sizes, worrying about files, or worrying about spooling print jobs from multiple users over multiple printers.
It seems like I can plug in the printer, not install any specific drivers, and then use commands like
echo "Line 1\r\nLine 2\r\nLine 3\r\n" | lp -d /dev/usb/lpXXX
.
I don't have the printer right now to try it out on, but am I missing anything I should research while I'm waiting for the printer to arrive?
GFL
(115 rep)
Aug 11, 2021, 06:06 PM
• Last activity: Aug 11, 2021, 09:06 PM
Showing page 1 of 20 total questions