@@ -94,49 +94,55 @@ Available command line options:
9494```
9595Usage: scan2pdf.sh [OPTIONS] OUTFILE
9696
97- Scan to PDF (scan2pdf) v2.5 (01/23 /24)
97+ Scan to PDF (scan2pdf) v2.6 (02/18 /24)
9898Scan documents directly to PDF files.
9999
100100Options:
101- -d, --device STRING Scanner device ['brother3:net1;dev0']
102- -m, --mode STRING Color mode ['24bit Color']
103- 'Black & White',
104- 'Gray[Error Diffusion]',
105- 'True Gray',
106- '24bit Color',
107- '24bit Color[Fast]'
108- -r, --resolution VALUE Scan resolution in dpi [300]
109- 100, 150, 200, 300, 400, 600, 1200, 2400, 4800, 9600
110- -s, --source STRING Scan source ['Automatic Document Feeder(left aligned)']
111- 'FlatBed',
112- 'Automatic Document Feeder(left aligned)',
113- 'Automatic Document Feeder(left aligned,Duplex)',
114- 'Automatic Document Feeder(centrally aligned)',
115- 'Automatic Document Feeder(centrally aligned,Duplex)'
116-
117- -b, --brightness VALUE Brightness in percent (-50..50) [0]
118- (only applied if supported by color mode)
119- -c, --contrast VALUE Contrast in percent (-50..50) [0]
120- (only applied if supported by color mode)
121-
122- -l, --topleftx VALUE Top left x offset of scan area in mm (0..216) [0]
123- -t, --toplefty VALUE Top left y offset of scan area in mm (0..356) [0]
124- -x, --width VALUE Width of scan area in mm (0..216) [210]
125- -y, --height VALUE Height of scan area in mm (0..356) [297]
126-
127- -u, --manual-duplex Perform manual duplex scan: scan odd pages, prompt,
128- scan even pages, then interleave odd and even pages
129- to produce combined output
130-
131- -a, --batch-scan Scan multiple documents, prompt in between documents
132- (option '-o/--outfile-template' becomes mandatory)
133- -o, --outfile-pattern Interpret OUTFILE argument as printf-style pattern,
134- determine next available output file by incrementing
135- integer component (e.g. '~/Documents/Scan_%05d.pdf')
136-
137- -k, --keep-temp Keep temporary directory on exit
138-
139- -h, --help Print usage information
101+ -d, --device STRING Scanner device ['brother3:net1;dev0']
102+ -m, --mode STRING Color mode ['24bit Color']
103+ 'Black & White',
104+ 'Gray[Error Diffusion]',
105+ 'True Gray',
106+ '24bit Color',
107+ '24bit Color[Fast]'
108+ -r, --resolution VALUE Scan resolution in dpi [300]
109+ 100, 150, 200, 300, 400, 600, 1200, 2400, 4800, 9600
110+ -s, --source STRING Scan source ['Automatic Document Feeder(left aligned)']
111+ 'FlatBed',
112+ 'Automatic Document Feeder(left aligned)',
113+ 'Automatic Document Feeder(left aligned,Duplex)',
114+ 'Automatic Document Feeder(centrally aligned)',
115+ 'Automatic Document Feeder(centrally aligned,Duplex)'
116+
117+ -b, --brightness VALUE Brightness in percent (-50..50) [0]
118+ (only applied if supported by color mode)
119+ -c, --contrast VALUE Contrast in percent (-50..50) [0]
120+ (only applied if supported by color mode)
121+
122+ -x, --topleftx VALUE Top left x offset of scan area in mm (0..216) [0]
123+ -y, --toplefty VALUE Top left y offset of scan area in mm (0..356) [0]
124+ -w, --width VALUE Width of scan area in mm (0..216) [210]
125+ -e, --height VALUE Height of scan area in mm (0..356) [297]
126+
127+ -u, --manual-duplex Scan odd pages, prompt, scan even pages, interleave
128+ odd and even pages to produce combined output [no]
129+
130+ -a, --batch-mode Scan multiple documents, prompt in between documents
131+ (makes option '-p/--outfile-pattern' mandatory) [no]
132+ -p, --outfile-pattern Interpret OUTFILE argument as printf-style pattern,
133+ determine next output file by incrementing integer
134+ token (e.g. '~/Documents/Scan_%05d.pdf') [no]
135+
136+ -i, --initial-prompt Prompt before first scan operation (e.g. before odd
137+ pages for manual duplex or before first document in
138+ batch mode) [no]
139+ -t, --prompt-timeout VALUE Timeout for prompts in seconds (0 == no timeout) [0]
140+ Allows duplex- and/or batch-scanning without having
141+ to press ENTER to continue when being prompted
142+
143+ -k, --keep-temp Keep temporary directory on exit [no]
144+
145+ -h, --help Print usage information
140146
141147NOTE:
142148Strings/values in square brackets show current defaults.
@@ -154,7 +160,7 @@ Configuration options and current defaults:
154160# Scan to PDF (scan2pdf) -
155161# -
156162# Created by Fonic <https://github.com/fonic> -
157- # Date: 04/17/21 - 01/23 /24 -
163+ # Date: 04/17/21 - 02/18 /24 -
158164# -
159165# ------------------------------------------------------------------------------
160166
@@ -231,6 +237,7 @@ HEIGHT_DEFAULT=279 # Letter (279.4 mm /
231237
232238# Options passed to 'scanimage' (array of strings)
233239# SCANIMAGE_OPTS=("--progress" "--verbose") # Display scan progress, produce verbose output
240+ # SCANIMAGE_OPTS=("--progress" "--batch-prompt") # Display scan progress, prompt before each page
234241SCANIMAGE_OPTS=(" --progress" ) # Display scan progress
235242
236243# Options passed to 'convert' (array of strings)
@@ -247,8 +254,36 @@ TIFFCP_OPTS=("-c" "lzw") # Use LZW compressio
247254# NOTE: only used if 'convert' is not available
248255# TIFF2PDF_OPTS=("-z") # Use ZIP compression (lossless, higher quality, larger PDF file)
249256TIFF2PDF_OPTS=(" -j" " -q" " 95" ) # Use JPEG compression (quality 95) (lossy, lower quality, smaller PDF file)
257+
258+ # Manual duplex scan by default: scan odd pages, prompt, scan even
259+ # pages, interleave odd and even pages to produce combined output
260+ # (string, 'yes'/'no')
261+ MANUAL_DUPLEX_DEFAULT=" no"
262+
263+ # Batch mode by default: scan multiple documents, prompt in between
264+ # documents (string, 'yes'/'no')
265+ BATCH_MODE_DEFAULT=" no"
266+
267+ # Interpret OUTFILE command line argument as printf-style pattern by
268+ # default and determine next output file automatically by incrementing
269+ # integer token of pattern (string, 'yes'/'no')
270+ # Example:
271+ # Pattern '~/Documents/Scan_%05d.pdf' -> '~/Documents/Scan_00001.pdf',
272+ # '~/Documents/Scan_00002.pdf', '~/Documents/Scan_00003.pdf', ...
273+ OUTFILE_PATTERN_DEFAULT=" no"
274+
275+ # Prompt before first scan operation by default (e.g. before odd pages
276+ # for manual duplex or before first document in batch mode) (string,
277+ # 'yes'/'no')
278+ INITIAL_PROMPT_DEFAULT=" no"
279+
280+ # Default timeout for prompts (integer, in seconds; 0 == no timeout)
281+ PROMPT_TIMEOUT_DEFAULT=0
282+
283+ # Keep temporary directory on exit by default (string, 'yes'/'no')
284+ KEEP_TEMP_DEFAULT=" no"
250285```
251286
252287##
253288
254- _ Last updated: 01/23 /24_
289+ _ Last updated: 02/18 /24_
0 commit comments