Scan document pages to a compressed PDF

E

Ed Suominen

I'd like to write a Python-based commandline tool that will scan pages with
SANE, applying CCITT Group 4 compression during scanning, and produce a
single PDF file. I would release it under GPL. Right now, I'm relying on a
workable but inflexible shell script that pipes stuff between scanimage,
tiffcp, tiff2ps, and ps2pdf.

What's the best way currently to do CCITT4 compression (e.g., of
intermediate TIFF-format images) from Python? PIL doesn't seem to support
CCITT4 compression, and the read-only patch [1] that's available won't help
in my case. I'd like to incorporate as much as possible into the Python
code and imported packages, rather than relying on pipes to a bunch of
external programs.

Same question regarding SANE -- I can't seem to find the supposed PIL
support for SANE in the release on my system. Anyone know about that, or
alternatives?

---
Ed Suominen
Registered Patent Agent
Open-Source Software Author (yes, both...)
Web Site: http://www.eepatents.com

[1] http://mail.python.org/pipermail/image-sig/2003-July/002354.html
 
P

Paul Rubin

Ed Suominen said:
What's the best way currently to do CCITT4 compression (e.g., of
intermediate TIFF-format images) from Python? PIL doesn't seem to support
CCITT4 compression, and the read-only patch [1] that's available won't help
in my case. I'd like to incorporate as much as possible into the Python
code and imported packages, rather than relying on pipes to a bunch of
external programs.


I ended up doing about the same thing as you, generating shell scripts
to run existing command line stuff.

This might also be of some interest: http://tumble.brouhaha.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top