Barcode Generator Builder
Defined in package com.scandit.datacapture.barcode.generator
- BarcodeGeneratorBuilder
class BarcodeGeneratorBuilder<BuilderType>
Added in version 6.21.0
- withBackgroundColor(backgroundColor)
fun withBackgroundColor(backgroundColor:
Int):BuilderTypeAdded in version 6.21.0
Sets the background color for the generated codes. Default is Color.WHITE.
- withForegroundColor(foregroundColor)
fun withForegroundColor(foregroundColor:
Int):BuilderTypeAdded in version 6.21.0
Sets the foreground color for the generated codes. Default is Color.BLACK.
- build()
fun build(): BarcodeGenerator
Added in version 6.21.0
Constructs a BarcodeGenerator with the properties set on the builder.
- Code39BarcodeGeneratorBuilder
class Code39BarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.21.0
- Code128BarcodeGeneratorBuilder
class Code128BarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.21.0
- InterleavedTwoOfFiveBarcodeGeneratorBuilder
class InterleavedTwoOfFiveBarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.21.0
- Ean13BarcodeGeneratorBuilder
class Ean13BarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.21.0
- UpcaBarcodeGeneratorBuilder
class UpcaBarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.22.0
- DataMatrixBarcodeGeneratorBuilder
class DataMatrixBarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.21.0
- QrCodeBarcodeGeneratorBuilder
class QrCodeBarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.21.0
- withErrorCorrectionLevel(errorCorrectionLevel)
fun withErrorCorrectionLevel(errorCorrectionLevel: QrCodeErrorCorrectionLevel): QrCodeBarcodeGeneratorBuilder
Added in version 6.21.0
Configure how much error correction to use in the generated code.
- withVersionNumber(versionNumber)
fun withVersionNumber(versionNumber:
Int): QrCodeBarcodeGeneratorBuilderAdded in version 6.21.0
The version number for the QR code. Version number determines the size of the QR code, with a larger size allowing more data to be stored. The value must be greater than 0, and if the value is too small for the data being encoded, code generation will fail.
Maximum number of encodable characters (abbreviated) |
||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Version |
Numeric |
Alphanumeric |
8-bit Binary |
Kanji |
||||||||||||
Low |
Med. |
Quart. |
High |
Low |
Med. |
Quart. |
High |
Low |
Med. |
Quart. |
High |
Low |
Med. |
Quart. |
High |
|
1 |
41 |
34 |
27 |
17 |
25 |
20 |
16 |
10 |
17 |
14 |
11 |
7 |
10 |
8 |
7 |
4 |
2 |
77 |
63 |
48 |
34 |
47 |
38 |
29 |
20 |
32 |
26 |
20 |
14 |
20 |
16 |
12 |
8 |
3 |
127 |
101 |
77 |
58 |
77 |
61 |
47 |
35 |
53 |
42 |
32 |
24 |
32 |
26 |
20 |
15 |
4 |
187 |
149 |
111 |
82 |
114 |
90 |
67 |
50 |
78 |
62 |
46 |
34 |
48 |
38 |
28 |
21 |
5 |
255 |
202 |
144 |
106 |
154 |
122 |
87 |
64 |
106 |
84 |
60 |
44 |
65 |
52 |
37 |
27 |
10 |
652 |
513 |
364 |
288 |
395 |
311 |
221 |
174 |
271 |
213 |
151 |
119 |
167 |
131 |
93 |
74 |
15 |
1250 |
991 |
703 |
530 |
758 |
600 |
426 |
321 |
520 |
412 |
292 |
220 |
320 |
254 |
180 |
136 |
20 |
2061 |
1600 |
1159 |
919 |
1249 |
970 |
702 |
557 |
858 |
666 |
482 |
382 |
528 |
410 |
297 |
235 |
25 |
3057 |
2395 |
1718 |
1286 |
1853 |
1451 |
1041 |
779 |
1273 |
997 |
715 |
535 |
784 |
614 |
440 |
330 |
30 |
4158 |
3289 |
2358 |
1782 |
2520 |
1994 |
1429 |
1080 |
1732 |
1370 |
982 |
742 |
1066 |
843 |
604 |
457 |
35 |
5529 |
4343 |
3081 |
2361 |
3351 |
2632 |
1867 |
1431 |
2303 |
1809 |
1283 |
983 |
1417 |
1113 |
790 |
605 |
40 |
7089 |
5596 |
3993 |
3057 |
4296 |
3391 |
2420 |
1852 |
2953 |
2331 |
1663 |
1273 |
1817 |
1435 |
1024 |
784 |
- AztecBarcodeGeneratorBuilder
class AztecBarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 6.28.0
- withMinimumErrorCorrectionPercent(minimumErrorCorrectionPercent)
fun withMinimumErrorCorrectionPercent(minimumErrorCorrectionPercent: Int?): AztecBarcodeGeneratorBuilder
Added in version 6.28.0
Optional parameter to configure how much error correction to use in the generated code. The value must be greater than 0.
- withLayers(layers)
fun withLayers(layers: Int?): AztecBarcodeGeneratorBuilder
Added in version 6.28.0
Optional parameter to configure how many layers, each one containing two rings of pixels, to use in the generated code. The value must be between -4 and 32. Negative values create compact codes.
- Pdf417BarcodeGeneratorBuilder
class Pdf417BarcodeGeneratorBuilder : BarcodeGeneratorBuilder
Added in version 8.3.0
- withErrorCorrectionLevel(errorCorrectionLevel)
fun withErrorCorrectionLevel(errorCorrectionLevel:
Int): Pdf417BarcodeGeneratorBuilderAdded in version 8.3.0
Sets the error correction level for PDF417 barcode generation. Valid values are 0 to 8, where a higher number increases the error correction data in the code. Default is 2.
- withCompact(compact)
fun withCompact(compact:
Boolean): Pdf417BarcodeGeneratorBuilderAdded in version 8.3.0
Switches between normal and compact code layout. When set to true, a compact PDF417 code is generated, which reduces the size but may decrease scanning reliability. Default is false.
- withCompactionMode(compactionMode)
fun withCompactionMode(compactionMode: Pdf417CompactionMode): Pdf417BarcodeGeneratorBuilder
Added in version 8.3.0
Sets the compaction mode for PDF417 barcode generation. The compaction mode determines how the data is encoded. Default is Pdf417CompactionMode.AUTO.
- withDimensions(dimensions)
fun withDimensions(dimensions: Pdf417Dimensions): Pdf417BarcodeGeneratorBuilder
Added in version 8.3.0
Sets the symbol dimensions for the PDF417 barcode. The dimensions control the minimum and maximum number of rows and columns. Encoding fails if incompatible dimensions are defined.