Datamax 7A300007 Rev. 2 manual Print Commands Draw Commands

Page 43

Mark Beginning of a Page

BeginPage();

This command follows Esc P P command and is used to indicate the beginning of a form in page printing mode.

Define the Page Size

SetPageSize (width, height);

This command is used to define the valid drawing area for a label or form. Two parameters are required: width and height of the form, measured in dots.

Set Margins

SetMargin (lm, tm);

This command sets the left margin to lm and the top margin to tm. The margin is then used as a start point (0, 0) for the form or label.

Mark Page End, Print and Exit

EndPage();

This command is used to end a form or label while in the Page Printing mode. This command also forces the printer to print a label or form.

Page Print Commands – Draw Commands

Draw Text

DrawText (x,y,color,angle,"string");

Draws text at any coordinate on the canvas.

DrawText “data” prints the text enclosed in the double quotes at the current cursor location. x and y specify where the text is to be printed (upper left corner of the first letter of the top line).

Parameters:

x

 

specifies “x”

axis location

 

y

 

specifies “y”

axis location

 

Color

 

specifies text color: 0 = white, 1= black.

 

 

User may print white text on an existing black background by specifying color = 0.

Angle

 

specifies text direction

 

 

 

 

 

 

 

 

Angle

Print angle

Description

 

 

 

 

 

 

 

0

0 degrees Counter-clockwise

Prints text horizontally from left to right.

 

 

1

90 degrees Counter-clockwise

Prints text vertically in the upward direction

 

 

 

 

 

 

 

2

180 degrees Counter-clockwise

Prints text horizontally from right to left

 

 

3

270 degrees Counter-clockwise

Prints text vertically in the downward direction.

 

 

 

 

 

 

String specifies the text to print

Multiple lines can be printed with a single ‘DrawText’ command by separating the lines with \n characters. Text formatting is accomplished by tags inserted in the string argument. The formatting is effective only in the string in which it appears and does not carry over to the subsequent DrawText commands. The text formatting commands are listed below.

37

Image 43
Contents Apex & Andes Series Page Copyrights Document Revision History Contents ’Neil Line Print mode Communications SettingsDip Switch Settings Introduction Datamax-O’Neil Printer Command Language ExPCLXoff CommunicationsEOT XONSelect Character Set Esc F n Select Character Pitch Mode ESC K n CRCharacter Sets Character Size and Line SpacingApex APEX4 Select Character Pitch Mode ESC k nAndes3 Character Size and Line Spacing Width and Height Character Attributes Emphasized Printing Mode ESC U nUnderline Printing Mode ESC U n Selection U Underline Mode on u Underline Mode OFFRight to Left and Left to Right Printing ESC F n Reverse Print ESC U nSelection R Reverse printing on n Reverse printing OFF Horizontal Tab Horizontal PositionCarriage ReturnCR BackspaceVariable Size Reverse Line Feed ESC Q J n Vertical PositionLine FeedLF Variable Size Line Feed ESC J nSet Form Feed Length in Dot Lines ESC T F n1 n2 Bar CodesSet Vertical Tab Height ESC T V n Form FeedPrint Bar Code with Human Readable Text Code 39 SpecificationsDescription Character set Elements per symbol Code 128 SpecificationsHEX DEC Code a Code B Code C Description UCC/EAN-128 SpecificationsUPC/EAN/JAN Specifications Interleaved 2 of 5 SpecificationsSymbol Character density Codabar SpecificationsElements per Character set QR Code Models GS1 DataBar SpecificationsDecimal Page Page Page QR Code Specifications Error correction Symbol Character/symbolSecurity Level # Error-Check Code Words Compaction Mode Description Encoding CapabilityElement Width Value Length in mil Barcode Height Multiplier ESC z h n GraphicsBit Graphics Graphic String Component Bit Compressed GraphicsFunction ESC P $ Enable Buffer ModeDisable Buffer Mode Select Online Mode Printer Controls Data ProcessingESC P Printer Controls Printed Output AdjustPrint Buffer Contents Buffer Mode ESC P +ESC @ Printer Controls ResetPrinter Controls Power CanCommand String Printer Response Extended Auto Power Down CommandSTX Printer Status CommandsSYN Track Position Track2 Track3 Magnetic Card Command String DescriptionMagnetic Card Reader Query Printer Model and Hardware Revision LevelInterfacing to the Magnetic Card Reader Magnetic Card Read Error MessagesError # Magnetic Card Data Output FormatESC C Black Mark Sensing Control CommandsESC Q R CR Black Mark Sensing Auto Mode Black Mark Sensing Command ModePrinted Receipt/Label Presenter Positive Adjust ESC Q P n Enable Back Black Mark Sensor ESC Q b e CRDisable Back Black Mark Sensor ESC Q b d CR Printed Receipt/Label Presenter Positive Adjust ESC Q D + nESC P P Print Commands ConfigurationPrinted Receipt/Label Presenter Negative Adjust ESC Q D n Enter the Page Printing ModePrint Commands Draw Commands Draw Rectangle DrawRectangle x1, y1, x2, y2,color,width Command NameHeight Type Value Barcode typeForm FiestaTM ESC D S Download Printer Default SetupESC S L Print Hardware Information ESC L g Download Self test Message Hardware InformationStart Hardware Information download process ESC SESC D L CR LF Download LogoDisplay Tables Information Enable Font DownloadingDownload Fonts ESC D F CRESC F Disable Font Download ModeDisplay Font Download Current Settings ESC F S m t k f CR ESC D I CRFlash Select Load Operating Mode ESC F M m CRESC F B CR Important Font Downloading NotesExample 2 BBX 08 23 0 Example 1 BBX 08 23 0Select Pass-Thru Command Mode ESC P U n1 U n2 T t0 t1 t2 CR Bluetooth & WiFi Setup CommandEmulation Language ’Neil Line Print modeEmulation Select Emulation ESC E nEsc C n Esc a n Can Esc V n1 n2 OFF 2USB Communications SettingsDip Switch Settings OFFXON/XOFF Protocol RJ25 Connector PIN # Functional Description Signal NameSerial Communication RS232C Serial Busy ProtocolOverview RS232C Technical SpecificationsDip switch setting USB Communication USBTeraTerm Example Bluetooth CommunicationsSoftware Driver Installation USB Technical SpecificationsSettings Bluetooth Interface Power ModificationManual Power OFF Mode Automatic Power OFF ModeStatus Condition Function Wi-Fi Communication OptionPrinter Status Indicator LED Panel LEDLED Color/ Status Description LED # LED #Action Required Replaceable Fonts Appendix a Flash Font TablesReplaceable Fonts Tables Factory FontsCourier PC Line Graphic Table Courier International Font TableRotated Font Table Monospace Font Table