@@ -18,17 +18,116 @@ + (NSDictionary*)getOptions
18
18
{
19
19
20
20
return @{
21
+
22
+ JSCIsDocumentLoaded: @{
23
+ @" description" : @" Is there a page loaded in the document feeder?" ,
24
+ },
25
+ JSCIsDuplexScanningEnabled: @{
26
+ @" description" : @" Is double-sided scanning (duplex) enabled?" ,
27
+ @" see" : JSCSupportsDuplexScanning
28
+ },
29
+ JSCIsReverseFeederPageOrder: @{
30
+ @" description" : @" Does the document feeder support reading pages from back to front?" ,
31
+ },
32
+ JSCSupportsDuplexScanning: @{
33
+ @" description" : @" Does this device support double-sided scanning?" ,
34
+ @" see" : JSCIsDuplexScanningEnabled
35
+ },
36
+ JSCCanPerformOverviewScan: @{
37
+ @" description" : @" Can perform an overview scan (a quick scan for displaying a preview image)." ,
38
+ @" see" : JSCOverviewResolution
39
+ },
40
+ JSCOverviewResolution: @{
41
+ @" description" : @" Resolution in DPI for overview scans." ,
42
+ @" see" : JSCCanPerformOverviewScan
43
+ },
44
+ JSCMeasurementUnit: @{
45
+ @" description" : @" The measurement unit (type of measurement) used for measurements." ,
46
+ @" see" : JSCSupportedMeasurementUnits
47
+ },
48
+ JSCSupportedMeasurementUnits: @{
49
+ @" setter" : JSCMeasurementUnit,
50
+ @" description" : @" A list of supported measurement units for this device." ,
51
+ },
52
+ JSCResolution: @{
53
+ @" description" : @" The resolution for scanning (in DPI)." ,
54
+ @" see" : JSCPreferredResolutions
55
+ },
56
+ JSCPreferredResolutions: @{
57
+ @" setter" : JSCResolution,
58
+ @" description" : @" A list of resolutions that the device prefers for scanning." ,
59
+ },
60
+ JSCNativeXResolution: @{
61
+ @" description" : @" The native resolution of the scanner across the x axis." ,
62
+ @" see" : JSCNativeYResolution
63
+ },
64
+ JSCNativeYResolution: @{
65
+ @" description" : @" The native resolution of the scanner across the y axis." ,
66
+ @" see" : JSCNativeXResolution
67
+ },
68
+ JSCScanArea: @{
69
+ @" description" : @" The area to be scanned." ,
70
+ },
71
+ JSCScanAreaOrientation: @{
72
+ @" description" : @" Page orientation for the scan."
73
+ },
74
+ JSCEvenPageOrientation: @{
75
+ @" description" : @" Page orientation for the scan for for even pages." ,
76
+ },
77
+ JSCOddPageOrientation: @{
78
+ @" description" : @" Page orientation for the scan for for odd pages." ,
79
+ },
80
+ JSCDocumentType: @{
81
+ @" description" : @" The document type to be scanned." ,
82
+ @" see" : JSCSupportedDocumentTypes
83
+ },
84
+ JSCSupportedDocumentTypes: @{
85
+ @" setter" : JSCDocumentType,
86
+ @" description" : @" A list of supported document types that can be scanned."
87
+ },
88
+ JSCDocumentSize: @{
89
+ @" description" : @" The size of the document to be scanned."
90
+ },
91
+ JSCScaleFactor: @{
92
+ @" description" : @" The scale (in percent) that the image is to be scanned at." ,
93
+ @" see" : JSCPreferredScaleFactors
94
+ },
95
+ JSCPreferredScaleFactors: @{
96
+ @" setter" : JSCScaleFactor,
97
+ @" description" : @" A list of preferred scale factors for the device."
98
+ },
99
+ JSCBitDepth: @{
100
+ @" description" : @" The bit depth to scan at." ,
101
+ @" see" : JSCSupportedBitDepths
102
+ },
103
+ JSCSupportedBitDepths: @{
104
+ @" setter" : JSCBitDepth,
105
+ @" description" : @" A list of supported bit depths the device is capable of." ,
106
+ },
107
+ JSCPixelDataType: @{
108
+ @" description" : @" Pixel data type for the scan." ,
109
+ @" see" : JSCSupportedPixelDataTypes
110
+ },
111
+ JSCSupportedPixelDataTypes: @{
112
+ @" setter" : JSCPixelDataType,
113
+ @" description" : @" A list of supported pixel data types for the device."
114
+ },
21
115
JSCOptionCanUseBlackWhiteThreshold: @{
22
- @" setter" : JSCOptionUseBlackWhiteThreshold ,
116
+ @" setter" : JSCOptionThresholdForBlackAndWhiteScanning ,
23
117
@" description" : @" Convert images to black & white using a threshold value." ,
24
118
@" see" : JSCOptionDefaultBlackWhiteThreshold
25
- },
119
+ },
26
120
JSCOptionDefaultBlackWhiteThreshold: @{
27
121
@" setter" : JSCOptionThresholdForBlackAndWhiteScanning,
28
- @" description" : @" A range from 0 to 255 for the black and white scanning conversion threshold." ,
122
+ @" description" : @" A default value for the black and white scanning conversion threshold." ,
29
123
@" see" : JSCOptionCanUseBlackWhiteThreshold
30
- }
31
- };
124
+ },
125
+ JSCOptionThresholdForBlackAndWhiteScanning: @{
126
+ @" description" : @" A value between 0 and 255 for the black and white scanning conversion threshold." ,
127
+ @" see" : JSCOptionCanUseBlackWhiteThreshold
128
+ }
129
+
130
+ };
32
131
33
132
}
34
133
@@ -388,6 +487,12 @@ - (MutableOrderedDictionary*)getScannerOptions:(ICScannerFunctionalUnit*)functio
388
487
389
488
ICScannerPixelDataType pixelDataType = functionalUnit.pixelDataType ;
390
489
[readwrite setObject: [self getPixelDataTypeOptions: pixelDataType] forKey: JSCPixelDataType];
490
+
491
+ MutableOrderedDictionary * supportedPixelDataTypes = [[MutableOrderedDictionary alloc ] init ];
492
+ for (int i = 0 ; i <= 8 ; i++) {
493
+ [supportedPixelDataTypes addEntriesFromDictionary: [self getPixelDataTypeOptions: i]];
494
+ };
495
+ [readonly setObject: supportedPixelDataTypes forKey: JSCSupportedPixelDataTypes];
391
496
392
497
[readwrite setObject: [NSString stringWithFormat: @" %@ " , @(functionalUnit.scaleFactor)] forKey: JSCScaleFactor];
393
498
@@ -450,7 +555,7 @@ - (MutableOrderedDictionary*)getScannerOptions:(ICScannerFunctionalUnit*)functio
450
555
[dfu.supportedDocumentTypes enumerateIndexesUsingBlock: ^(NSUInteger idx, BOOL *stop) {
451
556
[supportedDocumentTypes addEntriesFromDictionary: [self getDocumentTypeOptions: idx]];
452
557
}];
453
- [readonly setObject: supportedDocumentTypes forKey: JSCDocumentType ];
558
+ [readonly setObject: supportedDocumentTypes forKey: JSCSupportedDocumentTypes ];
454
559
455
560
ICEXIFOrientationType evenPageOrientation = dfu.evenPageOrientation ;
456
561
[readwrite setObject: [self getOrientationOptions: evenPageOrientation] forKey: JSCEvenPageOrientation];
0 commit comments