SlideShare a Scribd company logo
1 of 121
Download to read offline
2013/08/03 @ COSCUP 2013
Automatic Printing System
with Open SourceTools
Mosky
1
This Slide
✤ This slide is available at:
https://speakerdeck.com/mosky/automatic-printing-system-with-
open-source-tools
2
Mosky
3
Mosky
✤ I am working at www.pinkoi.com .
3
Mosky
✤ I am working at www.pinkoi.com .
✤ I've been using Ubuntu everyday since 2009.
3
Mosky
✤ I am working at www.pinkoi.com .
✤ I've been using Ubuntu everyday since 2009.
✤ A speaker at PyCon TW 2013, 2012, PyCon JP 2012, ...
3
Mosky
✤ I am working at www.pinkoi.com .
✤ I've been using Ubuntu everyday since 2009.
✤ A speaker at PyCon TW 2013, 2012, PyCon JP 2012, ...
✤ http://mosky.tw/
3
Outline
4
Outline
✤ The Motivation
4
Outline
✤ The Motivation
✤ Setup Printing System on Linux
4
Outline
✤ The Motivation
✤ Setup Printing System on Linux
✤ Convert Web to PDF
4
Outline
✤ The Motivation
✤ Setup Printing System on Linux
✤ Convert Web to PDF
✤ The Tips
4
The Motivation
5
It's just out of control!
We have to issue more than 1,000 invoices per month.
6
It's just out of control!
We have to issue more than 1,000 invoices per month.
6
We love hand-made stuff.
Pinkoi is the largest online community and marketplace for designers in Asia
7
We love hand-made stuff.
Pinkoi is the largest online community and marketplace for designers in Asia
7
So we build it for ourselves
with many cups of coffee.
8
So we build it for ourselves
with many cups of coffee.
8
Setup Printing System on Linux
9
The Check List
10
The Check List
✤ A computer installed Linux and CUPS
(Common Unix Printing System).
10
The Check List
✤ A computer installed Linux and CUPS
(Common Unix Printing System).
✤ http://www.cups.org/
10
The Check List
✤ A computer installed Linux and CUPS
(Common Unix Printing System).
✤ http://www.cups.org/
✤ http://localhost:631/
10
The Check List
✤ A computer installed Linux and CUPS
(Common Unix Printing System).
✤ http://www.cups.org/
✤ http://localhost:631/
✤ A printer which has an IP address.
10
The Check List
✤ A computer installed Linux and CUPS
(Common Unix Printing System).
✤ http://www.cups.org/
✤ http://localhost:631/
✤ A printer which has an IP address.
✤ http://192.168.2.100/
10
The Check List
✤ A computer installed Linux and CUPS
(Common Unix Printing System).
✤ http://www.cups.org/
✤ http://localhost:631/
✤ A printer which has an IP address.
✤ http://192.168.2.100/
✤ lpd://192.168.2.100/
10
Setup Printer with CUPS' Driver
11
Setup Printer with CUPS' Driver
✤ Find the driver for your printer:
11
Setup Printer with CUPS' Driver
✤ Find the driver for your printer:
✤ $ lpinfo --make-and-model 'P1006' -m
11
Setup Printer with CUPS' Driver
✤ Find the driver for your printer:
✤ $ lpinfo --make-and-model 'P1006' -m
✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet
p1006 hpijs, 3.10.2, requires proprietary plugin
11
Setup Printer with CUPS' Driver
✤ Find the driver for your printer:
✤ $ lpinfo --make-and-model 'P1006' -m
✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet
p1006 hpijs, 3.10.2, requires proprietary plugin
✤ Add the printer with the driver we found from the above command:
11
Setup Printer with CUPS' Driver
✤ Find the driver for your printer:
✤ $ lpinfo --make-and-model 'P1006' -m
✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet
p1006 hpijs, 3.10.2, requires proprietary plugin
✤ Add the printer with the driver we found from the above command:
✤ $ lpadmin -E -p <NAME> -v socket://<IP> -m <DRIVER> -E
11
Setup Printer with CUPS' Driver
✤ Find the driver for your printer:
✤ $ lpinfo --make-and-model 'P1006' -m
✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet
p1006 hpijs, 3.10.2, requires proprietary plugin
✤ Add the printer with the driver we found from the above command:
✤ $ lpadmin -E -p <NAME> -v socket://<IP> -m <DRIVER> -E
✤ $ lpadmin -E -p 'hp-p1006' -v socket://192.168.2.100 -m
drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd -E
11
Setup Printer with PPD
12
Setup Printer with PPD
✤ Find the PPD file for your printer:
12
Setup Printer with PPD
✤ Find the PPD file for your printer:
✤ http://www.openprinting.org/drivers
12
Setup Printer with PPD
✤ Find the PPD file for your printer:
✤ http://www.openprinting.org/drivers
✤ Put the PPD file in:
12
Setup Printer with PPD
✤ Find the PPD file for your printer:
✤ http://www.openprinting.org/drivers
✤ Put the PPD file in:
✤ /usr/share/cups/model
12
Setup Printer with PPD
✤ Find the PPD file for your printer:
✤ http://www.openprinting.org/drivers
✤ Put the PPD file in:
✤ /usr/share/cups/model
✤ Add the printer with this PPD file:
12
Setup Printer with PPD
✤ Find the PPD file for your printer:
✤ http://www.openprinting.org/drivers
✤ Put the PPD file in:
✤ /usr/share/cups/model
✤ Add the printer with this PPD file:
✤ $ lpadmin -E -p <NAME> -v lpd://<IP>/lp -m <DRIVER> -E
12
Setup Printer with PPD
✤ Find the PPD file for your printer:
✤ http://www.openprinting.org/drivers
✤ Put the PPD file in:
✤ /usr/share/cups/model
✤ Add the printer with this PPD file:
✤ $ lpadmin -E -p <NAME> -v lpd://<IP>/lp -m <DRIVER> -E
✤ $ lpadmin -E -p 'hp-p1006' -v lpd://192.168.2.100/lp -m
12
More about lpadmin
13
More about lpadmin
✤ Enable a printer:
13
More about lpadmin
✤ Enable a printer:
✤ $ lpadmin -p <NAME> -E
13
More about lpadmin
✤ Enable a printer:
✤ $ lpadmin -p <NAME> -E
✤ Set a printer as default:
13
More about lpadmin
✤ Enable a printer:
✤ $ lpadmin -p <NAME> -E
✤ Set a printer as default:
✤ $ lpadmin -d <NAME>
13
More about lpadmin
✤ Enable a printer:
✤ $ lpadmin -p <NAME> -E
✤ Set a printer as default:
✤ $ lpadmin -d <NAME>
✤ Remove a printer:
13
More about lpadmin
✤ Enable a printer:
✤ $ lpadmin -p <NAME> -E
✤ Set a printer as default:
✤ $ lpadmin -d <NAME>
✤ Remove a printer:
✤ $ lpadmin -x <NAME>
13
Check Printer is Online
14
Check Printer is Online
✤ Just print a test file:
14
Check Printer is Online
✤ Just print a test file:
✤ $ lpr -P <NAME> <FILE>
14
Check Printer is Online
✤ Just print a test file:
✤ $ lpr -P <NAME> <FILE>
✤ Check the status of printer:
14
Check Printer is Online
✤ Just print a test file:
✤ $ lpr -P <NAME> <FILE>
✤ Check the status of printer:
✤
$ lpstat -a / $ lpstat -t
14
Check Printer is Online
✤ Just print a test file:
✤ $ lpr -P <NAME> <FILE>
✤ Check the status of printer:
✤
$ lpstat -a / $ lpstat -t
✤ Troubleshooting:
14
Check Printer is Online
✤ Just print a test file:
✤ $ lpr -P <NAME> <FILE>
✤ Check the status of printer:
✤
$ lpstat -a / $ lpstat -t
✤ Troubleshooting:
✤ $ nc -v <IP> <PORT>
14
Check Printer is Online
✤ Just print a test file:
✤ $ lpr -P <NAME> <FILE>
✤ Check the status of printer:
✤
$ lpstat -a / $ lpstat -t
✤ Troubleshooting:
✤ $ nc -v <IP> <PORT>
✤ $ nmap <IP> -p <PORT_RANGE>
14
ConvertWeb to PDF
15
The Packages
16
The Packages
✤ Use wkhtmltopdf to convert Web to PDF.
16
The Packages
✤ Use wkhtmltopdf to convert Web to PDF.
✤ $ sudo apt-get install wkhtmltopdf
16
The Packages
✤ Use wkhtmltopdf to convert Web to PDF.
✤ $ sudo apt-get install wkhtmltopdf
✤ https://code.google.com/p/wkhtmltopdf/
16
The Packages
✤ Use wkhtmltopdf to convert Web to PDF.
✤ $ sudo apt-get install wkhtmltopdf
✤ https://code.google.com/p/wkhtmltopdf/
✤ If you don't have X Window, you also need xvfb.
16
The Packages
✤ Use wkhtmltopdf to convert Web to PDF.
✤ $ sudo apt-get install wkhtmltopdf
✤ https://code.google.com/p/wkhtmltopdf/
✤ If you don't have X Window, you also need xvfb.
✤ $ sudo apt-get install xvfb
16
The Usage
17
The Usage
✤ with X Window:
17
The Usage
✤ with X Window:
✤ $ wkhtmltopdf <HTML> <PDF>
17
The Usage
✤ with X Window:
✤ $ wkhtmltopdf <HTML> <PDF>
✤ $ wkhtmltopdf -T 0 -L 0 -R 0 -B 0 --page-size A4 --
encoding utf-8 <HTML> <PDF>
17
The Usage
✤ with X Window:
✤ $ wkhtmltopdf <HTML> <PDF>
✤ $ wkhtmltopdf -T 0 -L 0 -R 0 -B 0 --page-size A4 --
encoding utf-8 <HTML> <PDF>
✤ without X window:
17
The Usage
✤ with X Window:
✤ $ wkhtmltopdf <HTML> <PDF>
✤ $ wkhtmltopdf -T 0 -L 0 -R 0 -B 0 --page-size A4 --
encoding utf-8 <HTML> <PDF>
✤ without X window:
✤ $ xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf -T 0
-L 0 -R 0 -B 0 --page-size A4 --encoding utf-8 <HTML>
<PDF>
17
Send File to Printer
18
Send File to Printer
✤ Print file:
18
Send File to Printer
✤ Print file:
✤ $ lpr -P <NAME> <FILE>...
18
Send File to Printer
✤ Print file:
✤ $ lpr -P <NAME> <FILE>...
✤ Show printer queue:
18
Send File to Printer
✤ Print file:
✤ $ lpr -P <NAME> <FILE>...
✤ Show printer queue:
✤ $ lpq -P <NAME>
18
Send File to Printer
✤ Print file:
✤ $ lpr -P <NAME> <FILE>...
✤ Show printer queue:
✤ $ lpq -P <NAME>
✤ $ lpq -a
18
Send File to Printer
✤ Print file:
✤ $ lpr -P <NAME> <FILE>...
✤ Show printer queue:
✤ $ lpq -P <NAME>
✤ $ lpq -a
✤ Cancel print job:
18
Send File to Printer
✤ Print file:
✤ $ lpr -P <NAME> <FILE>...
✤ Show printer queue:
✤ $ lpq -P <NAME>
✤ $ lpq -a
✤ Cancel print job:
✤ $ lprm -P <NAME> <JOB_ID>...
18
PyCUPS
19
PyCUPS
✤ PyPI
19
PyCUPS
✤ PyPI
✤ https://pypi.python.org/pypi/pycups
19
PyCUPS
✤ PyPI
✤ https://pypi.python.org/pypi/pycups
✤ Get connection:
19
PyCUPS
✤ PyPI
✤ https://pypi.python.org/pypi/pycups
✤ Get connection:
✤ import cups
conn = cups.Connection()
19
PyCUPS - Get Printers
20
PyCUPS - Get Printers
✤ Get printers:
20
PyCUPS - Get Printers
✤ Get printers:
✤ conn.getPrinters()
20
PyCUPS - Get Printers
✤ Get printers:
✤ conn.getPrinters()
✤ Example output:
20
PyCUPS - Get Printers
✤ Get printers:
✤ conn.getPrinters()
✤ Example output:
✤ {u'hp': {'device-uri': u'lpd://192.168.0.100/lp',
'printer-info': u'hp',
# 3: prepared to print; 4: printing; 5: this device is stop
'printer-state': 3,
'printer-state-message': u'Data file sent successfully',
'printer-state-reasons': [u'none'],
...
'printer-uri-supported': u'ipp://localhost:631/printers/hp'}}
20
PyCUPS - Print File
21
PyCUPS - Print File
✤ Print file:
21
PyCUPS - Print File
✤ Print file:
✤ conn.printFile(printer, filename, title, options)
conn.printFiles(printer, filenames, title, options)
21
PyCUPS - Print File
✤ Print file:
✤ conn.printFile(printer, filename, title, options)
conn.printFiles(printer, filenames, title, options)
✤ Example:
21
PyCUPS - Print File
✤ Print file:
✤ conn.printFile(printer, filename, title, options)
conn.printFiles(printer, filenames, title, options)
✤ Example:
✤ conn.printFile(printer, filepath,
os.path.basename(filepath), {})
21
PyCUPS - Get Jobs
22
PyCUPS - Get Jobs
✤ Get jobs:
22
PyCUPS - Get Jobs
✤ Get jobs:
✤ conn.getJobs(which_jobs='not-completed', my_jobs=False,
limit=-1, first_job_id=-1, requested_attributes=None)
22
PyCUPS - Get Jobs
✤ Get jobs:
✤ conn.getJobs(which_jobs='not-completed', my_jobs=False,
limit=-1, first_job_id=-1, requested_attributes=None)
✤ The which_jobs can be 'not-completed', 'completed' or 'all'.
22
PyCUPS - Get Jobs
✤ Get jobs:
✤ conn.getJobs(which_jobs='not-completed', my_jobs=False,
limit=-1, first_job_id=-1, requested_attributes=None)
✤ The which_jobs can be 'not-completed', 'completed' or 'all'.
✤ It returns a dict, indexed by job id, of dicts representing job attributes.
22
TheTips
23
The Error Log
24
The Error Log
✤ $ sudo tail -f /var/log/cups/error_log
24
AboutTemplate (CSS)
25
AboutTemplate (CSS)
✤ Use cm/mm as your unit ...
25
AboutTemplate (CSS)
✤ Use cm/mm as your unit ...
✤ The steps of adjusting output:
25
AboutTemplate (CSS)
✤ Use cm/mm as your unit ...
✤ The steps of adjusting output:
✤ Create 1x1 cm div block.
25
AboutTemplate (CSS)
✤ Use cm/mm as your unit ...
✤ The steps of adjusting output:
✤ Create 1x1 cm div block.
✤ Print it.
25
AboutTemplate (CSS)
✤ Use cm/mm as your unit ...
✤ The steps of adjusting output:
✤ Create 1x1 cm div block.
✤ Print it.
✤ Use zoom to adjust.
25
AboutTemplate (CSS)
✤ Use cm/mm as your unit ...
✤ The steps of adjusting output:
✤ Create 1x1 cm div block.
✤ Print it.
✤ Use zoom to adjust.
✤ Avoid floating structure.
25
Live Demo
26
Live Demo
27
Video Demo
28
29
29
The End
30
The End
31
The End
✤ CUPS
31
The End
✤ CUPS
✤
lpadmin, lpstat, lpr, lpq, lprm, ...
31
The End
✤ CUPS
✤
lpadmin, lpstat, lpr, lpq, lprm, ...
✤ wxhtmltopdf
31
The End
✤ CUPS
✤
lpadmin, lpstat, lpr, lpq, lprm, ...
✤ wxhtmltopdf
✤ PyCUPS
31
The End
✤ CUPS
✤
lpadmin, lpstat, lpr, lpq, lprm, ...
✤ wxhtmltopdf
✤ PyCUPS
✤ Some tips
31
The End
✤ CUPS
✤
lpadmin, lpstat, lpr, lpq, lprm, ...
✤ wxhtmltopdf
✤ PyCUPS
✤ Some tips
✤ Any Question?
31

