Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#install cups lpr - This is different then the lpr stand alone package sudo apt install cups cups-bsd hplip # setup network printer lpadmin -p HP_PRINTER -E -v ipp://192.168.1.170/ipp/print -m everywhere # set default printer lpoptions -d HP_PRINTER #get a list of printers lpstat -p -d #if you don't have a default printer set for your system lpoptions -d "
" #print to default printer lpr file.txt lpr file.pdf lpr file.png echo "Hello World"|lpr ls |lpr #choose printer to print to lpr -P "
" file.txt ###Print to PDF### sudo apt install cups-pdf #print to pdf #output goes in ~/PDF lpr -P PDF file.txt #set job title lpr -P PDF -t My_Text_File file.txt #set PDF as default printer lpoptions -d "PDF" lpr -P PDF -t My_Text_File file.txt #set jobs and information lpstat -o lpstat -t #Cancel the current job on the default printer: lprm #Cancel job 1234: lprm 1234 #Cancel all jobs: lprm - ###print office document## #lpr can not print office docs #so we convert them to pdf first with unoconv sudo apt install unoconv unoconv --stdout /tmp/file.odt |lpr -P PDF -T Writer_Document unoconv --stdout /tmp/sheet.ods |lpr -P PDF -T Spread_Sheet
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)