Simple Scan vs scanimage

When I use Simple Scan to produce a pdf at 75dpi the resulting size is 84kB. When I use scanimage at the same resolution it produces a file size of 555kB.

scanimage -v --format=pdf --mode 'Gray' --resolution 75 -x 215 -y 297  >test1.pdf

What am I doing wrong to cause such a great discrepancy in size? Thanks in advance.

Why do you assume you did something wrong?:slight_smile:

As far as I understand it, you can create a PDF (basicaly a text oriented format) containing a picture in several ways. Also PDFs can be more or less compressed. Did you inspect the resulting documnets visualy? Is ther no difference at all between them?

There is no visual difference between the two. I am questioning the enormous difference in file size and how I can use scanimage to produce a file that is similar in size to that produced by Simple Scan.

As I never used the scanimage tool, I started reading the man page. I can find the --format option but not that it can have the value --format=pdf:

The --format format option selects how image data is written to standard output. format can be pnm or tiff. If --format is not used, PNM is written.

Correct. It seems to accept the option but produces a PGM image. But when I produce a .tiff image and use “convert” to convert it to PDF. it’s still an enormous file.

Different pathes using different in between results and different algorithms. I guess that is what choice means. Choose the way that fits you best.

The PDF specification allows the option of compressing an image using one of several different compression algorithms or none. It is up to the PDF creator; they just have different ways of dealing with images within a PDF.

FWIW, I’ve found from past experience that I can take a large (image-based) PDF and print to file, which then produces a noticeably smaller resulting PDF file, which I might then attach to an email. As the others mentioned already compression makes the difference here.

Many thanks to all of you. My solution has been to scan to .tiff with Scanimage giving me a high definition image, and to convert to .pdf with 75% compression for E-mail attachment. Scanimage offers a multitude of options not available in Simple Scan, one being a faster warm up time. It allows me to use it from inside a BaCon program to control the options.