SlideShare a Scribd company logo
Printing on Linux,
simple right?
Dobrica Pavlinušić
                                   http://blog.rot13.org/



           Presentation URL: http://bit.ly/rv-foi-printing
Content
● CUPS - printing solution for 21st century
  ○ and why we might need another solutions...
● Specialized printers are different
  ○ EVOLIS Dualys card printer
  ○ Zebra S4M label printer
● strategy to develop support for printers
  ○ print data viewer first to understand protocol
  ○ converter from standard format to printer protocol
● lpd - older but standard across platforms
CUPS - Common Unix
Printing System
http://www.cups.org/
CUPS is the standards-based, open source
printing system developed by Apple Inc. for
Mac OS® X and other UNIX®-like operating
systems.
● all printers are raster devices!
EVOLIS Dualys card printer
http://blog.rot13.org/2010/08/evolis-dualys-pixel-exact-printing-without-cups.html

● have CUPS driver on vendor site
      ○ problems with duplex printing
● printer is somewhat complex robot
● pixel-exact barcodes!
● development strategy:
  ○ simulator to preview file
  ○ driver to produce printer data
● Inkscape to design card
● GhostScript to rasterize
RFID integration
Printer has unsupported RFID reader on
internal USB hub, sigh!
Zebra S4M label printer
http://blog.rot13.org/2012/02/printing-from-koha-to-zebra-printers-on-local-windows-machine.html

● have CUPS driver upstream
● ZPL printer language
      ○ much more than bitmap printer!
● Windows GDI driver
      ○ configures printer correctly
● pbm2ZPL.pl driver
● ZPL2pbm.pl viewer
● printers connected via
  usb to Windows
lpd - Line Printer Daemon
●   supported in CUPS as legacy protocol
●   all hardware printer servers supports it
●   message queue before it was Web2.0y
●   Did you know that lpd can play mp3 files?
    http://vext01.blogspot.com/2010/11/lpd-music-hack-how-its-done.html

● Windows lpd server
    ○ spooling must be enabled!
    ○ direct to port option with lpd is /dev/null
    ○ no authentication (printers on Intranet, OK)
●   rlpr - print on remote lpd printers
So, how to print from
Internet directly to printer?
1. Users enter barcode on web page
2. redirect browser to internal URL http:
   //printer-zebra.intranet/print.cgi?
   print=12345%20call%
   20number&return=http://url
3. print.cgi
   a.   rsvg-convert creates png from Inkscape template
   b.   png2ppm | ppm2ZPL | lrpr to client IP address
   c.   check printer status with rlpq
   d.   redirect browser to return with added station=IP
Website includes png picture of label
Integration of Koha quick spine label creator
and Zebra printer connected to Windows via
lpd

Round trip to internal site which generates ZPL
is so fast, it's not shown in this video
Questions?
● Sometimes, it worth re-thinking conventional
  wisdom about printer deployment
● Writing printer drives is like reverse
  engineering with documentation ;-)
● More information on my blog
  http://blog.rot13.org/

More Related Content

PPTX
Printing with cups (linux)
PPT
CUPS: Common UNIX Printing System
PPT
Linux
PPT
Ch14 system administration
PPT
Install and configure linux
PPT
Printing with cups (linux)
CUPS: Common UNIX Printing System
Linux
Ch14 system administration
Install and configure linux

What's hot (20)

PPT
Linux conf-admin
PDF
Lavigne bsdmag march12
PPT
Linux memorymanagement
PPT
Double data rate (ddr)
PPT
PDF
Useful Linux and Unix commands handbook
ODP
PDF
LINUX Admin Quick Reference
DOCX
Linux, PHP, SMS - USSD Examination
ODP
Linuxppt
PPT
Batch file programming
ODP
Memory management in Linux
PDF
Linux file commands and shell scripts
PPTX
Linux memory-management-kamal
PPT
LPAR2RRD on CZ/SK common 2014
ODP
Ubuntu and Linux Terminal Server Project
PPT
Linux commands
PDF
50 most frequently used unix linux commands (with examples)
PPTX
Red hat linux essentials
Linux conf-admin
Lavigne bsdmag march12
Linux memorymanagement
Double data rate (ddr)
Useful Linux and Unix commands handbook
LINUX Admin Quick Reference
Linux, PHP, SMS - USSD Examination
Linuxppt
Batch file programming
Memory management in Linux
Linux file commands and shell scripts
Linux memory-management-kamal
LPAR2RRD on CZ/SK common 2014
Ubuntu and Linux Terminal Server Project
Linux commands
50 most frequently used unix linux commands (with examples)
Red hat linux essentials
Ad

