Software Manual
65
3.6.4. 2D Code Font Usage
QR code can be specified up to 500 bytes. (It includes input data and punctuated marks in
500bytes.) Sample programs of Visual Basic using 2D code is as follows;
QR Code Print Sample1:
Private Sub Command1_Click()
Printer.Font.Name = "Printer 17cpi Tall
Printer.Print "QR Code Test Print for VB 6.0"
Printer.Font.Name = "Printer 17cpi"
Printer.Print
Printer.Print "DATA:"
Printer.Print "http://www.star-m.jp/"
Printer.Print
Printer.Print "QR code:";
Printer.Font.Name = "QR_CNTL"
' QR_CNTL font setting
Printer.Print "M2";
' Bar code model setting
Printer.Print "Em";
' Error correction level setting (correction rate: 15%)
Printer.Print "S3"
' Module size setting (size: 3 dot)
Printer.Print "B1";
' Bar code data setting (manual data analysis) + number of blocks
Printer.Print "2";
' Alphanumeric characters (data type)
Printer.Font.Name = "DATA1"
' DATA1 = 0x0000 - 0x005F
Printer.Print Chr(&H35);
'
Printer.Print Chr(&H20);
'
Printer.Font.Name = "ESC_FONT"
' ESC_FONT = 0x0020 - 0x007F
Printer.Print "http://www.star-m.jp/";
' Bar code data (21 bytes)
Printer.Font.Name = "QR_CNTL"
' QR_CNTL font setting
Printer.Print "P"
' Printed characters for bar code data
Printer.EndDoc
End Sub
When the QR code data setting is set to manual data analysis, be sure to set the
number of blocks and the entered data type.
For information on the setting method, refer to the separate manual “STAR Line
Mode Command Specifications”.
Change 0x35 → 0x15, 0x20 → 0x0
Number of bytes: 21 (0x15) + 0 (0x0) = 21 bytes