File: notes

package info (click to toggle)
pct-scanner-scripts 0.0.4-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 280 kB
  • sloc: sh: 581; makefile: 24
file content (133 lines) | stat: -rw-r--r-- 6,071 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
sudo apt-get install sane
http://www.avision.de/index.php?content=AV8350
http://www.kirchgessner.net/sane.html
sudo geany /etc/sane.d/hp.conf
option dumb-read

lsusb
Bus 004 Device 007: ID 03f0:0601 Hewlett-Packard ScanJet 6300c

man sane-hp
man sane-usb

scanadf --help
scanadf --help -d hp:libusb:001:003



scanadf --list-devices

--verbose --output-file ~/scanjet-output

usb 0x03f0 0x0601

--device-name

cat /etc/sane.d/hp.conf
# HP ScanJet 63X0C
usb 0x03f0 0x0601

--scantype=ADF


--device-name hp

scanadf --verbose --device-name hp --source adf --resolution 600 --mode color -x 209.99mm -y 296.888mm --output-file image-%04d.
scanadf --verbose --device-name hp --source adf --resolution 600 --mode grayscale -x 209.99mm -y 296.888mm --output-file image-%04d.
scanadf --verbose --device-name hp --source adf --resolution 300 --mode grayscale -x 209.99mm -y 296.888mm --output-file image-%04d.
scanadf --verbose --device-name hp --source adf --resolution 600 --mode lineart -x 210mm -y 297mm --output-file image-%04d.pbm

scanadf --verbose --device-name hp --no-overwrite --scan-script ~/scanjet/scanjet-scanscript.sh --output-file ~/scanjet/image-0003.pbm --source adf --resolution 600 --mode lineart -x 210.000mm -y 297.000mm


scanadf --verbose --device-name hp --source adf --speed fast --mode halftone


cjb2 -verbose -clean image-%04d.pbm document-%04d.djvu


sudo apt-get install gscan2pdf

scanimage --help

scanimage --verbose --progress --device-name hp --batch --mode gray --format pnm -x 210 -y 297