Viewers also liked (20)

PDF
Mojo Facets – so, you have data and browser?
PPTX
Test
PDF
Kako napraviti Google od zgrade sa računalima?
PDF
The Attack of the Learning Clones
PDF
This is an interesting metadata source. Can I import it into Koha?
PPT
What Is Powerpoint
PDF
Morocco
PPT
Ppt Demo Slideshare
PPTX
Re-Negotiating Narrative: Emergent Storytelling
PDF
Post-relational databases: What's wrong with web development? v3
PPTX
Wiki: Open Collaborative Learning Environment
PDF
Oslobodimo Hardware
PDF
Towards an Instructional Design Motivational Framework to Address the Retenti...
PPT
Χριστούγεννα χωρίς Χριστό
PDF
Social Media & Web 2.0 Services for Choirs
PPT
Euronem Zambia 2008
PPTX
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...
PPT
Cisco Board 18
PPT
CTE Teaching and Learning Inst. 2008
PPTX
Hacktivism in Virtual Worlds
Mojo Facets – so, you have data and browser?
Test
Kako napraviti Google od zgrade sa računalima?
The Attack of the Learning Clones
This is an interesting metadata source. Can I import it into Koha?
What Is Powerpoint
Morocco
Ppt Demo Slideshare
Re-Negotiating Narrative: Emergent Storytelling
Post-relational databases: What's wrong with web development? v3
Wiki: Open Collaborative Learning Environment
Oslobodimo Hardware
Towards an Instructional Design Motivational Framework to Address the Retenti...
Χριστούγεννα χωρίς Χριστό
Social Media & Web 2.0 Services for Choirs
Euronem Zambia 2008
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...
Cisco Board 18
CTE Teaching and Learning Inst. 2008
Hacktivism in Virtual Worlds
Ad

Similar to Printing on Linux, simple right? (20)

PDF
DocDokuPLM presentation - OW2Con 2015 Community Award winner
PDF
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
 
PDF
Open Printing Summit / PWG Meeting 2012 Cupertino Event Report
PPTX
Full stack development
PDF
Chromium: NaCl and Pepper API
PDF
Linux as a gaming platform, ideology aside
PDF
Future of Printing Standardizatoin
PDF
Akademy 2010 presentation
DOCX
Printing in linux with cups
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
PDF
Embedded platform choices
PDF
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
PDF
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
PPTX
Add sale davinci
PDF
What's New in OpenLDAP
PDF
Glimworm 21-11-2013
PDF
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
PDF
Portable OS & Portable Application
DocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
 
Open Printing Summit / PWG Meeting 2012 Cupertino Event Report
Full stack development
Chromium: NaCl and Pepper API
Linux as a gaming platform, ideology aside
Future of Printing Standardizatoin
Akademy 2010 presentation
Printing in linux with cups
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Embedded platform choices
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Add sale davinci
What's New in OpenLDAP
Glimworm 21-11-2013
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
Portable OS & Portable Application

More from Dobrica Pavlinušić (20)