More Related Content

More from Mosky Liu

Statistical Regression With Python
Statistical Regression With PythonStatistical Regression With Python
Statistical Regression With PythonMosky Liu
 
Practicing Python 3
Practicing Python 3Practicing Python 3
Practicing Python 3Mosky Liu
 
Data Science With Python
Data Science With PythonData Science With Python
Data Science With PythonMosky Liu
 
Hypothesis Testing With Python
Hypothesis Testing With PythonHypothesis Testing With Python
Hypothesis Testing With PythonMosky Liu
 
Elegant concurrency
Elegant concurrencyElegant concurrency
Elegant concurrencyMosky Liu
 
Simple Belief - Mosky @ TEDxNTUST 2015
Simple Belief - Mosky @ TEDxNTUST 2015Simple Belief - Mosky @ TEDxNTUST 2015
Simple Belief - Mosky @ TEDxNTUST 2015Mosky Liu
 
Graph-Tool in Practice
Graph-Tool in PracticeGraph-Tool in Practice
Graph-Tool in PracticeMosky Liu
 
Dive into Pinkoi 2013
Dive into Pinkoi 2013Dive into Pinkoi 2013
Dive into Pinkoi 2013Mosky Liu
 
MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013
MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013
MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013Mosky Liu
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from DataMosky Liu
 