-- -- -- -- --
sudo apt-get install djvulibre-bin djvulibre-plugin
convert image-0001.pbm document.djvu
convert: unable to open module file `/usr/lib/ImageMagick-6.2.4/modules-Q16/coders/djvu.la': No such file or directory.

tested: is broken - 05-01-2008 - Jelle de Jong
-- -- -- -- --


-- -- -- -- --
# converting scanned pbm image to djvu document
cjb2 -verbose -clean -dpi 300 ~/scanjet/image-0002.pbm ~/scanjet/document-0002.djvu

# extract scanned pbm image back out of the djvu document
ddjvu -verbose -format=pbm ~/scanjet/document-0002.djvu ~/scanjet/image-ddjvu-0002.pbm

tested: working perfect - 05-01-2008 - Jelle de Jong
-- -- -- -- --

-- -- -- -- --
lpoptions -p "HP_PSC_2110" -l
lpoptions -p "HP_PSC_2110" -o PageSize=A4 -o PrintoutMode=High.Gray -o InputSlot=Default  -o Duplex=None -o Quality=600GrayscaleCMYK
lpr -P "HP_PSC_2110" -#1 -o Collate=True -o media=A4 -o outputorder=normal -o sides=one-sided -o scaling=100 -o saturation=0 ~/scanjet/image-0001.pbm
lpr -P "HP_PSC_2110" -#1 -o Collate=True -o media=A4 -o outputorder=normal -o sides=one-sided -o scaling=100 -o saturation=0 -o page-left=0 -o page-right=0 -o page-top=0 -o page-bottom=0 ~/scanjet/image-0001.pbm

tested: printing pbm images is borking, created bug report for cups - 06-01-2008 - Jelle de Jong
bug report: http://www.cups.org/str.php?L2653
-- -- -- -- --

-- -- -- -- --
# prepairing the source image for printing: bug report: http://www.cups.org/str.php?L2653
convert ~/scanjet/image-0001.pbm ~/scanjet/image-0001.png
identify ~/scanjet/image-0001.png

# set the printer settings and the print the image with the cups commands, this is without setting the page margings
lpoptions -p "HP_PSC_2110" -o PageSize=A4 -o PrintoutMode=High.Gray -o InputSlot=Default  -o Duplex=None -o Quality=600GrayscaleCMYK
lpr -P "HP_PSC_2110" -#1 -o Collate=True -o media=A4 -o outputorder=normal -o sides=one-sided -o scaling=100 -o saturation=0 ~/scanjet/image-0001.png
tested: this will result in a printout that is not 1:1 with the source image because the margins of the printer configuration - 06-01-2008 - Jelle de Jong

# set the printer settings and the print command, this is with the page margins set
lpoptions -p "HP_PSC_2110" -o PageSize=A4 -o PrintoutMode=High.Gray -o InputSlot=Default  -o Duplex=None -o Quality=600GrayscaleCMYK
lpr -P "HP_PSC_2110" -#1 -o Collate=True -o media=A4 -o outputorder=normal -o sides=one-sided -o scaling=100 -o saturation=0 -o page-left=0 -o page-right=0 -o page-top=0 -o page-bottom=0 ~/scanjet/image-0001.png
tested: this will result in a good match with the source image, unlike what the documentation explains about the print margins these options also works with images. - 06-01-2008 - Jelle de Jong
documentation: http://www.cups.org/documentation.php/options.html
-- -- -- -- --

-- -- -- -- --
scanadf --verbose --device-name hp --no-overwrite --scan-script ~/scanjet/scanjet-scanscript.sh --output-file ~/scanjet/image-0003.pbm --source adf --resolution 600 --mode lineart -x 210.000mm -y 297.000mm
cjb2 -verbose -clean -dpi 600 ~/scanjet/image-0003.pbm ~/scanjet/document-0003.djvu
djvups -verbose -format=ps -copies=1 -orientation=auto -color=no ~/scanjet/document-0003.djvu ~/scanjet/document-0003.ps

210mm x 297mm
(21.0/2.54) x 600 = 4960.629 = 4960
(29.7/2.54) x 600 = 7015.758 = 7015
convert -crop 4960x7015 ~/scanjet/image-0003.pbm  ~/scanjet/image-convert-0003.pbm
cjb2 -verbose -clean -dpi 600 ~/scanjet/image-convert-0003.pbm ~/scanjet/document-convert-0003.djvu
djvups -verbose -format=ps -level=3 -orientation=portrait -color=no -zoom=100 ~/scanjet/document-multi-page.djvu ~/scanjet/document-multi-page.ps

%%Pages: 6
%%BoundingBox: 0 0 595 842
<</PageSize[595 842]/ImagingBBox null>>setpagedevice
http://opencircuitdesign.com/xcircuit/
lpoptions -p "Generic_PCL_6_Printer" -l
lpr -P "Generic_PCL_6_Printer" -#1 -o Collate=True -o media=A4 -o page-ranges=1 -o outputorder=normal -o sides=one-sided ~/scanjet/document-multi-page.ps

-- -- -- -- --

-- -- -- -- --
identify -verbose image-0001.pbm 
image-0001.pbm PNM 4962x7018 PseudoClass 2c 4.2mb 2.890u 0:04  
-- -- -- -- --

D [06/Jan/2008:20:24:40 +0000] [Job 175] Copying page 1...
D [06/Jan/2008:20:24:40 +0000] [Job 175] pagew = 559.0, pagel = 813.2
D [06/Jan/2008:20:24:40 +0000] [Job 175] bboxw = 595, bboxl = 842
D [06/Jan/2008:20:24:40 +0000] [Job 175] PageLeft = 18.0, PageRight = 577.0
D [06/Jan/2008:20:24:40 +0000] [Job 175] PageTop = 827.6, PageBottom = 14.4
D [06/Jan/2008:20:24:40 +0000] [Job 175] PageWidth = 595.0, PageLength = 842.0