Questions tagged [lp]
The lp tag has no usage guidance.
43
questions
0
votes
1
answer
26
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....
2
votes
1
answer
233
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 ...
1
vote
0
answers
32
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 ...
0
votes
0
answers
53
views
lpoptions seem to be ignored
I've been trying to print a pdf file with the following command in a bash script:
lp -d MY_PRINTER -o ColorModel=Gray -o print-scaling=fit file.pdf
however it consistently prints in color, and the ...
0
votes
1
answer
52
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=...
0
votes
1
answer
50
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 ...
1
vote
2
answers
71
views
Explaining what this command does
ls *.txt | lp
Wouldn't this command list all files that end in .txt and then print them?
0
votes
0
answers
38
views
Need command-line solution as Brother Printer stops printing unless restarted physically
I have a shell script code that prints any new PDF generated to a Brother printer which is connected to a MACOS as below
lp -d Brother_HL_L2350DW_series /var/pdfs/11.pdf
After 2 or 3 days the printer ...
0
votes
0
answers
21
views
How verify cancelled print job in script
I need to verify that a print job has been cancelled, and to do this in a script.
But lpstat's "completed-jobs" list appears to include those that have been cancelled. So it appears I cannot ...
2
votes
1
answer
122
views
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 ...
0
votes
1
answer
155
views
Keep trying a print command LP until successful
I wish to keep sending the printer print command until the print succeeds. If it succeeds printing then it should delete the file.
Below is my script.
until ssh root@45.76.162.227 'lp -d ...
1
vote
1
answer
208
views
Why CUPS prints a blank page when the files contain a barcode?
Recently I installed a Canon UFR2 Printer Driver for Linux I own a iR1730 and I tryng to print a pdf file using lp command. I got to identify a "incompatibility" to read a code bar like this
...
0
votes
0
answers
37
views
Linux Printer - retry job on another printer
Suppose a printer is disconnected either by power failure or by network failure,
When I give it this command lp -d printername my_file.txt the print job would be on hold, so lpstat -W "not-...
1
vote
0
answers
44
views
lpoptions: unable to set instances
I have installed a network printer and would like to setup instances. To do so, the commands I used are:
lpoptions -p my_printer/a3booklet -o PagePolicy=On -o PageSize=A3 -o PageRegion=A4 -o MediaType=...
2
votes
0
answers
326
views
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 ...
2
votes
0
answers
589
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 ...
3
votes
0
answers
777
views
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 ...
1
vote
1
answer
425
views
lp -o sides=two-sided-long-edge 1.pdf not working
Any reason why
lp -o sides=two-sided-long-edge 1.pdf
would only print one-sided ?
I am expecting to see one page printed on both sides, instead I am getting two sheets of paper printed on one side....
1
vote
1
answer
628
views
Print multiple documents and finish all of them with stapler using lp in linux?
I'm using this command to print multiple files with lp in linux but each document is being finished with stapler:
lp -d printername -o "HPPaperSource=Tray3" -o "HPStaplerOptions=1StapleRightAngled" /...
0
votes
1
answer
25
views
lp -d lp1 -h myfile has two options and one argument or 2 options and 2 arguments?
In "Learning the Bash Shell" by O'reilly (third edition), it is written in page 7:
lp -d lp1 -h myfile has two options and one argument.
How come?
I see what I reckon as two options, each one with ...
0
votes
0
answers
293
views
unix printing files (simple txt files )with pages numbers
I am using the command lp -d (printer_name) * to print all files in the current directory.
How can I print the page number also:
'Page-1' or '1'
on each page per file printed?
0
votes
2
answers
399
views
How to find out what process is printing pages on remote printer through STDIN?
Some process sends output of my console over stdin to remote print server. If there is cups printer configured, it prints it. So I need to keep cups disabled. I suspect something is running lp or lpr. ...
1
vote
0
answers
204
views
Linux printing using lp command
We are going to move our system from AIX to Red Hat. AIX had a command to start on the second page of the print file. What is a command to start on the second page of a print file?
I tried the ...
1
vote
1
answer
1k
views
cups-pdf via cups-lpd creates PDF files with no content but printer config
I'm using cups-pdf to print via lpd (Port 515)
That's working so far, but all pdf-files are created with its content of the printer configuration. The PDF file includes following:
Media Limits: 0.00 ...
0
votes
1
answer
3k
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 ...
3
votes
1
answer
9k
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 ...
1
vote
1
answer
5k
views
where does lpd and lpr log error and messages?
Where can I find error and log messages from lpd and lpr?
I don't find any ouput when I run "lpr /tmp/test_file"
This terminates without any error.
I had looked for /etc/rc.d/lpd and it is failed. ...
0
votes
1
answer
140
views
lp print different amount of different pages
I have a PDF, with two pages. I want to print the first page x times and the second page y times. How would I go about this using lp? Is there a way to do this in a single command?
I'm using lp right ...
2
votes
1
answer
408
views
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 ...
-1
votes
1
answer
1k
views
Solaris: Spooling filesystem is full
I have a Solaris 5.8 machine that will no longer print. print job that come from the terminal say: "See if spooling file system is full"
I had a look around /var/spool but it isn’t particularly ...
15
votes
3
answers
11k
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 ...
3
votes
1
answer
4k
views
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, ...
1
vote
2
answers
359
views
Solaris 10,print only banner
I have a remote printer by cups(cups-pdf virtual printer) on linux server.
BSD,Hp-ux and linux works fine,on solaris 10 i have
this problem,print the banner only,not the text of file.
I have ...
3
votes
1
answer
1k
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 ...
2
votes
0
answers
218
views
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 ...
1
vote
2
answers
1k
views
How to preprocess CUPS' `lp` with a script for a specific printer?
(How) Is it possible to preprocess lp automatically with a script? Piping inbetween (fileToPrint | script.sh | lp -d myPrinter) is no option for me, because I have a lot of source code that does lp ...
2
votes
2
answers
3k
views
How to change default cpi for `lp`?
I know I can change the characters per inch used by lp with lp -o cpi=12 (or any number you like). But is it possible to change the default value of this option globally? The default, when -o cpi=<...
3
votes
1
answer
3k
views
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 ...
12
votes
3
answers
20k
views
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 ...
1
vote
0
answers
345
views
Print EPS file at original size but changed position
I'd like to print EPS files, ensuring they print at their original size. I found out that my default document viewer, Okular from KDE, will always scale to fit size, and I can't seem to find a way to ...
1
vote
0
answers
166
views
what interface does lpsched provide that cups does not?
Work has a Linux stock/erp custom system that uses the Unix System V (Solaris, SCO, HP-UX) lpsched program that someone who used to work here compiled for RHEL/CentOS 5 i686 (I have no idea why or how)...
5
votes
2
answers
5k
views
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 ...
2
votes
3
answers
2k
views
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;...