Print and Scan
todo
Vendor proprietarna aplikacia Brother ControlCenter4 (v4.6.46.1, released 2021-11) pre model MFC-T910DW ponuka tieto typy skenovania:
- Black & White, resp. ciernobiele: pre textove obrazky alebo obrazky s ciarovou grafikou.
- Grey (Error Diffusion), resp. siva/seda (chybovy rozptyl/prelinanie): grafika alebo fotografie. Chybovy rozptyl/prelinanie je metoda pre vytvaranie simulovanych sedych obrazkov bez pouzitia bodov pravej sedej. Cierne body sa ukladaju do urciteho vzoru, tak aby vytvorili zdanie sedej.
- True Grey, resp. prava seda/siva: grafika alebo fotografie. Tento rezim je presnejsi, kedze vytvara 256 odtienov sivej.
- 24 Bit Colour, resp. farebna 24 bitov: pouziva az 16.7 miliona farieb. Najvernejsia reprodukcia farieb, ale subor cca 3x vacsi ako pri 8 Bit Colour.
Vendor proprietarna aplikacia Epson Scan 2 (v6.7.45.0, released 2024-06) pre model L6570 ponuka analogicke typy skenovania: Black & White, Grayscale and Color.
Pozor na roznu terminologiu pri udavani farebneho formatu:
- https://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_color_formats
- https://en.wikipedia.org/wiki/Indexed_color#Image_file_formats_supporting_indexed_color
Vacsina skenerov vsak v podstate umoznuje len dva typy skenovania: Grayscale (8-bit grayscale) a TrueColor (24-bit color). Vsetko ostatne software nasledne upravi do pozadovaneho typu. Z toho dovodu je vhodnejsie tento image post processing robit manualne, t.j. skenujeme do lossless formatu a nasledne tento obrazok konvertujeme/upravujeme do nami pozadovaneho formatu. Takto ziskame podstatne vacsiu kontrolu a viac moznosti.
Grayscale skenovanie je cca o 40% – 50% rychlejsie ako Color (testovane na Brother MFC-T910DW a EPSON L6570). Grayscale skenovanie pracuje s vyrazne mensim objemom dat ako Color. Okrem toho, samotna skenovacia hlava sa moze v rezime Grayscale pohybovat rychlejsie, kedze nepotrebuje snimat rozne farebne vrstvy a nepotrebuje az tolko presnosti. Color skenovanie casto zahrna korekciu farieb, vyvazenie bielej, interpolaciu a podobne. Typ skenovanie Black & White je "len" software image post processing a rychlost samotneho skenovacieho procesu je identicka ako pre Grayscale.
$ time scanimage --device 'airscan:e0:Brother MFC-T910DW' --mode Color > scan.300dpi.color.pnm # => 11.5s (default mode) $ time scanimage --device 'airscan:e0:Brother MFC-T910DW' --mode Gray > scan.300dpi.gray.pnm # => 6.5s
Treba si uvedomit, ze vacsina skenerov najprv fyzicky zachyti vsetky data (ako pri farebnom skenovani) a az nasledne software upravi vystup do pozadovaneho typu. Pri zmene typu skenovania (napr. z farebneho na ciernobiely) sa skener fyzicky nezmeni, stale zachyti vsetky farebne informacie a nasledne software tieto data spracuje podla zvoleneho typu skenovania. Z toho dovodu je vhodnejsie tento image post processing radsej urobit manualne, t.j. skenujeme farebne do lossless formatu a nasledne tento obrazok konvertujeme/upravujeme do nami pozadovaneho formatu. Takto ziskame podstatne vacsiu kontrolu a viac moznosti. Pravdepodobne jediny pripad, kedy ma zmysel zmenit typ skenovania, je pre ciernobiele/sede skenovanie vo velkom pocte s automatickym podavacom papiera (ADF), kedy sa celkovy cas skenovania moze vyrazne skratit. Ciernobiele/sede skenovanie pracuje s vyrazne mensim objemom dat ako farebne. Okrem toho, samotna skenovacia hlava sa moze v rezime ciernobiela/seda pohybovat rychlejsie, kedze nepotrebuje snimat rozne farebne vrstvy a nepotrebuje az tolko presnosti. Farebne skenovanie casto zahrna korekciu farieb, vyvazenie bielej, interpolaciu a podobne.
# 7-Zip FM (win): 7z and zip: normal (default) compression level 5 $ cjxl scan.document.png scan.document.jxl --distance=0.0 Encoding [Modular, lossless, effort: 7] $ du * --block-size=K scan.document1.png 1804K 100 % scan.document1.png.7z 1624K 90 % scan.document1.png.zip 1684K 93 % scan.document1.tiff 26200K 1452 % scan.document1.tiff.7z 1252K 69 % !!! scan.document1.tiff.zip 1896K 105 % scan.document1.jxl 864K 48 % !!! scan.document2.png 3044K 100 % scan.document2.png.7z 2540K 83 % scan.document2.png.zip 2724K 90 % scan.document2.tiff 26200K 860 % scan.document2.tiff.7z 1576K 52 % !!! scan.document2.tiff.zip 2244K 74 % scan.document2.jxl 1476K 49 % !!!
BJ K30, Evula PC WSL $ systemctl is-active avahi-daemon inactive $ airscan-discover [devices] # empty, ale na WSL NEFUNGUJE
- /etc/sane.d/airscan.conf section
[options]
empty (without options) (automatic discovery may be enabled (the default))scanimage
300dpi by default ⇒ scanning time approximately 18.6 ― 18.8 sec.scanimage --device 'airscan:e0:Brother MFC-T910DW'
⇒ scanning time approximately 16.6 ― 16.7 sec.
- /etc/sane.d/airscan.conf section
[options]
withdiscovery = disable
scanimage
⇒ scanning time approximately 13.7 ― 13.9 sec.scanimage --device 'airscan:e0:Brother MFC-T910DW'
⇒ scanning time approximately 11.6 ― 11.8 sec.
$ systemctl is-active avahi-daemon active $ airscan-discover [devices] # empty, ale na WSL NEFUNGUJE
- /etc/sane.d/airscan.conf section
[options]
empty (without options) (automatic discovery may be enabled (the default))scanimage
300dpi by default ⇒ scanning time approximately 14.6 ― 14.8 sec.scanimage --device 'airscan:e0:Brother MFC-T910DW'
⇒ scanning time approximately 12.7 ― 12.8 sec.
- /etc/sane.d/airscan.conf section
[options]
withdiscovery = disable
- identicke ako s vypnutym avahi-daemonom
AirPrint and AirScan
AirPrint, resp. Apple driverless printing, resp. tlacenie bez nutnosti instalacie drivers pre kazdy konkretny model tlaciarne. Analogicky AirScan pre skenovanie bez instalacie drivers. Zariadenie (tlaciaren, skener, multifunkcne all-in-one a pod.) je vacsinou pripojene cez lokalnu siet. Takze napr. s jednym notebookom mozeme tlacit/skenovat v roznych sietach (doma, firemna siet A, firemna siet B, na navsteve u znamych, resp. vsade, kde je zariadenie s AirPrint/AirScan technologiou) bez toho, aby sme instalovali drivers pre kazdy jeden konkretny model zariadenia. Je to pohodlne a funkcne riesenie.
AirPrint ponuka skor moznosti zakladneho tlacenia (zatial), nie je to plnohodnotna nahrada ako v pripade nainstalovania vendor drivers. Ak potrebujeme vytlacit zakladny dokument (pdf, obrazok) plne si vystacime s AirPrint driverless printing. Ale ak potrebujeme vytlacit napr. fotografiu v max. kvalite a specifikovat konkretny papier, ktory je umiestneny v konkretnom zasobniku tlaciarne, vacsinou uz sme nuteni instalovat vendor drivers. Treba si uvedomit, ze pri pouzivani AirPrint nemusime absolutne nic instalovat, a teda, vyrobcovia takto prichadzaju o moznost "ponukat prave ich super spravne vyrobky, doplnky". V pripade AirScan su obmedzenia mensie a az na specificke pripady dnes plne supluje moznosti konfiguracie vendor drivers.
Dnes uz takmer vsetky novsie zariadenia podporuju driverless printing technologiu a je malo pravdepodobne vypustit novy model bez jej podpory. Kvoli licencnym politikam existuju 4 standardy pre driverless printing, resp. 4 Page Description Languages (PDLs), ktore komunikuju s klientom cez IPP. Rozdiel je v podstate len v podpore, vybere PDLs.
More info on OpenPrinting Introduction to Driverless Printing, Standards And their PDLS and Workflow Of Driverless Printing.
Standard | PDLs | Note |
---|---|---|
AirPrint | Apple Raster/URF, JPEG and PDF | Apple's standard and is the most common and oldest driverless printing standard. |
IPP Everywhere | PWG Raster, JPEG and PDF | Developed by the Printer Working Group (PWG) and is a completely open standard. |
Mopria | PCLm, PWG Raster and PDF | Proprietary profile of IPP used for printing from Android and Microsoft Windows. |
Wi-Fi Direct | PCLm, PWG Raster and PDF | Printers work as a Wi-Fi access point so that mobile devices can print without an existing Wi-Fi network. |
List of driverless printers: https://openprinting.github.io/printers/. |
SANE
SANE sa na rozdiel od TWAIN snazi dosledne oddelit ovladace konkretnych skenerov (backends, resp. scanner drivers) od grafickeho uzivatelskeho rozhrania (frontends, resp. user programs).
Fedora packages potrebne pre skenovanie:
- sane-backends:
sane-backends
asane-backends-libs
(packagessane-backends-drivers-cameras
andsane-backends-drivers-scanners
len v pripade ak su potrebne vendor drivers) - sane-frontends: obsahuje specificke programy scanadf(1) a xcam(1) a package nie je potrebne instalovat
- sane-airscan:
sane-airscan
alibsane-airscan
$ dnf install sane-backends sane-backends-libs sane-airscan libsane-airscan
Za frontends programy mozno povazovat aj rozne graficke nadstavby nad SANE ako napr: simple-scan(1)rpm alebo jeden z prvych grafickych programov na skenovanie xsane(1)rpm. Dalej vsak budeme pouzivat len CLI scanimage(1)rpm.
Prikaz sane-find-scanner(1)rpm vyhladava skenery pripojene cez USB controller (or SCSI adapter), ale nie cez sietove pripojenie.
SANE drivers baliky instaluju niekolko desiatok drivers (dir /usr/lib64/sane/) pre rozne modely od roznych vyrobcov. sane-dll(5) umoznuje ich dynamicke nacitavanie a konfiguruje sa cez subor /etc/sane.d/dll.conf. Druha moznost konfiguracie (s vyssou prioritou) je pridanie suboru, ktory obsahuje backend name (driver), do directory /etc/sane.d/dll.d/. Dnes je vsak pre sietove zariadenia tendencia preferovat (a presadzovat) pouzivanie driverless scanning protocol eSCL (AirScan) or WSD.
AirScan
SANE backend for AirScan (eSCL) and WSD document scanners. Similar to how most modern network printers support "driverless" printing, using the universal vendor-neutral printing protocol, many modern network scanners and MFPs support "driverless" scanning. sane-airscan(5) currently supports two protocols:
- eSCL also known as Apple AirScan or AirPrint scanning (Scanner Control Language), preferred
- WSD also known as Microsoft WSD (Web Services for Devices) or WS-Scan (proprietary protocol)
Most modern scanners can be accessed using eSCL or WSD protocols, with no additional configuration, and in most cases, the scanner will work out of the box. Na vyhladavanie sietoveho skenera pouzijeme prikaz airscan-discover(1)rpm.
Subor /etc/sane.d/dll.d/airscan zapina v SANE podporu pre AirScan a subor /etc/sane.d/airscan.conf jeho samotnu konfiguraciu. Section [devices]
(konfiguracny subor /etc/sane.d/airscan.conf) nam umoznuje manualne pridat model pre konkretny skener (e.g. for non-discovery device). In section [options]
option discovery
enable/disable automatic device discovery. See also How to Debug Scanning Issues.
Brother DCP-7070DW
Starsia sietova tlaciaren so skenerom Brother DCP-7070DW na domacej sieti spolu s pocitacom (otvorene porty 1025-65535) bez nejakych doplnkovych nastaveni a bez nainstalovaneho proprietarneho balika brscan4
od spolocnosti Brother.
$ airscan-discover [devices] Brother DCP-7070DW = http://192.168.1.149:80/WebServices/ScannerService, WSD $ scanimage --list-devices device `airscan:w0:Brother DCP-7070DW' is a WSD Brother DCP-7070DW ip=192.168.1.149 $ scanimage --formatted-device-list "device name: '%d', vendor name: '%v', model name: '%m',%n\ scanner type: '%t' and index number: '%i'%n" device name: 'airscan:w0:Brother DCP-7070DW', vendor name: 'WSD', model name: 'Brother DCP-7070DW', scanner type: 'ip=192.168.1.149' and index number: '0' $ scanimage --all-options --device-name 'airscan:w0:Brother DCP-7070DW'
Brother MFC-T910DW
Sietova tlaciaren so skenerom Brother MFC-T910DW na spolocnej pracovnej sieti s pocitacom (blokovane porty 1025-65535) bez nejakych doplnkovych nastaveni a bez proprietarneho balika brscan4
od spolocnosti Brother. Tlaciaren sa nachadza na zozname AirPrint devices (protokol eSCL).
$ airscan-discover # temporary disable firewalld service [devices] Brother MFC-T910DW = http://172.30.0.55:80/eSCL/, eSCL Brother MFC-T910DW = http://172.30.0.55:80/WebServices/ScannerService, WSD and other scanners $ scanimage --list-devices # protocol eSCL is preferred before WSD device `airscan:e4:Brother MFC-T910DW' is a eSCL Brother MFC-T910DW ip=172.30.0.55 $ scanimage --formatted-device-list "device name: '%d', vendor name: '%v', model name: '%m',%n\ scanner type: '%t' and index number: '%i'%n" device name: 'airscan:e4:Brother MFC-T910DW', vendor name: 'eSCL', model name: 'Brother MFC-T910DW', scanner type: 'ip=172.30.0.55' and index number: '2'
Ta ista sietova tlaciaren so skenerom, ale s pouzitym driver z proprietarneho balika brscan4
od spolocnosti Brother.
$ scanimage --list-devices # without airscan device `brother4:net1;dev0' is a Brother Brother_MFC-T910DW MFC-T910DW $ scanimage --formatted-device-list "device name: '%d', vendor name: '%v', model name: '%m',%n\ scanner type: '%t' and index number: '%i'%n" device name: 'brother4:net1;dev0', vendor name: 'Brother', model name: 'Brother_MFC-T910DW', scanner type: 'MFC-T910DW' and index number: '0'
airscan
ponuka takmer vsetky moznosti konfiguracie pre skenovanie v porovnani s proprietarnym vendor driver brscan4
a rozdiely su vacsinou nepodstatne. Napr. pre tento konkretny model skenera, ak by som bol nuteny pouzit napr. rozlisenie 1200dpi (v praxi asi malo pravdepodobne), tak jedine s pouzitim brscan4
drivers. Vacsie moznosti vyberu roznych rezimov skenovanie (Color, Gray, Black & White a pod.) plne suplujem pomocou magick(1)rpm programu (post processing). Dnes na bezne skenovanie plne postacuje airscan
(pre mnozstvo modelov) bez nutnosti instalacia vendor proprietarnych drivers (pre kazdy konkretny model).
$ scanimage --all-options --device-name 'airscan:e0:Brother MFC-T910DW' # eSCL protocol (default) --resolution 100|200|300|600dpi [300] --mode Color|Gray [Color] --source Flatbed|ADF [Flatbed] $ scanimage --all-options --device-name 'airscan:w0:Brother MFC-T910DW' # WSD protocol --resolution 100|200|300dpi [300] $ scanimage --all-options --device-name 'brother4:net1;dev0' # brscan4 --resolution 100|150|200|300|400|600|1200|2400|4800|9600dpi [200] --mode Black & White|Gray[Error Diffusion]|True Gray|24bit Color[Fast] [24bit Color[Fast]] --source FlatBed|ADF(left aligned)|ADF(centrally aligned) [ADF(left aligned)]
scanimage
Na samotne skenovanie budeme dalej pouzivat CLI scanimage(1)rpm a dalsie upravy (post processing) pomocou CLI magick(1)rpm programu. scanimage
supported formats (sane-backends-1.3.1, released 2024-05): PNM (PBM for black-and-white, PGM for grayscale and PPM for color images) by default, TIFF (black-and-white, grayscale or color and as uncompressed lossless), PNG, JPEG (compression level 75 only) and PDF (pdf over 75% jpeg).
$ scanimage --list-devices device `airscan:e0:Brother MFC-T910DW' is a eSCL Brother MFC-T910DW ip=172.30.0.55 $ scanimage --help --device-name 'airscan:e0:Brother MFC-T910DW' $ scanimage --device-name 'airscan:e0:Brother MFC-T910DW' --format png > scan.image.png $ scanimage --device-name 'airscan:e0:Brother MFC-T910DW' --output-file scan.image.jpeg
# don'tconvert
fromscanimage --format jpeg
(JPEG compression level 75 only, without change--jpeg-quality=90
option) $ scanimage --resolution 600 --mode Color | convert - -quality 90 scan.photo.q90.jpeg $ scanimage --format png --resolution 300 | convert - -monochrome scan.mono.document.png NOTE jpeg: convert ppm → jpeg is identical as convert ppm → png → jpeg # use--batch
with document feeders (ADF) $ scanimage --source ADF --format png --batch=scan.$(date +%Y%m%d.%H%M%S).p%03d.png
$ tesseract output.tiff output_text -l slk pdf $ ocrmypdf -l slk dokument_bez_ocr.pdf dokument_ocr.pdf * https://github.com/unpaper/unpaper/blob/main/doc/basic-concepts.md * https://paperless.readthedocs.io (dead project, last release 2019-01) na rchivaciu asi JPEG XL https://www.root.cz/n/jpeg-xl/ https://www.root.cz/zpravicky/schvaleno-pro-fedoru-43-nova-verze-rpm-6-0-ci-jpeg-xl-wallpapery/ https://www.root.cz/zpravicky/ubuntu-25-04-s-podporou-jpeg-xl/
CUPS
- https://en.wikipedia.org/wiki/CUPS
- https://openprinting.github.io/cups/ (OpenPrinting CUPS)
- https://www.cups.org/ (Apple CUPS)
- man page: cups(1)
- https://wiki.archlinux.org/title/CUPS
- RHEL10 Configuring and using a CUPS printing server
Niekedy v 2020 – 2021 Apple prestal aktivne vyvijat CUPS, co bolo sposobene odchodom hlavneho vyvojara (Michael Sweet) zo spolocnosti Apple. OpenPrinting organizacia (patriaca do rodiny Linux_Foundation) prebera dalsi vyvoj CUPS spolu s jeho povodnym hlavnym vyvojarom. Dnes uz CUPS znamena OpenPrinting CUPS.
CUPS supports printing to AirPrint and IPP Everywhere printers. Network and local (USB) printers with (legacy) PPD-based printer drivers will be removed in OpenPrinting CUPS v3.
NOTE Models other than everywhere
are deprecated and will not be supported in a future version of CUPS. The everywhere
driver is used for nearly all modern networks printers sold since about 2009.
Fedora CUPS packages: cups, cups-browsed, cups-filters and libcupsfilters.
$ dnf install cups cups-client cups-filesystem cups-filters cups-filters-libs cups-libs $ dnf install cups-browsed cups-filters-driverless cups-ipptool
Dir /etc/cups/ obsahuje rozne konfiguracne subory: cupsd.conf(5), cups-files.conf(5), printers.conf(5), cups-browsed.conf(5) a podobne.
OpenPrinting CUPS main documentation: Printer Administration, Using Network Printers or Firewalls and man pages lpadmin(8) and lpinfo(8).
Connection (see also Avahi section):
dnssd://
pouziva DNS-SD (DNS Service Discovery) over mDNS (multicast DNS) na automaticke objavovanie zriadeni v lokalnej sieti (v Linux svete vacsinou cezavahi-daemon.service
). Zariadenie samo ponukne najvhodnejsi protokol (cim nizsia hodnotapriority
tym vacsia priorita) pripojenia. Napr.
uri = dnssd://<printer_model>._ipp._tcp.local/?uuid=<uuid>
novsie zariadenia s IPP protocoluri = dnssd://<printer_model>._pdl-datastream._tcp.local/
starsie zariadenia s RAW/JetDirect protocol
ipp://
moderny, standardny protokol na tlac v sieti. Komunikaciu priamo so zariadenim. Napr.
uri = ipp://<printer_address>:631/ipp/print
lpd://
starsi UNIX styl tlace (generic print). Napr.
uri = lpd://<printer_address>:515/PASSTHRU
Driver:
- Pre
ipp://
protokol preferovat drivereverywhere
. Novsie zariadenia by mali fungovat bez problemov. - Pre ostatne protokoly su potrebne (legacy) PPD-based printer drivers, t.j. rozne "generic" drivers, resp. proprietarne vendor drivers od vyrobcov zariadeni. Okrem toho, v buducnosti bude ich podpora v CUPS odstranena.
Preferovat pouzivanie ipp://
connection, resp. ipp://
cez "sprostredkujuci" dnssd://
protocol spolu s everywhere
driver.
# main tools: ippfind(1)rpm, ipptool(1)rpm (deprecated lpinfo(8)rpm) and lpadmin(8)rpm
# temporary disable firewalld service
# or open 5353 port (firewalld <service name="mdns"/>
) + specific printer protocol connection port
$ ippfind
ipp://BRW90324B17AD6E.local:631/ipp/print # Brother MFC-T910DW
$ ipptool -tv ipp://BRW90324B17AD6E.local:631/ipp/print get-printer-attributes.test
# more test in dir /usr/share/cups/ipptool/
$ lpinfo -v # lpinfo -l -v # lpinfo is deprecated
network dnssd://Brother%20MFC-T910DW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-3c2af47070ba
network ipp://Brother%20MFC-T910DW._ipp._tcp.local/
$ lpadmin -p Brother_MFC-T910DW -E -v "ipp://172.30.0.55:631/ipp/print" -m everywhere
$ lpadmin -p Brother_MFC-T910DW -E -v "ipp://BRW90324B17AD6E.local:631/ipp/print" -m everywhere
$ avahi-resolve --address 172.30.0.55
172.30.0.55 BRW90324B17AD6E.local
$ avahi-resolve --name BRW90324B17AD6E.local
BRW90324B17AD6E.local 172.30.0.55
$ lpadmin -p Brother_MFC-T910DW -E -v "ipp://Brother%20MFC-T910DW._ipp._tcp.local/" -m everywhere
- Brother MFC-T910DW
Multifunkcna atramentova tlaciaren s podporou IPP, uvedena na trh asi v 2018. Tato tlaciaren plne demonstruje nevhodny pristup vyrobcov k ovladacom pre open source komunitu. Brother pre Linux poskytuje len proprietarne ovladace svojich zariadeni (pre konkretny model dokonca len pre i386 architekturu). Pouziva vlastny jazyk (Brother Command Language), ktory nie je plne kompatibilny s PCL a preto bez pouzitia ich vendor ovladacov by prakticky nebolo mozne tlacit. Nastastie vsak podporuje IPP.
$ lpadmin -p Brother-MFC-T910DW -E -v "ipp://BRW90324B17AD6E.local:631/ipp/print" -m everywhere
- HP LaserJet 600 M603 (model z roku 2011) a HP LaserJet M611 (model z roku 2019)
Laserove tlaciarne s podporou IPP. Open source ovladace su k dispozicii prostrednictvom HPLIP (HP's Linux Imaging and Printing software)
dnf install hplip hplip-common hplip-libs
Dalej
$ lpadmin -p HP-LaserJet-M603 -L caffe327 -E -v "ipp://10.0.0.26:631/ipp/print" -m everywhere $ lpadmin -p HP-LaserJet-M611 -L caffe327 -E -v "ipp://10.0.0.23:631/ipp/print" -m everywhere
$ lpadmin -p HP-LaserJet-M603_hplip -L caffe327 -E -v "ipp://10.0.0.26:631/ipp/print" -m lsb/usr/HP/hp-laserjet_600_m601_m602_m603-ps.ppd.gz $ lpadmin -p HP-LaserJet-M611_hplip -L caffe327 -E -v "ipp://10.0.0.23:631/ipp/print" -m lsb/usr/HP/hp-laserJet_m610_m611_m612-ps.ppd.gz
Pozor Aktualne (2024-05, Fedora40) na tlaciarni HP-LaserJet-600-M603 pri pouziti 'everywhere' driver je specificky problem pri tlaci. Niektore pismena s diakritikou (ž alebo š) v PDF dokumentoch sa vytlacia nekorektne. Je potrebne pouzit iny driver (generic alebo hplip).
$ lpadmin -p HP_generic -E -v "ipp://10.0.0.26:631/ipp/print" -m drv:///sample.drv/laserjet.ppd
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
$ lpadmin -p HP_hplip -E -v "ipp://10.0.0.26:631/ipp/print" -m lsb/usr/HP/hp-laserjet_600_m601_m602_m603-ps.ppd.gz
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
NOTE V obidvoch pripadoch je Duplex (by default) vypnuty, potrebne v nastaveniach zapnut.
[musinsky@muke ~]$ lpinfo -m | grep -i laserjet.ppd drv:///sample.drv/laserjet.ppd HP LaserJet Series PCL 4/5 lsb/usr/HP/hp-postscript-laserjet.ppd.gz HP POSTSCRIPT LASERJET DEVICES [musinsky@muke ~]$
Aky ovladac pouzit na Brother tlaciaren, ktora emuluje PCL6
Avahi
Service discovery is the process of automatically detecting devices and services on a computer network. It aims to reduce the manual configuration effort required from users and administrators. For example you can plug into a network and instantly find printers to print to, files to look at and people to talk to.
Fedora avahi subpackages:
avahi
contains avahi-daemon(8),avahi-glib
andavahi-libs
installed on CERN RHELavahi-glib
andavahi-libs
are required (GNOME, PipeWire) in Fedoraavahi-tools
contains avahi-browse(1), avahi-resolve(1), avahi-publish(1) and avahi-set-host-name(1)- and a few unnecessary packages (GTK, Qt and others)
$ dnf install avahi avahi-glib avahi-libs avahi-tools
Avahi implements free zeroconf (Zero-configuration networking) specification. Is a free (LGPL) implementation of DNS-SD (DNS Service Discovery) over mDNS (multicast DNS), compatible with Apple Bonjour. Avahi provides local hostname resolution using a hostname.local
naming scheme (mDNS UDP port 5353).
Avahi uses service type database. See also which services are discovered in source files sane-airscan/airscan-mdns.c and cups/backend/dnssd.c or in man page ippfind(1)rpm.
AirPrint je zalozeny na mDNS (Bonjour) a IPP. mDNS protokol sa pouziva na vyhladanie (discovery) zariadenia a IPP na samotne tlacenie na tomto zariadeni. Windows zariadenia pouzivaju Web Services for Devices (WSD) na vyhladanie zariadenia a Line Printer Daemon protocol (LPD) or LPR or JetDirect (RAW) pre samotne tlacenie. Android zariadenia a Windows 10 podporuju Mopria Alliance print standard, co je to iste ako AirPrint v Apple svete. See also:
- https://en.wikipedia.org/wiki/List_of_printing_protocols
- !!! OpenPrinting IPP Introduction to Driverless Printing, Standards And their PDLS and Workflow Of Driverless Printing
- RHEL10 CUPS: Determining whether a printer supports driverless printing
- !!! OpenPrinting CUPS Printer Administration, Using Network Printers and Firewalls
DNS-SD / mDNS | protocol | port | notes |
---|---|---|---|
_printer._tcp |
lpd:// LPD (Line Printer Daemon) or LPR |
515 | starsi UNIX styl tlace (generic print) |
_ipp._tcp |
ipp:// IPP (Internet Printing Protocol) |
631 | moderny, odporucany a bezpecny sposob tlace |
_pdl-datastream._tcp |
socket:// RAW or JetDirect or AppSocket |
9100 | rychla, priama tlac dat (napr. PCL, PS), no security |
DNS-SD / mDNS | notes |
---|---|
_scanner._tcp |
generic scanner, ktory moze pouzivat rozne protokoly resp. sluzby (SANE) |
_uscan._tcp |
eSCL AirPrint scanning or AirScan, moderny a odporucany sposob |
not available |
WSD nepouziva mDNS protokol, ale Microsoft proprietarny protokol zalozeny na WS-Discovery
|
NOTE avahi-browse vyhladava "len" eSCL skenery, airscan-discover vyhladava eSCL aj WSD skenery.
|
# temporary disable firewalld or allow mDNS traffic on 5353 port (firewalld<service name="mdns"/>
) $ avahi-browse --all --terminate # --resolve $ avahi-browse --resolve --terminate _uscan._tcp # eSCL AirPrint scanning # similar asairscan-discover -d
$ avahi-browse --resolve --terminate _ipp._tcp # IPP (Internet Printing Protocol) # similar asippfind
(supported services: '_ipp._tcp' and '_printer._tcp') orlpinfo -l -v
$ avahi-resolve --address 192.168.0.123 192.168.0.123 EPSON7B55E9.local $ avahi-resolve --name EPSON7B55E9.local EPSON7B55E9.local 192.168.0.123
# Brother MFC-T910DW $ avahi-resolve --address 172.30.0.55 # WiFi 'SAV Internet' and temporary disable firewalld 172.30.0.55 BRW90324B17AD6E.local $ avahi-resolve --name BRW90324B17AD6E.local BRW90324B17AD6E.local 172.30.0.55 $ avahi-browse --all --terminate --resolve + wlp1s0f0u2 IPv4 Brother MFC-T910DW _http._tcp local + wlp1s0f0u2 IPv4 Brother MFC-T910DW _uscan._tcp local + wlp1s0f0u2 IPv4 Brother MFC-T910DW _printer._tcp local + wlp1s0f0u2 IPv4 Brother MFC-T910DW _ipp._tcp local + wlp1s0f0u2 IPv4 Brother MFC-T910DW _pdl-datastream._tcp local + wlp1s0f0u2 IPv4 Brother MFC-T910DW _scanner._tcp local = wlp1s0f0u2 IPv4 Brother MFC-T910DW _http._tcp local hostname = [BRW90324B17AD6E.local] address = [172.30.0.55] port = [80] txt = [] = wlp1s0f0u2 IPv4 Brother MFC-T910DW _uscan._tcp local hostname = [BRW90324B17AD6E.local] address = [172.30.0.55] port = [80] txt = ["duplex=F" "is=adf,platen" "cs=binary,grayscale,color" "UUID=e3248000-80ce-11db-8000-3c2af47070ba" "pdl=application/pdf,image/jpeg" "note=UEF SAV 322" "ty=Brother MFC-T910DW" "rs=eSCL" "representation=http://BRW90324B17AD6E.local./icons/device-icons-128.png" "adminurl=http://BRW90324B17AD6E.local./net/net/airprint.html" "vers=2.63" "txtvers=1"] = wlp1s0f0u2 IPv4 Brother MFC-T910DW _printer._tcp local hostname = [BRW90324B17AD6E.local] address = [172.30.0.55] port = [515] txt = ["UUID=e3248000-80ce-11db-8000-3c2af47070ba" "TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Scan=T" "Fax=T" "Duplex=T" "Copies=F" "Color=T" "usb_CMD=HBP,PJL" "usb_MDL=MFC-T910DW" "usb_MFG=Brother" "priority=50" "adminurl=telnet://BRW90324B17AD6E.local./" "product=(Brother MFC-T910DW)" "ty=Brother MFC-T910DW" "note=UEF SAV 322" "rp=duerqxesz5090" "pdl=application/octet-stream,image/urf,image/jpeg,image/pwg-raster,application/vnd.brother-hbp" "qtotal=1" "txtvers=1"] = wlp1s0f0u2 IPv4 Brother MFC-T910DW _ipp._tcp local hostname = [BRW90324B17AD6E.local] address = [172.30.0.55] port = [631] txt = ["mopria-certified=1.3" "print_wfds=T" "UUID=e3248000-80ce-11db-8000-3c2af47070ba" "PaperMax=legal-A4" "kind=document,envelope,postcard,photo" "URF=SRGB24,W8,CP1,IS19-1,MT1-8-11,OB9,PQ4-5,RS200-300,OFU0,V1.4,DM3" "rfo=ipp/faxout" "TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Scan=T" "Fax=T" "Duplex=T" "Copies=F" "Color=T" "usb_CMD=HBP,PJL" "usb_MDL=MFC-T910DW" "usb_MFG=Brother" "priority=25" "adminurl=http://BRW90324B17AD6E.local./net/net/airprint.html" "product=(Brother MFC-T910DW)" "ty=Brother MFC-T910DW" "note=UEF SAV 322" "rp=ipp/print" "pdl=application/octet-stream,image/urf,image/jpeg,image/pwg-raster,application/vnd.brother-hbp" "qtotal=1" "txtvers=1"] = wlp1s0f0u2 IPv4 Brother MFC-T910DW _pdl-datastream._tcp local hostname = [BRW90324B17AD6E.local] address = [172.30.0.55] port = [9100] txt = ["UUID=e3248000-80ce-11db-8000-3c2af47070ba" "TBCP=T" "Transparent=F" "Binary=T" "PaperCustom=T" "Scan=T" "Fax=T" "Duplex=T" "Copies=F" "Color=T" "usb_CMD=HBP,PJL" "usb_MDL=MFC-T910DW" "usb_MFG=Brother" "priority=75" "adminurl=telnet://BRW90324B17AD6E.local./" "product=(Brother MFC-T910DW)" "ty=Brother MFC-T910DW" "note=UEF SAV 322" "pdl=application/octet-stream,image/urf,image/jpeg,image/pwg-raster,application/vnd.brother-hbp" "qtotal=1" "txtvers=1"] = wlp1s0f0u2 IPv4 Brother MFC-T910DW _scanner._tcp local hostname = [BRW90324B17AD6E.local] address = [172.30.0.55] port = [54921] txt = ["flatbed=T" "feeder=T" "button=T" "mdl=MFC-T910DW" "mfg=Brother" "ty=Brother MFC-T910DW" "adminurl=telnet://BRW90324B17AD6E.local./" "note=UEF SAV 322" "txtvers=1"]
$ airscan-discover [devices] Brother MFC-T910DW = http://172.30.0.55:80/eSCL/, eSCL Brother MFC-T910DW = http://172.30.0.55:80/WebServices/ScannerService, WSD $ ippfind # _ipp._tcp by default ipp://BRW90324B17AD6E.local:631/ipp/print $ ippfind _printer._tcp lpd://BRW90324B17AD6E.local:515/duerqxesz5090 $ ipptool -tv ipp://BRW90324B17AD6E.local:631/ipp/print get-printer-attributes.test | grep -iE "printer attributes|ipp-versions" Get printer attributes using get-printer-attributes [PASS] ipp-versions-supported (1setOf keyword) = 1.0,1.1,2.0 $ lpinfo -l -v Device: uri = dnssd://Brother%20MFC-T910DW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-3c2af47070ba class = network info = Brother MFC-T910DW make-and-model = Brother MFC-T910DW device-id = MFG:Brother;MDL:MFC-T910DW;CMD:HBP,PJL; location = NOTE Driver: IPP Everywhere Device: uri = ipp://Brother%20MFC-T910DW._ipp._tcp.local/ class = network info = Brother MFC-T910DW (driverless) make-and-model = Brother MFC-T910DW device-id = MFG:Brother;MDL:MFC-T910DW;CMD:PWGRaster,AppleRaster,URF,JPEG,PWG; location = NOTE Driver: IPP Everywhere (to same as for dnssd connection) Device: uri = lpd://BRW90324B17AD6E/BINARY_P1 class = network info = Brother MFC-T910DW make-and-model = Brother MFC-T910DW device-id = MFG:Brother;CMD:HBP,PJL;MDL:MFC-T910DW;CLS:PRINTER;CID:Brother Generic Jpeg Type2; location = UEF SAV 322 NOTE Driver: vendor proprietary or another suitable driver
# Brother DCP-7070DW $ avahi-resolve --address 192.168.1.149 # KE TN2 LAN 192.168.1.149 BRN001BA9EBD873.local $ avahi-resolve --name BRN001BA9EBD873.local BRN001BA9EBD873.local 192.168.1.149 $ avahi-browse --all --terminate --resolve + enp7s0 IPv4 Brother DCP-7070DW _http._tcp local + enp7s0 IPv4 Brother DCP-7070DW _ipp._tcp local + enp7s0 IPv4 Brother DCP-7070DW _printer._tcp local + enp7s0 IPv4 Brother DCP-7070DW _pdl-datastream._tcp local = enp7s0 IPv4 Brother DCP-7070DW _http._tcp local hostname = [BRN001BA9EBD873.local] address = [192.168.1.149] port = [80] txt = [] = enp7s0 IPv4 Brother DCP-7070DW _ipp._tcp local hostname = [BRN001BA9EBD873.local] address = [192.168.1.149] port = [631] txt = ["TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=F" "usb_MDL=DCP-7070DW" "usb_MFG=Brother" "priority=50" "adminurl=http://BRN001BA9EBD873.local./" "product=(Brother DCP-7070DW)" "ty=Brother DCP-7070DW" "rp=duerqxesz5090" "pdl=application/vnd.hp-PCL" "qtotal=1" "txtvers=1"] = enp7s0 IPv4 Brother DCP-7070DW _printer._tcp local hostname = [BRN001BA9EBD873.local] address = [192.168.1.149] port = [515] txt = ["TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=F" "usb_MDL=DCP-7070DW" "usb_MFG=Brother" "priority=75" "adminurl=http://BRN001BA9EBD873.local./" "product=(Brother DCP-7070DW)" "ty=Brother DCP-7070DW" "rp=duerqxesz5090" "pdl=application/vnd.hp-PCL" "qtotal=1" "txtvers=1"] = enp7s0 IPv4 Brother DCP-7070DW _pdl-datastream._tcp local hostname = [BRN001BA9EBD873.local] address = [192.168.1.149] port = [9100] txt = ["TBCP=T" "Transparent=F" "Binary=T" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=F" "usb_MDL=DCP-7070DW" "usb_MFG=Brother" "priority=25" "adminurl=http://BRN001BA9EBD873.local./" "product=(Brother DCP-7070DW)" "ty=Brother DCP-7070DW" "pdl=application/vnd.hp-PCL" "qtotal=1" "txtvers=1"]
$ airscan-discover [devices] Brother DCP-7070DW = http://192.168.1.149:80/WebServices/ScannerService, WSD $ ippfind # _ipp._tcp by default ipp://BRN001BA9EBD873.local:631/duerqxesz5090 $ ippfind _printer._tcp lpd://BRN001BA9EBD873.local:515/duerqxesz5090 $ ipptool -tv ipp://BRN001BA9EBD873.local:631/duerqxesz5090 get-printer-attributes.test | grep -i "printer attributes" Get printer attributes using get-printer-attributes [FAIL] # NOTE Tato tlaciaren v skutocnosti nepodporuje IPP napriek tomu, ze sa tak tvari (phantom/fake IPP printer): "rp=duerqxesz5090" (resource path in '_ipp._tcp') $ lpinfo -l -v Device: uri = dnssd://Brother%20DCP-7070DW._pdl-datastream._tcp.local/ class = network info = Brother DCP-7070DW make-and-model = Brother DCP-7070DW device-id = MFG:Brother;MDL:DCP-7070DW;CMD:PCL; location = NOTE Driver: ToDo Device: uri = lpd://BRN001BA9EBD873/BINARY_P1 class = network info = Brother DCP-7070DW make-and-model = Brother DCP-7070DW device-id = MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:DCP-7070DW;CLS:PRINTER;CID:Brother Laser Type1; location = NOTE Driver: vendor proprietary or another suitable driver
# EPSON L6570 Series $ avahi-browse --all --terminate --resolve + enp7s0 IPv4 EPSON L6570 Series _http._tcp local + enp7s0 IPv4 EPSON L6570 Series _smb._tcp local + enp7s0 IPv4 EPSON L6570 Series _printer._tcp local + enp7s0 IPv4 EPSON L6570 Series _ipp._tcp local # _ipps._tcp + enp7s0 IPv4 EPSON L6570 Series _pdl-datastream._tcp local + enp7s0 IPv4 EPSON L6570 Series _uscan._tcp local # _uscans._tcp + enp7s0 IPv4 EPSON L6570 Series _scanner._tcp local = enp7s0 IPv4 EPSON L6570 Series _http._tcp local hostname = [EPSON7B55E9.local] address = [192.168.0.123] port = [80] txt = [] = enp7s0 IPv4 EPSON L6570 Series _smb._tcp local hostname = [EPSON7B55E9.local] address = [192.168.0.123] port = [445] txt = [] = enp7s0 IPv4 EPSON L6570 Series _printer._tcp local hostname = [EPSON7B55E9.local] address = [192.168.0.123] port = [515] txt = ["note=" "adminurl=http://EPSON7B55E9.local.:80/PRESENTATION/BONJOUR" "qtotal=1" "rp=auto" "pdl=application/vnd.epson.escpr" "product=(EPSON L6570 Series)" "usb_MDL=L6570 Series" "usb_MFG=EPSON" "ty=EPSON L6570 Series" "priority=50" "txtvers=1"] = enp7s0 IPv4 EPSON L6570 Series _ipp._tcp local # _ipps._tcp identical hostname = [EPSON7B55E9.local] address = [192.168.0.123] port = [631] txt = ["TLS=1.2" "UUID=cfe92100-67c4-11d4-a45f-dccd2f7b55e9" "note=" "adminurl=http://EPSON7B55E9.local.:80/PRESENTATION/BONJOUR" "priority=30" "mopria-certified=2.0" "URF=CP1,PQ4-5,OB9,OFU0,RS300-600,SRGB24,W8,DM3,IS1-2-18,V1.4,MT1-3-6-8-10-11-12" "PaperMax=legal-A4" "kind=document,envelope,photo" "rfo=ipp/faxout" "Fax=T" "Scan=T" "Duplex=T" "Color=T" "qtotal=1" "rp=ipp/print" "pdl=application/octet-stream,image/pwg-raster,image/urf,image/jpeg,application/vnd.epson.escpr" "product=(EPSON L6570 Series)" "usb_MDL=L6570 Series" "usb_MFG=EPSON" "ty=EPSON L6570 Series" "txtvers=1"] = enp7s0 IPv4 EPSON L6570 Series _pdl-datastream._tcp local hostname = [EPSON7B55E9.local] address = [192.168.0.123] port = [9100] txt = ["note=" "adminurl=http://EPSON7B55E9.local.:80/PRESENTATION/BONJOUR" "qtotal=1" "pdl=application/vnd.epson.escpr" "product=(EPSON L6570 Series)" "usb_MDL=L6570 Series" "usb_MFG=EPSON" "ty=EPSON L6570 Series" "priority=40" "txtvers=1"] = enp7s0 IPv4 EPSON L6570 Series _uscan._tcp local # _uscans._tcp identical hostname = [EPSON7B55E9.local] address = [192.168.0.123] port = [443] txt = ["representation=https://EPSON7B55E9.local.:443/PRESENTATION/AIRPRINT/PRINTER_128.PNG" "note=" "UUID=cfe92100-67c4-11d4-a45f-dccd2f7b55e9" "adminurl=http://EPSON7B55E9.local.:80/PRESENTATION/BONJOUR" "usb_MFG=EPSON" "mopria-certified-scan=1.3" "duplex=T" "is=platen,adf" "cs=color,grayscale,binary" "pdl=application/pdf,image/jpeg" "ty=EPSON L6570 Series" "rs=eSCL" "vers=2.63" "txtvers=1"] = enp7s0 IPv4 EPSON L6570 Series _scanner._tcp local hostname = [EPSON7B55E9.local] address = [192.168.0.123] port = [1865] txt = ["note=" "scannerAvailable=1" "UUID=cfe92100-67c4-11d4-a45f-dccd2f7b55e9" "mdl=L6570 Series" "mfg=EPSON" "adminurl=http://EPSON7B55E9.local.:80/PRESENTATION/BONJOUR" "ty=EPSON L6570 Series" "txtvers=1"]
$ airscan-discover [devices] EPSON L6570 Series = http://192.168.0.123:443/eSCL/, eSCL EPSON L6570 Series = http://192.168.0.123:80/WDP/SCAN, WSD $ ippfind # _ipp._tcp by default ipp://EPSON7B55E9.local:631/ipp/print $ ippfind _printer._tcp lpd://EPSON7B55E9.local:515/auto $ ipptool -tv ipp://EPSON7B55E9.local:631/ipp/print get-printer-attributes.test | grep -iE "printer attributes|ipp-versions" Get printer attributes using get-printer-attributes [PASS] ipp-versions-supported (1setOf keyword) = 1.0,1.1,2.0 $ lpinfo -l -v Device: uri = dnssd://EPSON%20L6570%20Series._ipp._tcp.local/?uuid=cfe92100-67c4-11d4-a45f-dccd2f7b55e9 class = network info = EPSON L6570 Series make-and-model = EPSON L6570 Series device-id = MFG:EPSON;MDL:L6570 Series;CMD:PWG,URF,JPEG; location = NOTE Driver: IPP Everywhere Device: uri = ipps://EPSON%20L6570%20Series._ipps._tcp.local/ class = network info = EPSON L6570 Series (driverless) make-and-model = EPSON L6570 Series device-id = MFG:EPSON;MDL:L6570 Series;CMD:PWGRaster,AppleRaster,PWG,URF,JPEG; location = NOTE Driver: IPP Everywhere (to same as for dnssd connection) Device: uri = lpd://192.168.0.123:515/PASSTHRU class = network info = EPSON L6570 Series make-and-model = EPSON L6570 Series device-id = MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR7,END4,GENEP;MDL:L6570 Series;CLS:PRINTER;DES:EPSON L6570 Series;CID:EpsonRGB;FID:FXA,DPA,WFA,ETA,AFA,DAA,WRA;RID:41;DDS:022500;ELG:1380;SN:000000000000000000; location = NOTE Driver: vendor proprietary or another suitable driver