Questions tagged [lp]
50 questions
16
votes
3 answers
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…
XavierStuvw
- 1,089
- 6
- 17
- 40
12
votes
3 answers
Duplex printing options using lp or lpr
The default options for a Brother MFC-9340CDW printer, are reportedly (e.g. querried via lpoptions -l) set to:
PageSize/Media Size: *A4 Letter Legal Executive A5 A6 B5 JISB5 JISB6 EnvDL EnvC5 Env10 EnvMonarch Br3x5 FanFoldGermanLegal EnvPRC5Rotated…
Nikos Alexandris
- 1,460
- 2
- 18
- 41
5
votes
2 answers
Print a text file from a line number to another after searching for the lines
I want to print a text file from X line number to Y line number
The value of X & Y is determined by searching for a specific line in the text file(in this case the page number)
I search for the line by the following command
echo -n |grep -nr "Page…
S.M.09
- 153
- 1
- 5
4
votes
1 answer
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…
David Gatti
- 255
- 2
- 4
- 11
4
votes
1 answer
limitations of CUPS command line printing of image files
I have my default printer set: lpoptions -d HP_ENVY_5530_series.
I can print some text:
echo HELLO > h.txt
lp h.txt
CUPS understands many different types of files directly, including text, PostScript, PDF, and image files.
I can print a Portable…
joharr
- 144
- 2
- 7
3
votes
0 answers
How to Print All Pages of a PDF using lp or lpr
I'm getting a strange behavior with the lp command on Mac OS Catalina. I have a 12-page PDF file and want to print all pages in the PDF. I'm hoping to print hundreds of PDFs using lp or lpr with a variable number of pages.
The following only prints…
Alex Cook
- 131
- 2
3
votes
1 answer
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…
pantlmn
- 131
- 3
3
votes
1 answer
Formatting file in command line for printing
Whenever I print a text file with the lpr or lp commands, the words are cut off at the end of one line and continue onto the other; for example, 'understand' would be split into 'unde' at the end of line one and 'rstand' at the beginning of other.…
Sergiy Kolodyazhnyy
- 16,187
- 11
- 53
- 104
2
votes
3 answers
Can groff create a ps file with interpreted ANSI escape characters?
This question is inspired by this one on SU. How can I print bold or color using lp and ANSI escape sequences? I know how to display, for example, bold text in the terminal:
$ echo -e '\033[01;1mthis text will be bold\033[00;0m,this will not'
this…
terdon
- 234,489
- 66
- 447
- 667
2
votes
1 answer
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…
Dennis Thrysøe
- 121
- 1
- 4
2
votes
1 answer
Unable to detect print command failure on remote host
I have a remote Mac that is connected to the printer.
I trigger the print on my Mac remotely using ssh from my local system using "ssh port forwarding/tunneling" discussed here.
Below is my code on the local system that triggers the printer lp…
Ashar
- 449
- 3
- 10
- 26
2
votes
0 answers
How to print images two-sided using `lpr`?
I have several photos, which I wish to print on a single piece of paper. I have already tried:
Using convert to combine all images per side. However, now I need to print them two-sided.
Using convert to combine them into a single PDF for some…
Alex
- 1,099
- 2
- 9
- 25
2
votes
0 answers
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"…
Hamza ALI
- 21
- 1
2
votes
1 answer
What command is gimp using to print?
All programs/commands I attempt to print certain PDFs with (lpr, lp, Okular, Evince, Xpdf) print solid black pages. The one exception is Gimp, which allows me to import PDFs one page at a time and properly print.
Obviously, this isn't a practical…
user1717828
- 3,512
- 6
- 23
- 32
2
votes
0 answers
Using interface file with LP and txt2pdf utility to transform print file to PDF
Our legacy application uses LP commands on Solaris 5.10 to print report files to printers throughout our org. However, now we have a remote location that won't have access to a printer (at least not one on a reliable network) so I'm trying to setup…
Chris32680
- 21
- 1