| Tip: Bookmark this page with Ctrl-D (Win) or Apple-D (Mac) | Main • Products • Know How / FAQ • Download • Store • Contact |
Manual - Win32 Barcode Library - Reference Section
Properties (in alphabetical order)All properties have get / set accessor methods in the DLL. All functions in the DLL start with the prefix WSDX_; for example, the Checksum property has the accessors WSDX_GetChecksum() and WSDX_SetChecksum();
| 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. Default: True |
||||||||||||||||||||||||||||||
| CodeType | Integer |
The current barcode symbology.
Default: Code EAN 13 |
||||||||||||||||||||||||||||||
| DataToEncode | char [] |
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 EAN Size and Reduce 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 EAN Size 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 | char [] |
Name of the font to use for the human readable text. Max 40 chars.
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 10% is recommended.
Default: 0 % |
||||||||||||||||||||||||||||||
| Specific (EAN) | ||||||||||||||||||||||||||||||||
| Reduce | Float |
Reduce the height of an EAN symbol. Between 0% (no height reduction) and 80%. This will not effect the width of the symbol.
Default: 0 % |
||||||||||||||||||||||||||||||
| Size | Int |
Required EAN SC size. Between 0 (circa 81%) and 9 (200%). A value of 2 corresponds to the 100% SC 2 size. Effects both
the height and the width of the symbol.
Default: 2 |
||||||||||||||||||||||||||||||
| Specific (ISBN) | ||||||||||||||||||||||||||||||||
| Addon | char [] |
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 |
Methods
| Name | Parameter | Comment |
| WSDX_GetCode | Float dpi |
Creates a barcode, returns a Bitmap with the code. The dpi 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 |
| WSDX_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 |
| WSDX_Unlock | char *user char *key |
Unlock the control and remove the restrictions of the demo. See the supplied sample project for an example.
Returns: Boolean - True: Successfully unlocked; False: Error. |
More on DataToEncode
-
EAN 8: Enter 7 or 8 digits, the plugin will always create a checksum, discarding the 8th
digit if necessary.
-
EAN 13: Enter 12 or 13 digits, the plugin will always create a checksum, discarding the
13th digit if necessary.
-
UPC-A: Enter 11 or 12 digits, the plugin will always create a checksum, discarding the
12th digit if necessary.
-
UPC-E: Enter 7 or 8 digits, the plugin will always create a checksum, discarding the 8th
digit if necessary. The number must start with a "0" or "1".
-
ISBN-10: Enter 10 digits, e.g. 1-12345-123-X. The software will prepend 978 and calcu-
late the proper checksum.
-
ISBN-13: Enter 13 digits, e.g. 978-1-12345-123-8. The software will in any case recalcu-
late the proper checksum.
-
Code 128: Enter up to 40 characters, the full ASCII set is permitted. Encode non-
printable characters (e.g. a TAB) by a tilde, followed by the three-digit ASCII code, e.g.
"~009".
-
Code 128 GS1: Enter up to 40 characters, the full ASCII set is permitted. Encode non-
printable characters (e.g. a TAB) by a tilde, followed by the three-digit ASCII code, e.g.
"~009". Indicate field identifiers by parentheses, e.g. "(00)1234(10)123". The software
knows all fixed and variable length identifiers and will append an FNC1 to variable
fields as required.
-
Code 39: Enter up to 40 characters, the full ASCII set is permitted, the control
switches to Code 39 Extended automatically if so required. Encode non-
printable characters (e.g. a TAB) by a tilde, followed by the three-digit ASCII code, e.g.
"~009".
-
Code 2/5: Enter up to 40 digits 0-9.
-
Codabar: Enter up to 40 characters, digits 0-9, special characters "-", "$", ":", "/", ".",
"+". Use "A", "B", "C", or "D" as start stop characters, e.g. "A12345D".
-
2D Barcodes: Enter up to 4,000 characters (numbers and letters). The actual amount of data that can be
encoded depends on the kind of data and the symbology used. Encode non-printable
characters (e.g. a TAB) by a tilde, followed by the three-digit ASCII code, e.g. "~009".
Back to the manual index.


