copy copy from scanner to pdf or image file(s)
doc generated from the script with gendoc
ruby script, version=2.00

Synopsis

copy [options]

Description

copy, without any options or arguments, scans an image on the first available device, at maximum size, producing a one page PDF, which is then displayed with your favorite pdf viewer. With the --number option, a multi-page pdf document can be produced.

Instead of pdf, you can scan to one or more image files with the --imagetype option. Again, these are saved in the file which you specified with the --outfile=X option, where X is copy by default. If you use the --number option, this file name will be extended with 1 for the first scan, 2 for the second, and so on. With the --start option, numbering can be started with an other number than 1.

Many options are available to influence brightness, contrast, pixel density, color mode, image quality, rotation, page position and size, and more. See the Options section for more information.

Configuration

copy needs one or more scan devices and it needs to know their properties. It reads that information from a configuration file. Copy looks at three places for that file, and uses the first available:
   1. ./copy.conf
   2. ~/.copy.conf
   3. $PREFIX/copy.conf where PREFIX is an environment variable

You need to create this configuration file, using the documentation of your scanners. Or, your system provides the scanimage program, using it with the -L, -A, and --source options. Here is an example, which has two entries, both for the Epson V350 scanner, the first in flatbed mode, the second in transparency mode:

  PDFVIEWER=ENV['PDFVIEWER'] || 'evince'
  IMGVIEWER=ENV['IMGVIEWER'] || 'xv'
  DEVICES = [
    OpenStruct.new(
      :device  => 'epkowa',
      :name    => 'Epson V350 Flatbed',
      :source  => 'Flatbed',
      :Lineart => 'Binary',
      :Gray    => 'Gray',
      :Color   => 'Color',
      :xmax    => 215.9,
      :ymax    => 297.18,
      :xdpi    => [100,200,300,400,600,800,1200,2400,4800],
      :ydpi    => [100,200,300,400,600,800,1200,1600,2400,3600,4800,6600,9600],
      :hasxy   => TRUE,
      :Dup     => FALSE
    ),
    OpenStruct.new(
      :device  => 'epkowa',
      :name    => 'Epson V350 Transparency',
      :source  => 'Transparency',
      :posneg  => ['Positive','Negative'],
      :Lineart => 'Binary',
      :Gray    => 'Gray',
      :Color   => 'Color',
      :xmax    => 36.83,
      :ymax    => 122.17,
      :xdpi    => [300,600,1200,2400,4800],
      :ydpi    => [100,300,400,600,800,1200,1600,2400,3600,4800,6600,9600],
      :hasxy   => TRUE,
      :Dup     => FALSE
    ),
  ]

Options

General options

-h
Print this help and exit
-H, --help
Show full documentation via less and exit
-V, --version
Print version and exit
-v, --verbose
Be verbose

Device options

-1
Set the scan device nr to 1 (or 2..9)
The default is 0 (Epson Perfection V350)
    --list
List all devices

Brightness,Contrast,density options

-b, --brightness=PCT
Set brightness correction to PCT percent (default: 0)
-c, --contrast=PCT
Set contrast correction to PCT percent (default: 0)
-d, --density=INT
Set contrast correction to INT dpi (default: 300)

Color mode options

-C, --color
Color mode (the default)
-G, --gray
Gray instead of Color mode
-L, --lineart
Lineart instead of Color mode

Positioning options

-l, --left=MM
Set left offset to MM mm (default: 0).
-t, --top=MM
Set top offset to MM mm (default: 0).
-x, --x=MM
Set width to MM mm (default: 215.9).
-y, --y=MM
Set height to MM mm (default: 297.18).
-A, --A=n
Set page size to A0..A8
-B, --cd-back
Back of jewelbox.
-F, --cd-front
Front of jewelbox.
-D, --cd-disk
CD-disk.

Output options

-o, --outfile=STR
Set output filename to STR (default: copy).
If not explicitly set, copy.pdf is not saved, but displayed with the application defined in PDFVIEWER. Other image types are always saved.
-i, --imagetype=STR
set image type to STR; default: pdf

Conversion & Interaction options

-s, --start=INT
Starting number for multiple output files (default: 1)
-n, --number=INT
Number of sheets to scan (1 or more, default: 1);
on a duplex scanner, this generates twice as many pages.
-q, --quality=PCT
jpg conversion quality (%,default 75)
-r, --rotate=INT
rotate INT degrees clockwise
-e, --examples
show some examples of use

Author

Wybo Dekker

Copyright

Released under the GNU General Public License