PDF
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
PDF
Linux+sensor+device-tree+shell=IoT !
PDF
bro - what is in my network?
PDF
Let's hack cheap hardware 2016 edition
PDF
Raspberry Pi - best friend for all your GPIO needs
PDF
Cheap, good, hackable tools from China: AVR component tester
PDF
Ganeti - build your own cloud
PDF
FSEC 2014 - I can haz your board with JTAG
PDF
Hardware hacking for software people
PDF
Gnu linux on arm for $50 - $100
PDF
Security of Linux containers in the cloud
PDF
Web scale monitoring
PDF
SysAdmin cookbook
PPT
KohaCon11: Integrating Koha with RFID system
PDF
Deploy your own P2P network
PDF
Free Libre Open Source Software at FFZG library
PDF
Virtualization which isn't: LXC (Linux Containers)
PDF
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
PDF
Post-relational databases: What's wrong with web development?
PDF
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Linux+sensor+device-tree+shell=IoT !
bro - what is in my network?
Let's hack cheap hardware 2016 edition
Raspberry Pi - best friend for all your GPIO needs
Cheap, good, hackable tools from China: AVR component tester
Ganeti - build your own cloud
FSEC 2014 - I can haz your board with JTAG
Hardware hacking for software people
Gnu linux on arm for $50 - $100
Security of Linux containers in the cloud
Web scale monitoring
SysAdmin cookbook
KohaCon11: Integrating Koha with RFID system
Deploy your own P2P network
Free Libre Open Source Software at FFZG library
Virtualization which isn't: LXC (Linux Containers)
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Post-relational databases: What's wrong with web development?
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
KodekX | Application Modernization Development
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectral efficient network and resource selection model in 5G networks
Dropbox Q2 2025 Financial Results & Investor Presentation
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
Machine learning based COVID-19 study performance prediction
Digital-Transformation-Roadmap-for-Companies.pptx
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Printing on Linux, simple right?

  • 1. Printing on Linux, simple right? Dobrica Pavlinušić http://blog.rot13.org/ Presentation URL: http://bit.ly/rv-foi-printing
  • 2. Content ● CUPS - printing solution for 21st century ○ and why we might need another solutions... ● Specialized printers are different ○ EVOLIS Dualys card printer ○ Zebra S4M label printer ● strategy to develop support for printers ○ print data viewer first to understand protocol ○ converter from standard format to printer protocol ● lpd - older but standard across platforms
  • 3. CUPS - Common Unix Printing System http://www.cups.org/ CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS® X and other UNIX®-like operating systems. ● all printers are raster devices!
  • 4. EVOLIS Dualys card printer http://blog.rot13.org/2010/08/evolis-dualys-pixel-exact-printing-without-cups.html ● have CUPS driver on vendor site ○ problems with duplex printing ● printer is somewhat complex robot ● pixel-exact barcodes! ● development strategy: ○ simulator to preview file ○ driver to produce printer data ● Inkscape to design card ● GhostScript to rasterize
  • 5. RFID integration Printer has unsupported RFID reader on internal USB hub, sigh!
  • 6. Zebra S4M label printer http://blog.rot13.org/2012/02/printing-from-koha-to-zebra-printers-on-local-windows-machine.html ● have CUPS driver upstream ● ZPL printer language ○ much more than bitmap printer! ● Windows GDI driver ○ configures printer correctly ● pbm2ZPL.pl driver ● ZPL2pbm.pl viewer ● printers connected via usb to Windows
  • 7. lpd - Line Printer Daemon ● supported in CUPS as legacy protocol ● all hardware printer servers supports it ● message queue before it was Web2.0y ● Did you know that lpd can play mp3 files? http://vext01.blogspot.com/2010/11/lpd-music-hack-how-its-done.html ● Windows lpd server ○ spooling must be enabled! ○ direct to port option with lpd is /dev/null ○ no authentication (printers on Intranet, OK) ● rlpr - print on remote lpd printers
  • 8. So, how to print from Internet directly to printer? 1. Users enter barcode on web page 2. redirect browser to internal URL http: //printer-zebra.intranet/print.cgi? print=12345%20call% 20number&return=http://url 3. print.cgi a. rsvg-convert creates png from Inkscape template b. png2ppm | ppm2ZPL | lrpr to client IP address c. check printer status with rlpq d. redirect browser to return with added station=IP Website includes png picture of label
  • 9. Integration of Koha quick spine label creator and Zebra printer connected to Windows via lpd Round trip to internal site which generates ZPL is so fast, it's not shown in this video
  • 10. Questions? ● Sometimes, it worth re-thinking conventional wisdom about printer deployment ● Writing printer drives is like reverse engineering with documentation ;-) ● More information on my blog http://blog.rot13.org/