Softmatic .NET Barcode Library - Reference
Properties (in alphabetical order)
Name |
Type |
Comment |
|
|
|
General
|
Checksum |
Boolean |
False: Don't calculate checksum. True: Calculate checksum.
Applies only to the following codes: Code 39, Code 2/5 Interleaved, Code 2/5 Industrial. Ignored for
all other codes which are always with checksum. Laetus, PZN 7/8, Codabar are always
without checksum.
Default: True
|
CurrentCode |
Integer |
The current barcode symbology.
CODE_EAN8 | 1000 |
CODE_EAN13 | 1001 |
CODE_ISBN10 | 1002 |
CODE_ISBN13 | 1003 |
CODE_UPCA | 1004 |
CODE_UPCE | 1005 |
CODE_128 | 1006 |
CODE_128GS1 | 1007 |
CODE_25IL | 1008 |
CODE_25IND | 1009 |
CODE_ITF14 | 1010 |
CODE_39 | 1011 |
CODE_PZN | 1012 |
CODE_LAETUS | 1013 |
CODE_CODABAR | 1014 |
CODE_DATAMATRIX | 1015 |
CODE_PDF417 | 1016 |
CODE_QR | 1017 |
CODE_AZTEC | 1018 |
CODE_DATABAR | 1019 |
Default: Code EAN 13
|
DataToEncode |
String |
Data to encode in the barcode. String can have up to 4096 characters (the practical limit for ordinary linear codes is 40, though).
See section below for a list what the control expects for the various symbologies.
To encode non-printable charaters, e.g. a TAB, use the tilde, followed by the ASCII code, left
padded with "0" to three digits. E.g. to encode a TAB, write "~009". To encode an FNC1 character (if you want
to assemble your own Code 128 GS1 symbols), write "~999". To encode a tilde, write "~0126".
Note: When encoding non-printable characters
make sure your scanner can actually read and transmit such data - this is not a given, especially if the scanner
emulates a keyboard, e.g. via a wedge or USB. In many cases you will need to use a scanner that is connected via the
serial port.
Default: "401234567890"
|
ModuleHeight |
Float |
Height of the barcode in mm. Ignored for EAN Family barcodes (see CurrentEANSize property below) and 2D matrix symbologies.
The smallest acceptable value depends on the application, values under 8 mm should be avoided, for Code 128 GS1 the value should be 32 mm.
Default: 25 mm
|
ModuleWidth |
Float |
Width of the smallest bar (= module) in mm. Ignored for EAN Family barcodes (see CurrentEANSize property below).
The smallest acceptable value depends on the print resolution, avoid values under 0.1 mm. For Code 128 GS1
the value should be between 0.495 and 1.016 mm.
Default: 0.5 mm
|
Ratio |
Float |
Ratio of the width of the wide bar to the width of the narrow bar. For 2-width codes (Code 39, Code 2/5) only. Ignored for
all other codes.
The smallest acceptable value depends on the print quality and the resolution of the scanner; a ratio of 3 results in a
low-density code, a ratio of 2 results in a high-density code. Values under 2 should be avoided.
Default: 3
|
Human Readable Part
|
HumanReadable |
Boolean |
Display human readable text under the barcode. Ignored for all 2D symbologies and ISBN family. ISBN barcodes
are standardized and always come with text.
Default: True
|
HumanReadableFont |
String |
Name of the font to use for the human readable text.
Default: "Arial"
|
HumanReadableSize |
Float |
Size of the font for the human readable text in points. Ignored for EAN Family codes where the font size
depends on the code size.
Default: 12 pt.
|
Output
|
MarginX |
Float |
Left and right margin of the barcode. Should not be under 5 mm.
Default: 5 mm
|
MarginY |
Float |
Top and bottom margin of the barcode. Should not be under 5 mm.
Default: 5 mm
|
Reduction |
Float |
Reduce bar width to compensate for ink spread (dot gain). Between 0% and 80%. For ordinary office laser printers
a value of 2% is recommended, for ink-jet use 5%.
Default: 0 %
|
Specific (EAN)
|
CurrentEANReduce |
Float |
Reduce the height of an EAN symbol. Between 0% (no height reduction) and 80%.
Default: 0 %
|
CurrentEANSize |
Int |
Required EAN SC size. Between 0 (circa 81%) and 9 (200%). A value of 2 corresponds to the 100% SC 2 size.
Default: 6
|
Chevron |
Boolean |
Display a chevron (aka Light Margin Indicator) to the right of the code. EAN13, ISBN only.
Default: True
|
Specific (ISBN)
|
Addon |
String |
Text for ISBN addon satellite barcode. Must be 5 digits or empty (= no addon).
Default: ""
|
Specific (PDF417)
|
RequestCols |
Int |
Per default (RequestCols = -1) the control will create a PDF417 symbol that is roughly 3:2 (width : height) as recommended
by the ISO standard. Specify the desired number of columns (between 3 and 30) if you require a different size.
Default: -1
|
Specific (QR)
|
QrECC |
Int |
Per default the control creates a Quality M QR code (medium error correction capacity) as this gives the best compromise
between size and ECC capability. Values permitted:
0 Quality M (recommended)
1 Quality L (least)
2 Quality H
3 Quality Q (best)
Default: 0
|
Specific (Databar)
|
Subtype |
Int |
Sets the Databar subtype:
DATABAR_OMNI | 0 |
DATABAR_STACKED_OMNI | 1 |
DATABAR_EXPANDED | 2 |
DATABAR_EXPANDED_STACKED | 3 |
DATABAR_TRUNCATED | 4 |
DATABAR_STACKED | 5 |
DATABAR_LIMITED | 6 |
Default: 2 (Expanded)
|
SymbolsPerRow |
Int |
Sets the number of symbols per row (Expanded Stacked only). Must be an even number between 4 and 20.
Default: 4
|
Methods
Name |
Parameter |
Comment |
|
|
|
Init |
void |
Must be called before the first use of the control. Resets all properties to the defaults as described in this document.
Returns: void
|
GetCode |
Float |
Creates a barcode, returns a Bitmap with the code. The parameter determines the output resolution, e.g. 300 for 300 dpi.
The actual dimensions of the barcode (and, hence, the returned bitmap) are determined from the moduleHeight, moduleWidth and the encoded data.
Returns: Bitmap
|
EPS |
void |
Creates a barcode with the current setting and returns an EPS vector representation of the code. See the supplied sample project for an example.
Returns: String
|
SVG |
void |
Creates a barcode with the current setting and returns an SVG vector representation of the code. See the supplied sample project for an example.
Returns: String
|
License |
void |
Retrieves the license information of the libary. See the supplied sample project for an example.
Returns: String
|
Version |
void |
Retrieves the version of the libary in the format "Vx.x.x.x Build ddmmyyyy".
Returns: String
|
Barcode Specific Information - Data & Applicable Settings
Symbology | Data | Settings | Remarks |
EAN 8 | 7 or 8 digits | EAN size, truncation | |
EAN 13 | 12 or 13 digits | EAN size, truncation, addon, sentinel | * |
ISBN 10 | ISBN 10 Nr., e.g. 1-123-12345-X | EAN size, truncation, addon, sentinel | * |
ISBN 13 | ISBN 13 Nr., e.g. 978-1-123-12345-6 | EAN size, truncation, addon, sentinel | * |
UPC-A | 11 or 12 digits | EAN size, truncation, addon | * |
UPC-E | 7 or 8 digits | EAN size, truncation | First digit must be a "0" or "1" |
Code 128 | Digits, letters, special chars (max. 40 chars) | Module width, -height | Automatic selection of Code 128 sub types A, B, C |
Code 128 GS1/EAN/UCC | Digits, letters, parenthesized application identifier (max. 40 chars) | Module width, -height | Automatic selection of Code 128 sub types A, B, C
Enter your data including application identifiers, e.g. (01)1234567890. The software will
automatically insert all required FNC1 symbols. |
Code 2/5 Interleaved | Digits 0-9 (max. 40 digits) | Module width, -height, ratio, check digit | |
Code 2/5 Industrial | Digits 0-9 (max. 40 digits) | Module width, -height, ratio, check digit | |
Code ITF-14 | Digits 0-9 (exactly 14 digits) | Module width, -height, ratio | Software adds "bearer bar" |
Code 39 / 39 Extended | Digits, letters (max. 40 chars) | Module width, -height, ratio, check digit | Automatic selection of Code 39 / Code 39 Extended |
PZN 7/8 | 7 or 8 Digits | Module width, -height, ratio | Software will assemble PZN |
Laetus | Digits 0-9, max. value 131070 | Module width, -height | |
Codabar | Digits 0-9 (max. 40 chars) | Module width, -height | |
Datamatrix | Up to 2000 chars ** | Module width | Square modules, width = height |
PDF 417 | Up to 2000 chars ** | Module width | Module ratio height : width = 3 : 1 |
QR | Up to 2000 chars ** | Module width | Square modules, width = height |
Aztec | Up to 2000 chars ** | Module width | Square modules, width = height |
Databar | Depends on sub type | | |
Omnidir. | 13- or 14-digit GTIN | Module width and -height | |
Omnidir. Stacked | 13- or 14-digit GTIN | Module width and -height | |
Expanded | Up to 41 letters or 74 digits | Module width and -height | |
Expanded Stacked | Up to 41 letters or 74 digits | Module width and -height, symbols per row | |
Truncated | 13- or 14-digit GTIN | Module width and -height | |
Stacked | 13- or 14-digit GTIN | Module width and -height | |
Limited | 13- or 14-digit GTIN | Module width and -height | |
* The EAN 13, ISBN 10 und ISBN 13 can carry a satellite, or "add on", barcode. This add on can encode
two or five digits.
EAN/UPC height is determined by the value for "Truncation". This value is percentage based, i.e. if you enter "50" here
the code will have half the standard height.
Barcode Specific Information - Settings Details
Setting | Value range | Remarks |
EAN Size | SC0 - SC9 | All retail barcodes, SC2 is the standard size |
EAN Truncation | 0 - 80% | Min. height for EAN family codes is 15mm (5/8") |
Light Margin Indicator | Yes / No | Aka. sentinel, EAN 13 / ISBN only |
Symbols per Row | 4 - 20 | Databar Expanded Stacked only |
Check digit | Yes / No | Code 2/5 family and Code 39 only |
Module width | 0.1 - 2mm | Width of the narrowest bar. Code 2/5, ITF-14, Code 39, Code 128, PZN, Codabar, Databar, Laetus, all 2D Codes only |
Modul height | 5 - 100mm | Height of the code not counting the readable text. Code 2/5, ITF-14, Code 39, Code 128, PZN, Codabar, Databar, Laetus only |
Ratio | 2.0 - 3.0 | Code 2/5, Code 39, PZN, Codabar only |
Readable text | Yes / No | All codes, except Laetus, 2D Codes (always No) and PZN, retail codes (always Yes) * |
Readable font | Drop down list | All codes, except Laetus, 2D codes and retail codes * |
Readable font size | Drop down list | All codes, except Laetus, 2D codes and retail codes * |
* With EAN/UPC, the font is set to Helvetica (Mac) or Arial (Win), respectively. The size of the human readable text
is determined by the software to ensure that the text fits under the barcode. All retail codes are always created
with human readable text.
Data binding
The DataToEncode property of the control is data-bindable. To bind the property at design time, select the control
and hit F4 to display the properties; scroll down to DataBindings and select a data source from the list or create
a new data source.
Of course it's also possible to data bind the property at runtime.
Back to the manual index.
|