-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwain-direct-metadata.go
70 lines (62 loc) · 1.86 KB
/
twain-direct-metadata.go
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
package twain_direct
type Metadata struct {
Status Status `json:"status"`
Address Address `json:"address"`
Image Image `json:"image"`
Barcodes []Barcode `json:"barcodes"`
Micr Micr `json:"micr"`
PatchCode PatchCode `json:"patchCode"`
Vendors []Vendor `json:"vendors"`
}
type Address struct {
ImageNumber int64 `json:"imageNumber"`
ImagePart int64 `json:"imagePart"`
MoreParts string `json:"moreParts"`
// "lastPartInFile", "lastPartInFileMorePartsPending",
// "morePartsPending"
PixelFormatName string `json:"pixelFormatName"`
SheetNumber int64 `json:"sheetNumber"`
Source string `json:"source"`
// "feederFront", "feederRear", "flatbed",
// "planetary", "storage"
SourceName string `json:"sourceName"`
StreamName string `json:"streamName"`
}
type Barcode struct {
Base64Data string `json:"base64Data"`
PixelOffsetX int64 `json:"pixelOffsetX"`
PixelOffsetY int64 `json:"pixelOffsetY"`
Type string `json:"type"`
}
type Image struct {
Compression string `json:"compression"`
// "group4", "jpeg", "none"
ImageMerged string `json:"imageMerged"`
// "imageMerged", "notMerged"
PixelFormat string `json:"pixelFormat"`
// "bw", "gray8", "gray16", "rgb24", "rgb48"
// other values possible?
PixelHeight int64 `json:"pixelHeight"`
PixelOffsetX int64 `json:"pixelOffsetX"`
PixelOffsetY int64 `json:"pixelOffsetY"`
PixelWidth int64 `json:"PixelWidth"`
Resolution int64 `json:"resolution"`
}
type Micr struct {
Base64Data string `json:"base64Data"`
Type string `json:"type"`
// "invalid", "micr", "raw"
}
type PatchCode struct {
Type string `json:"type"`
}
type Status struct {
Detected string `json:"detected"`
// "coverOpen", "foldedCorner", "imageError",
// "misfeed", "multifeed", "paperJam",
// "staple"
Success bool `json:"success"`
}
type Vendor struct {
Vendor string `json:"vendor"`
}