Pro-Barcode Software Logo
flag german flag uk flag us Tip: Bookmark this page with Ctrl-D (Win) or Apple-D (Mac) MainProductsKnow How / FAQDownloadStoreContact

Manual - Macintosh Dynamic Library Datamatrix - Reference

Properties

For each property, a set / get accessor method pair is available, see the supplied WSDY3.h file for a list.

Naming conventions: All accessor method names start with WSDY3, followed by set or get, then followed by the property name in camel casing. E.g. the property dataToEncode has the accessor methods WSDY3setDataToEncode() and WSDY3getDataToEncode().

Name Type Comment
dataToEncode char * Data to encode in the barcode. String can have up to 3,000 characters. The capacity of Datamatrix is (roughly) as follows: Alphanumeric data: max c. 2,300 characters; binary data (8 bits): max c. 1,500 characters; numeric data: max c. 3,000 characters.

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 a tilde, write "~0126".

Note: When encoding non-printable characters or those with an ASCII code above 128 (e.g. german umlauts or french accented 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 some cases you will have to resort to using a serial scanner.

Default: "Datamatrix"
 
moduleSize float Length of one side of a square module in mm.

The smallest acceptable value depends on the print resolution; the smallest usable value will be around 0.25 mm.

Default: 1.0 mm
 
symbolRows int Number of rows of the generated bit pattern, only useful in connection with the bitpattern routine, see below. Read-only property.

Default: 0
 
symbolCols int Number of columns of the generated bit pattern, only useful in connection with the bitpattern routine, see below. Read-only property.

Default: 0
 
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.
 

Methods

Name Parameter Comment
WSDY3createCode float dpi Creates a barcode, returns a CGImageRef 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. The samples provide helper functions to save the CGImageRef to a file or to convert it to an NSImage.

Returns: CGImageRef
 
WSDY3bitpattern_datamatrix char *data Creates the actual bitpattern of a Datamatrix barcode in form of an array. Bars are set to '1' in the array, spaces are set to '0'. Will also perform the tilde-substitution as described above. See the description of the samples for an example. Use the symbolRows and symbolCols properties to get the dimensions of the array.

Returns: char * - Note: Returns NULL when in demo mode.
 
WSDY3resetToDefaults void Resets all properties to the defaults as described in this document.

Returns: void
 
WSDY3unlock char *user
char *key
Unlock the library and remove the restrictions of the demo. See the supplied sample projects for an example.

Returns: Boolean - True: Successfully unlocked; False: Error.