int PrintBarCode128 (unsigned char *Message,int Xsize, int Ysize, int Direction, int
alignment, int PrintValue) ;
Include : <BarCode.h>
Description :
This function prints a string of characters in the Code128 norm.
Parameters :
unsigned char *Message : message to print (Ascii characters)
i nt Xsize : width of 1 unit in pixels (width of 1 black bar or white bar)
int Ysize : height of 1 unit in pixels (height of 1 black bar or white bar)
int Direction : direction of the barcode ( 0: horizontal, 1:vertical)
int alignment : justification of the barcode (0: left, 1: center, 2: right)
int PrintValue : print the value of the barcode (0 : no, 1: yes)
Example : Print a centered barcode that contains the message “Test” :
unsigned char *String = “Test”;
int X = 2; // widht: 2 pixels
int Y = 50; // height:50 pixels
FILE *hPrinter;
hPrinter = fopen( "PRINTER", "w" );
//Horizontal, centered and value printed
PrintBarCode128(String, X, Y, 0, 1, 1);
fclose(hPrinter);