MoSQL: More than SQL, but less than ORM
MoSQL: More than SQL, but less than ORMMoSQL: More than SQL, but less than ORM
MoSQL: More than SQL, but less than ORMMosky Liu
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - BasicMosky Liu
 

More from Mosky Liu (12)

Statistical Regression With Python
Statistical Regression With PythonStatistical Regression With Python
Statistical Regression With Python
 
Practicing Python 3
Practicing Python 3Practicing Python 3
Practicing Python 3
 
Data Science With Python
Data Science With PythonData Science With Python
Data Science With Python
 
Hypothesis Testing With Python
Hypothesis Testing With PythonHypothesis Testing With Python
Hypothesis Testing With Python
 
Elegant concurrency
Elegant concurrencyElegant concurrency
Elegant concurrency
 
Simple Belief - Mosky @ TEDxNTUST 2015
Simple Belief - Mosky @ TEDxNTUST 2015Simple Belief - Mosky @ TEDxNTUST 2015
Simple Belief - Mosky @ TEDxNTUST 2015
 
Graph-Tool in Practice
Graph-Tool in PracticeGraph-Tool in Practice
Graph-Tool in Practice
 
Dive into Pinkoi 2013
Dive into Pinkoi 2013Dive into Pinkoi 2013
Dive into Pinkoi 2013
 
MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013
MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013
MoSQL: More than SQL, but Less than ORM @ PyCon APAC 2013
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from Data
 
MoSQL: More than SQL, but less than ORM
MoSQL: More than SQL, but less than ORMMoSQL: More than SQL, but less than ORM
MoSQL: More than SQL, but less than ORM
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - Basic
 

Recently uploaded

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 

Recently uploaded (20)

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

Automatic Printing System with Open Source Tools

  • 1. 2013/08/03 @ COSCUP 2013 Automatic Printing System with Open SourceTools Mosky 1
  • 2. This Slide ✤ This slide is available at: https://speakerdeck.com/mosky/automatic-printing-system-with- open-source-tools 2
  • 4. Mosky ✤ I am working at www.pinkoi.com . 3
  • 5. Mosky ✤ I am working at www.pinkoi.com . ✤ I've been using Ubuntu everyday since 2009. 3
  • 6. Mosky ✤ I am working at www.pinkoi.com . ✤ I've been using Ubuntu everyday since 2009. ✤ A speaker at PyCon TW 2013, 2012, PyCon JP 2012, ... 3
  • 7. Mosky ✤ I am working at www.pinkoi.com . ✤ I've been using Ubuntu everyday since 2009. ✤ A speaker at PyCon TW 2013, 2012, PyCon JP 2012, ... ✤ http://mosky.tw/ 3
  • 10. Outline ✤ The Motivation ✤ Setup Printing System on Linux 4
  • 11. Outline ✤ The Motivation ✤ Setup Printing System on Linux ✤ Convert Web to PDF 4
  • 12. Outline ✤ The Motivation ✤ Setup Printing System on Linux ✤ Convert Web to PDF ✤ The Tips 4
  • 14. It's just out of control! We have to issue more than 1,000 invoices per month. 6
  • 15. It's just out of control! We have to issue more than 1,000 invoices per month. 6
  • 16. We love hand-made stuff. Pinkoi is the largest online community and marketplace for designers in Asia 7
  • 17. We love hand-made stuff. Pinkoi is the largest online community and marketplace for designers in Asia 7
  • 18. So we build it for ourselves with many cups of coffee. 8
  • 19. So we build it for ourselves with many cups of coffee. 8
  • 20. Setup Printing System on Linux 9
  • 22. The Check List ✤ A computer installed Linux and CUPS (Common Unix Printing System). 10
  • 23. The Check List ✤ A computer installed Linux and CUPS (Common Unix Printing System). ✤ http://www.cups.org/ 10
  • 24. The Check List ✤ A computer installed Linux and CUPS (Common Unix Printing System). ✤ http://www.cups.org/ ✤ http://localhost:631/ 10
  • 25. The Check List ✤ A computer installed Linux and CUPS (Common Unix Printing System). ✤ http://www.cups.org/ ✤ http://localhost:631/ ✤ A printer which has an IP address. 10
  • 26. The Check List ✤ A computer installed Linux and CUPS (Common Unix Printing System). ✤ http://www.cups.org/ ✤ http://localhost:631/ ✤ A printer which has an IP address. ✤ http://192.168.2.100/ 10
  • 27. The Check List ✤ A computer installed Linux and CUPS (Common Unix Printing System). ✤ http://www.cups.org/ ✤ http://localhost:631/ ✤ A printer which has an IP address. ✤ http://192.168.2.100/ ✤ lpd://192.168.2.100/ 10
  • 28. Setup Printer with CUPS' Driver 11
  • 29. Setup Printer with CUPS' Driver ✤ Find the driver for your printer: 11
  • 30. Setup Printer with CUPS' Driver ✤ Find the driver for your printer: ✤ $ lpinfo --make-and-model 'P1006' -m 11
  • 31. Setup Printer with CUPS' Driver ✤ Find the driver for your printer: ✤ $ lpinfo --make-and-model 'P1006' -m ✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet p1006 hpijs, 3.10.2, requires proprietary plugin 11
  • 32. Setup Printer with CUPS' Driver ✤ Find the driver for your printer: ✤ $ lpinfo --make-and-model 'P1006' -m ✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet p1006 hpijs, 3.10.2, requires proprietary plugin ✤ Add the printer with the driver we found from the above command: 11
  • 33. Setup Printer with CUPS' Driver ✤ Find the driver for your printer: ✤ $ lpinfo --make-and-model 'P1006' -m ✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet p1006 hpijs, 3.10.2, requires proprietary plugin ✤ Add the printer with the driver we found from the above command: ✤ $ lpadmin -E -p <NAME> -v socket://<IP> -m <DRIVER> -E 11
  • 34. Setup Printer with CUPS' Driver ✤ Find the driver for your printer: ✤ $ lpinfo --make-and-model 'P1006' -m ✤ drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd HP LaserJet p1006 hpijs, 3.10.2, requires proprietary plugin ✤ Add the printer with the driver we found from the above command: ✤ $ lpadmin -E -p <NAME> -v socket://<IP> -m <DRIVER> -E ✤ $ lpadmin -E -p 'hp-p1006' -v socket://192.168.2.100 -m drv:///hpijs.drv/hp-laserjet_p1006-hpijs.ppd -E 11
  • 36. Setup Printer with PPD ✤ Find the PPD file for your printer: 12
  • 37. Setup Printer with PPD ✤ Find the PPD file for your printer: ✤ http://www.openprinting.org/drivers 12
  • 38. Setup Printer with PPD ✤ Find the PPD file for your printer: ✤ http://www.openprinting.org/drivers ✤ Put the PPD file in: 12
  • 39. Setup Printer with PPD ✤ Find the PPD file for your printer: ✤ http://www.openprinting.org/drivers ✤ Put the PPD file in: ✤ /usr/share/cups/model 12
  • 40. Setup Printer with PPD ✤ Find the PPD file for your printer: ✤ http://www.openprinting.org/drivers ✤ Put the PPD file in: ✤ /usr/share/cups/model ✤ Add the printer with this PPD file: 12
  • 41. Setup Printer with PPD ✤ Find the PPD file for your printer: ✤ http://www.openprinting.org/drivers ✤ Put the PPD file in: ✤ /usr/share/cups/model ✤ Add the printer with this PPD file: ✤ $ lpadmin -E -p <NAME> -v lpd://<IP>/lp -m <DRIVER> -E 12
  • 42. Setup Printer with PPD ✤ Find the PPD file for your printer: ✤ http://www.openprinting.org/drivers ✤ Put the PPD file in: ✤ /usr/share/cups/model ✤ Add the printer with this PPD file: ✤ $ lpadmin -E -p <NAME> -v lpd://<IP>/lp -m <DRIVER> -E ✤ $ lpadmin -E -p 'hp-p1006' -v lpd://192.168.2.100/lp -m 12
  • 44. More about lpadmin ✤ Enable a printer: 13
  • 45. More about lpadmin ✤ Enable a printer: ✤ $ lpadmin -p <NAME> -E 13
  • 46. More about lpadmin ✤ Enable a printer: ✤ $ lpadmin -p <NAME> -E ✤ Set a printer as default: 13
  • 47. More about lpadmin ✤ Enable a printer: ✤ $ lpadmin -p <NAME> -E ✤ Set a printer as default: ✤ $ lpadmin -d <NAME> 13
  • 48. More about lpadmin ✤ Enable a printer: ✤ $ lpadmin -p <NAME> -E ✤ Set a printer as default: ✤ $ lpadmin -d <NAME> ✤ Remove a printer: 13
  • 49. More about lpadmin ✤ Enable a printer: ✤ $ lpadmin -p <NAME> -E ✤ Set a printer as default: ✤ $ lpadmin -d <NAME> ✤ Remove a printer: ✤ $ lpadmin -x <NAME> 13
  • 50. Check Printer is Online 14
  • 51. Check Printer is Online ✤ Just print a test file: 14
  • 52. Check Printer is Online ✤ Just print a test file: ✤ $ lpr -P <NAME> <FILE> 14
  • 53. Check Printer is Online ✤ Just print a test file: ✤ $ lpr -P <NAME> <FILE> ✤ Check the status of printer: 14
  • 54. Check Printer is Online ✤ Just print a test file: ✤ $ lpr -P <NAME> <FILE> ✤ Check the status of printer: ✤ $ lpstat -a / $ lpstat -t 14
  • 55. Check Printer is Online ✤ Just print a test file: ✤ $ lpr -P <NAME> <FILE> ✤ Check the status of printer: ✤ $ lpstat -a / $ lpstat -t ✤ Troubleshooting: 14
  • 56. Check Printer is Online ✤ Just print a test file: ✤ $ lpr -P <NAME> <FILE> ✤ Check the status of printer: ✤ $ lpstat -a / $ lpstat -t ✤ Troubleshooting: ✤ $ nc -v <IP> <PORT> 14
  • 57. Check Printer is Online ✤ Just print a test file: ✤ $ lpr -P <NAME> <FILE> ✤ Check the status of printer: ✤ $ lpstat -a / $ lpstat -t ✤ Troubleshooting: ✤ $ nc -v <IP> <PORT> ✤ $ nmap <IP> -p <PORT_RANGE> 14
  • 60. The Packages ✤ Use wkhtmltopdf to convert Web to PDF. 16
  • 61. The Packages ✤ Use wkhtmltopdf to convert Web to PDF. ✤ $ sudo apt-get install wkhtmltopdf 16
  • 62. The Packages ✤ Use wkhtmltopdf to convert Web to PDF. ✤ $ sudo apt-get install wkhtmltopdf ✤ https://code.google.com/p/wkhtmltopdf/ 16
  • 63. The Packages ✤ Use wkhtmltopdf to convert Web to PDF. ✤ $ sudo apt-get install wkhtmltopdf ✤ https://code.google.com/p/wkhtmltopdf/ ✤ If you don't have X Window, you also need xvfb. 16
  • 64. The Packages ✤ Use wkhtmltopdf to convert Web to PDF. ✤ $ sudo apt-get install wkhtmltopdf ✤ https://code.google.com/p/wkhtmltopdf/ ✤ If you don't have X Window, you also need xvfb. ✤ $ sudo apt-get install xvfb 16
  • 66. The Usage ✤ with X Window: 17
  • 67. The Usage ✤ with X Window: ✤ $ wkhtmltopdf <HTML> <PDF> 17
  • 68. The Usage ✤ with X Window: ✤ $ wkhtmltopdf <HTML> <PDF> ✤ $ wkhtmltopdf -T 0 -L 0 -R 0 -B 0 --page-size A4 -- encoding utf-8 <HTML> <PDF> 17
  • 69. The Usage ✤ with X Window: ✤ $ wkhtmltopdf <HTML> <PDF> ✤ $ wkhtmltopdf -T 0 -L 0 -R 0 -B 0 --page-size A4 -- encoding utf-8 <HTML> <PDF> ✤ without X window: 17
  • 70. The Usage ✤ with X Window: ✤ $ wkhtmltopdf <HTML> <PDF> ✤ $ wkhtmltopdf -T 0 -L 0 -R 0 -B 0 --page-size A4 -- encoding utf-8 <HTML> <PDF> ✤ without X window: ✤ $ xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf -T 0 -L 0 -R 0 -B 0 --page-size A4 --encoding utf-8 <HTML> <PDF> 17
  • 71. Send File to Printer 18
  • 72. Send File to Printer ✤ Print file: 18
  • 73. Send File to Printer ✤ Print file: ✤ $ lpr -P <NAME> <FILE>... 18
  • 74. Send File to Printer ✤ Print file: ✤ $ lpr -P <NAME> <FILE>... ✤ Show printer queue: 18
  • 75. Send File to Printer ✤ Print file: ✤ $ lpr -P <NAME> <FILE>... ✤ Show printer queue: ✤ $ lpq -P <NAME> 18
  • 76. Send File to Printer ✤ Print file: ✤ $ lpr -P <NAME> <FILE>... ✤ Show printer queue: ✤ $ lpq -P <NAME> ✤ $ lpq -a 18
  • 77. Send File to Printer ✤ Print file: ✤ $ lpr -P <NAME> <FILE>... ✤ Show printer queue: ✤ $ lpq -P <NAME> ✤ $ lpq -a ✤ Cancel print job: 18
  • 78. Send File to Printer ✤ Print file: ✤ $ lpr -P <NAME> <FILE>... ✤ Show printer queue: ✤ $ lpq -P <NAME> ✤ $ lpq -a ✤ Cancel print job: ✤ $ lprm -P <NAME> <JOB_ID>... 18
  • 83. PyCUPS ✤ PyPI ✤ https://pypi.python.org/pypi/pycups ✤ Get connection: ✤ import cups conn = cups.Connection() 19
  • 84. PyCUPS - Get Printers 20
  • 85. PyCUPS - Get Printers ✤ Get printers: 20
  • 86. PyCUPS - Get Printers ✤ Get printers: ✤ conn.getPrinters() 20
  • 87. PyCUPS - Get Printers ✤ Get printers: ✤ conn.getPrinters() ✤ Example output: 20
  • 88. PyCUPS - Get Printers ✤ Get printers: ✤ conn.getPrinters() ✤ Example output: ✤ {u'hp': {'device-uri': u'lpd://192.168.0.100/lp', 'printer-info': u'hp', # 3: prepared to print; 4: printing; 5: this device is stop 'printer-state': 3, 'printer-state-message': u'Data file sent successfully', 'printer-state-reasons': [u'none'], ... 'printer-uri-supported': u'ipp://localhost:631/printers/hp'}} 20
  • 89. PyCUPS - Print File 21
  • 90. PyCUPS - Print File ✤ Print file: 21
  • 91. PyCUPS - Print File ✤ Print file: ✤ conn.printFile(printer, filename, title, options) conn.printFiles(printer, filenames, title, options) 21
  • 92. PyCUPS - Print File ✤ Print file: ✤ conn.printFile(printer, filename, title, options) conn.printFiles(printer, filenames, title, options) ✤ Example: 21
  • 93. PyCUPS - Print File ✤ Print file: ✤ conn.printFile(printer, filename, title, options) conn.printFiles(printer, filenames, title, options) ✤ Example: ✤ conn.printFile(printer, filepath, os.path.basename(filepath), {}) 21
  • 94. PyCUPS - Get Jobs 22
  • 95. PyCUPS - Get Jobs ✤ Get jobs: 22
  • 96. PyCUPS - Get Jobs ✤ Get jobs: ✤ conn.getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1, requested_attributes=None) 22
  • 97. PyCUPS - Get Jobs ✤ Get jobs: ✤ conn.getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1, requested_attributes=None) ✤ The which_jobs can be 'not-completed', 'completed' or 'all'. 22
  • 98. PyCUPS - Get Jobs ✤ Get jobs: ✤ conn.getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1, requested_attributes=None) ✤ The which_jobs can be 'not-completed', 'completed' or 'all'. ✤ It returns a dict, indexed by job id, of dicts representing job attributes. 22
  • 101. The Error Log ✤ $ sudo tail -f /var/log/cups/error_log 24
  • 103. AboutTemplate (CSS) ✤ Use cm/mm as your unit ... 25
  • 104. AboutTemplate (CSS) ✤ Use cm/mm as your unit ... ✤ The steps of adjusting output: 25
  • 105. AboutTemplate (CSS) ✤ Use cm/mm as your unit ... ✤ The steps of adjusting output: ✤ Create 1x1 cm div block. 25
  • 106. AboutTemplate (CSS) ✤ Use cm/mm as your unit ... ✤ The steps of adjusting output: ✤ Create 1x1 cm div block. ✤ Print it. 25
  • 107. AboutTemplate (CSS) ✤ Use cm/mm as your unit ... ✤ The steps of adjusting output: ✤ Create 1x1 cm div block. ✤ Print it. ✤ Use zoom to adjust. 25
  • 108. AboutTemplate (CSS) ✤ Use cm/mm as your unit ... ✤ The steps of adjusting output: ✤ Create 1x1 cm div block. ✤ Print it. ✤ Use zoom to adjust. ✤ Avoid floating structure. 25
  • 112. 29
  • 113. 29
  • 117. The End ✤ CUPS ✤ lpadmin, lpstat, lpr, lpq, lprm, ... 31
  • 118. The End ✤ CUPS ✤ lpadmin, lpstat, lpr, lpq, lprm, ... ✤ wxhtmltopdf 31
  • 119. The End ✤ CUPS ✤ lpadmin, lpstat, lpr, lpq, lprm, ... ✤ wxhtmltopdf ✤ PyCUPS 31
  • 120. The End ✤ CUPS ✤ lpadmin, lpstat, lpr, lpq, lprm, ... ✤ wxhtmltopdf ✤ PyCUPS ✤ Some tips 31
  • 121. The End ✤ CUPS ✤ lpadmin, lpstat, lpr, lpq, lprm, ... ✤ wxhtmltopdf ✤ PyCUPS ✤ Some tips ✤ Any Question? 31