PosteK API Manual v2.04.pdf



Comments



Description

POSTEK PPLⅠAPI Manual Version 2.04 POSTEK ELECTRONICS CO.,LTD. 2006 Description of API functions file Name: CDFPSK.dll version number:2.X.X.X Copyright:◎2004 by Postek Electronics CO.,LTD. All rights reserved. Purpose This API functions provide a series of commands/functions for users of Postek Electronics CO., LTD. All the functions offer convenience for them when they compile the application programs based on the operating system of Windows9X,NT,2000,XP and many more. This API functions only supports products of Postek Electronics CO., LTD. Abbreviation comparison PPL I: The first set of Printer Program Language of the Postek Electronics CO.,LTD. API: Application Program Interface. Dots: Pixel is a kind dimensional unit used in computer science technology. Originally means the minimum unit of the TV imaging. The minimum imaging unit for a printer: Dots are equal to one inch divided by the maximum resolution of the printer. - For the 203 DPI printer, 1dot = 25.4mm/203 = 0.125mm(1dot = 1000 / 203 = 5mil); - For the 300 DPI printer, 1dot = 25.4mm/300 = 0.085mm(1dot = 1000 / 300 = 3mil). TrueType Font: based on the Windows operating system, can be loaded or unloaded. -All installed TrueType Font can be used by this function. Notice String The quotation mark character (") designates the beginning and ending of a string. The back slash character(\)designates that the character following is a literal and will encode into the data field. Refer to the following examples: character " \ 0x00 – 0x7F Enter into Data Field \" \\ \x00 - \x7F * All print commands and alpha character command, parameters are case sensitive. * <CR> is “13”of the USASCII decimal system, or “0DH”of the hexadecimal system, namely “enter” symbol. 2 Coordinate system The barcode label printer’s coordinates system is depicted in following figure: Y Label Feed Direction X (0,0) 864/1248dots TPH Line 0dot 3 it PTK_FormDownload. Draw diagonal.DLL. Print text letters. End form store. Check if there’s any error after using other functions in CDFPSK. Print bar code. Obtain the edition information of this API functions. Set the baudrate speed of the serial port. variable or combined string. Print binary graphics. Delete one or all of the graphics stored in the printer. Set the darkness of the TPH. Store a PCX graphic to the printer. Draw straight-line (If two straight-lines intersects. the width and height of the characters can be adjusted. counter value. 4 . Delete one or all of the soft fonts stored in the RAM or flash memory. must be used together with the Print the form name list stored in the printer. Print the graphics name list stored in the RAM or flash memory. Print a PCX graphic. Print 2D bar code Define counter variable. use an exclusive OR operation). use an OR operation). it must be used together with the PTK_FormEnd. Print the soft font list stored in the RAM or flash memory. Draw white straight-line. the content can be constant. Clear the contents in printer buffer. Draw straight-line (If two straight-lines intersects. Close the communication port that opened by OpenPort function. Store a form to the printer. Execute the designated form. Print TrueType Font. Delete one or all of the forms stored in the printer. Print the designated graphics.Functions Function name OpenPort ClosePort SetPCComPort GetErrState PTK_GetInfo PTK_DrawText PTK_DrawTextTrueTypeW PTK_DrawBarcode PTK_DrawBar2D_Pdf417 PTK_DefineCounter PTK_SetDarkness PTK_SoftFontList PTK_SoftFontDel PTK_FormEnd PTK_FormList PTK_FormDel PTK_ExecForm PTK_FormDownload PTK_DrawPcxGraphics PTK_PcxGraphicsList PTK_PcxGraphicsDel PTK_PcxGraphicsDownload PTK_PrintPCX PTK_DrawBinGraphics PTK_DrawLineXor PTK_DrawLineOr PTK_DrawDiagonal PTK_DrawWhiteLine PTK_ClearBuffer Description Open the communication port. Set printing speed. 2: opening LPT2. Download variable or counter variable.PTK_SetPrinterState PTK_PrintLabel PTK_PrintLabelAuto PTK_SetLabelHeight PTK_SetLabelWidth PTK_SetCoordinateOrigin PTK_SetPrintSpeed PTK_PrintConfigunation PTK_DefineVariable PTK_DrawRectangle PTK_SetDirection PTK_EnableFlASH PTK_DisableFLASH PTK_Download *PTK_Reset *PTK_BackFeed PTK_CutPage Set the printer’s working state. Reset the printer. Set label’s width. Set label’s height and the height of media gap/black line/ hole. 5: opening COM2. Auto-execute the printing work. The current setting for printer/printer’s working state.txt (build file under the executing program catalog). 0: printing to the file PBffi. Set/change the coordinate reference point. Define variable. Syntax: int OpenPort(int xx). Require the printer feedback the error report at once. Cancel Select the flash memory. Order the printer to execute printing work. Expounding of the Function OpenPort Description: This function is used to open the communication port. Parameters: xx: Symbol of the communication port. 4: opening COM1. Set label printing direction. Draw rectangle. Set cutter’s working cycle (namely the cutter will start to cut labels once how many labels have been printed) The function with sign * cannot be used for the moment.. 3: opening LPT3. Be sure the OpenPort function has been correctly executed before using other functions. 1: opening LPT1. 5 . 6: opening COM3. Select the flash memory. your program will always take up the opened communication port until the program be closed. Syntax: int SetPCComPort(DWORD BaudRate. It is only available when use the serial port. ClosePort Description: This function is used to close the communication port which opened by the OpenPort function. SetPCComPort Description: This function is used to set the baudrate speed of the serial port in PC.8PIN on-off.Returns: 0 -> OK; Other returns: Please refer to chapter: CDFPSK. please refer to the user’s manual). BOOL HandShake).DLL erroneous return value specification. Parameters: none Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Otherwise. Note: Be sure to corresponded with the serial baudrate setting in your printer (by adjusting the DIP’s 7. Syntax: int ClosePort(void). Example: OpenPort(1). Example: ClosePort( ).DLL erroneous return value specification. It suggests that call the ClosePort to close the communication port after completing all the operation operated by other functions. Parameters: 6 . // symbols opening LPT1. DLL.DLL erroneous return value specification. TRUE). values: 9600,19200,38400,57600; HandShake:whether uses HandShaking or not; TRUE:enable HandShaking. Please refer to the section of CDFPSK.. GetErrState Description: This function is used to check the correctness/validity of the other functions in CDFPSK. .. state = GetErrState(). Example: int state = 0. This function must use before the Closeport().BaudRate:set serial port baudrate. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.dll description of returning errors for error codes. FALSE:disable HandShaking.DLL erroneous return value specification. PTK_GetInfo Description: 7 . OpenPort(1). Example: SetPCComPort ( 9600. ClosePort(). ... Syntax: int GetErrState(void); Parameters: none Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Example: PTK_GetInfo(void) PTK_DrawText Description: This function is used to print text. the content can be constant. 2—180°rotation. Value 1 2 Description Foreign language fonts1 Foreign language fonts 2 8 . char ptext. unsigned int pFont. pFont: Selects internal fonts or softfonts. unsigned int pVertical.1—90°rotation. 3—270° rotation. py: Y coordinate in dots. LPTSTR pstr ). counter value.DLL erroneous return value specification.This function is used to get the edition information of this API DLL. Syntax: int PTK_GetInfo(void) Parameters: none Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Parameters: px: X coordinate in dots. unsigned int py. 0—No rotation. variable or combined string. a: 24*24 simple Chinese fonts in printer. Syntax: int PTK_DrawText ( unsigned int px. unsigned int pdirec. A—Z: downloaded soft fonts. unsigned int pHorizontal.1—5: internal fonts. pdirec: select printing Direction. 2. PTK_DrawBarcode Description: This function is used to print a bar code. Example: PTK_DrawText (50.” “Printer”C2V1“is ok.0.1.30. LPTSTR pstr ). LPTSTR pCode. it must begin and end with “”Example:“POSTEK Printer” 。 Cn: A counter value. ptext: Choosing 'N' prints normal text (i.2. unsigned int pHorizontal. Cn and Vn parameters “DATA”: A data fixed string.0.’N’. Example:“data1”CnVn“data2”. Vn: A variable string.’N’. unsigned int py. 9 .’N’. PTK_DrawText (50. Refer to C command.”\”123456789\””). Value range: 1-24 pVertical: Vertical multiplier expands the text vertically. char ptext.0.DLL erroneous return value specification. Refer to V command.1.e.e. unsigned int pVertical. Value range: 1-24 The acceptable values for both pHorizontal and pVertical are from 1 to 24.2. white characters on a black background) pstr:A character string (length is 1 to 100), using “DATA”.1.30.3 4 5 a A~Z Foreign language fonts 3 Foreign language fonts 4 Foreign language fonts 5 24*24 dot matrix Chinese font Soft fonts pHorizontal: Horizontal multiplier expands the text horizontally.1.’N’. PTK_DrawText (50.0. Syntax: int PTK_DrawBarcode ( unsigned int px.30.30.1.1.1. nsigned int NarrowWidth.C1). PTK_DrawText (50.V3).2.””). black characters on a white background) Choosing 'R' prints reversed text (i. unsigned int pdirec. Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK.1. py: Y coordinate in dots. 3—270° rotation.1—90°rotation.Parameters: Px: X coordinate in dots. pdirec: select printing Direction. 10 . 0—No rotation. 2—180°rotation. pHorizontal: Wide bar width in dots. pCode: Bar code selection P4 Value 0 1 1A 1B 1C 1E 2 2C 2D 2G 2M 2U 3 3C 3E 3F 9 E30 E32 E35 E80 E82 E-85 K P UA0 UA2 UA5 UE0 UE2 UE5 Bar Code Type Code 128 UCC (shipping container code) Code 128 AUTO Code 128 subset A Code 128 subset B Code 128 subset C UCC/EAN Interleaved 2 of 5 Interleaved 2 of 5 with check sum digit Interleaved 2 of 5 with human readable check digit German Postcode Matrix 2 of 5 UPC Interleaved 2 of 5 Code 3 of 9 Code 3 of 9 with check sum digit Extended Code 3 of 9 Extended Code 3 of 9 with check sum digit Code93 EAN-13 EAN-13 2 digit add-on EAN-13 5 digit add-on EAN-8 EAN-8 2 digit add-on EAN-8 5 digit add-on Codabar Postnet UPC-A UPC-A 2 digit add-on UPC-A 5 digit add-on UPC-E UPC-E 2 digit add-on UPC-E 5 digit add-on NarrowWidth: Narrow bar width in dots. range:0 or 1。 11 . unsigned int py. unsigned int l. Cn. s. unsigned int w. Refer to V command. Vn: A variable string. PTK_DrawBarcode (50. LPTSTR pstr) Parameter: unsigned int unsigned int unsigned int unsigned int unsigned int unsigned int x. PTK_DrawBarcode (50.10. Example: PTK_DrawBarcode (50. unsigned int r.C2).’N’.30. unsigned int c.V1).1. unsigned int y. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.”123456”). v. in dots. PTK_DrawBar2D_Pdf417 Description: This function is used to print a PDF417 barcode. in dots. PTK_DrawBarcode (50.1.’1A’.1. unsigned int o.’N’.pVertical: Bar code height in dots.1.125 mm。 Maximum printing width.30. Refer to C command. Maximum printing height.DLL erroneous return value specification. Syntax: int PTK_DrawBar2D_Pdf417(unsigned int x.’1A’. unsigned int px.1.10. unsigned int t. y. range:0~8。 compression degrees.1.10.0.’1A’.0. c. Y coordinates. B.30. Vn. Example:“data1”CnVn“data2”. w.’N’. unsigned int v.C1” is ”V2). Note:1 dot = 0.30.’N’.’1A’. X coordinates.print the readable characters under barcode pstr:A combined character string (length is 1 to 100) using “DATA” .0. “DATA”: A data field string.0.1. it must begin and ended with “ ”.10. unsigned int s. correction degrees.1. Example:“POSTEK Printer” 。 Cn: A counter value. ptext: N-no print the readable characters under barcode. Example: unsigned int x. range:2~9 dots。 Module height,range:4~99 dots。 Max row count。 Max column count。 Truncation flag,‘0’ means normal and ‘1’ means truncated.s.py=7. int FWidth. Vn: A variable string.px=3. Refer to C command. LPCTSTR pstr = "POSTEKINFO".py.w. Refer to V command.c.t.l=2. py. t. Example:“data1”CnVn“data2”.Module width.l. And the character width and height can be adjusted. “DATA”: A data fixed string.r=10.c. Syntax: int PTK_DrawTextTrueTypeW( int x. int Fspin. LPCTSTR id_name. LPCTSTR data ) Parameters: Px: X coordinate in dots. r. print direction positioning. Reference Error. 12 .px. LPCTSTR FType.t.o.r.o=0.c=0.r.v. int FWeight. x=10. PTK_DrawTextTrueTypeW Note: Be sure to install the printer driver of POSTEK prior to using PTK_DrawTextTrueTypeW() Description: This function is used to print a group TrueType Font characters.s=0. l. PTK_DrawBar2D_Pdf417 (x.px. A character string (length is 1 to 100), using “DATA”.o. BOOL FStrikeOut. Return value: 0 -> OK. unsigned int unsigned int unsigned int unsigned int unsigned int px.txt file.y.w. int FHeight. py: Y coordinate in dots.y=10.l.t=0. BOOL FUnline.y.w=400.‘2’ means 180°,’3’means 270° LPCTSTR pstr.v. it must begin and end with “”Example:“POSTEK Printer” 。 Cn: A counter value.s. Cn and Vn parameters. int y. ‘0’means 0°,’1’means 90°.pstr). unsigned int o.v=300.py. BOOL FItalic. 35. 3—180°rotation.0.FHeight:Font type height in dots. Example: Print Chinese fonts for 3mm heigh: For the 203 DPI models printer. 100 -> extra thin,200 -> tiny thin, 300 -> thin, 500 -> middling, 600 -> half thick, 700 -> thick. Parameters: id: Counter ID. FWidth:Font type width in dots. LPTSTR pstr. maxNum:Maximum digit number. unsigned int maxNum. Fitalic:Italic,0 -> FALSE.0.400. ptext:Justification code. FType:Font type name. acceptable values are from 0 to 9. R for right justification. 1 -> TRUE.4. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.0. 1 -> TRUE. acceptable values are from 1 to 40. 0 and 400 -> 400 standard. PTK_DrawTextTrueTypeW (30. char ptext. id_name:Identify the name.24.08 = 38dots (round). Funline:Add base line.0. 4—270°rotation. LPTSTR pMsg ).125 = 24dots."机要绝密"). Fspin:Font rotation. 0 -> FALSE. 800 -> extra thick. * If you want to print the normal scale font. 1—No rotation. Fweight:Font thickness."宋体". L for left justification. users can Call id_name to print this true type characters by PTK_DrawPcxGraphics( )for several times before powering off. set FWidth to 0. C for centralization and 13 .DLL erroneous return value specification. 900 -> bolder. 1 -> TRUE. True type characters will be transferred to PCX data and store to the printer as the name of id_name."A1". For the 300 DPI models printer. Syntax: int PTK_DefineCounter ( unsigned int id. FHeight is 3 / 0. PTK_DefineCounter Description: This function is used to define a counter variable. FHeight is 3 / 0. FstrikeOut:Add strikethrough,0 -> FALSE.2—90°rotation. data:The contents of string. e."\”Enter\” Code:"). H hexadecimal system. “-4O= Decreases each time by 4. T060. ….…. then followed by a change symbol (i. the default value is 10. D . 1235. Pstr:Counter change rule : “+”or “-“ sign followed by a single digit of 1 – 9. 1110. B . according to hexadecimal base computation. “+3X”= Increase each time by 3.’N’. according to Decimal base computation.binary system.1230. 1235.…. Example: 1111. PTK_SetDarkness Description: This function is used to set darkness of the TPH. Example: In user-defined rule: TE2DOKLU046MNY37. 1236.user defined pattern. Parameters: id:Acceptable values are from 0 to 20. Syntax: int PTK_SetDarkness (unsigned int id). Example: PTK_DefineCounter (0.decimal base.1228.122E. according to Decimal base computation. T06K. according to Octonary number system computation. it is a relative value. The lightest print darkness is achieved with a value of 0 and the greatest print darkness is achieved with a value of 20.6. to a maximum of 64 characters. “-1B”= Decreases each time by 1. 1101. Example: 1234. Example: 1234. followed by T062.1224. This value is not in deed the temperature of the TPH.”+1”.octonary number system. according to Binary computation. Example: 1234. according to a user-defined pattern. X . Returns: 0-> OK; Other returns: Please refer to chapter:CDFPSK.…. Example: 1234. ….N for no justification. the starting value is “T062”. “+3D”= Increases each time by 3. 14 . O . “-6H”= Decreases each time by 1. 1236. …. pMsg: A text string that will be sent to LCD or KDU. ) Step values: “+1” = Increases each time by 1.DLL erroneous return value specification. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.DLL erroneous return value specification. soft fonts stored in RAM and/or Flash memory.Returns: 0-> OK; Other returns: Please refer to chapter:CDFPSK. Syntax: int PTK_SoftFontDel (char pid). Parameters: none Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.* If pid = ‘*’.DLL erroneous return value specification. Parameters: pid: Soft font ID, A—Z. Example: PTK_SetDarkness (10). PTK_SoftFontDel Description: This function causes the printer to remove one or all. Example: PTK_SoftFontList ().all fonts will be deleted from RAM or flash memory. Syntax: int PTK_SoftFontList (void).DLL erroneous return value specification. Example: 15 . PTK_SoftFontList Description: This function will cause the printer to print a list of all soft fonts that are stored in RAM or FLASH memory. it must be used together with the PTK_FormDownload. … PTK_FormEnd ( ). Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.DLL erroneous return value specification. 16 . Syntax: int PTK_FormList (void ). PTK_FormDel Description: This function causes the printer to delete forms currently stored. PTK_FormList Description: This function causes the printer to print a list of forms that have been stored. Syntax: int PTK_FormEnd (void ).DLL erroneous return value specification.PTK_SoftFontDel (‘A’). PTK_FormEnd Description: This function is used to end a form store. Example: PTK_FormDownload( “Form1” ). Example: PTK_FormList ( ). DLL erroneous return value specification. it must be used together with the PTK_FormEnd.DLL erroneous return value specification. Parameters: pid:Form name with a maximum of 16 characters. otherwise it is saved to RAM.Syntax: int PTK_FormDel (LPTSTR pid). Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK. PTK_FormDownload Description: This function is used to store a form to the printer. the form will be saved to flash memory.all forms will be deleted from RAM or flash memory. Syntax: int PTK_ExecForm (LPTSTR pid). the form will be save to FLASH memory. 17 . If pid = “*”. If this function is used after EnableFlASH(). Parameters: pid:Form name with a maximum of 16 characters. If this function is used under default state or after DisableFlASH () . Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. PTK_ExecForm Description: This function is used to execute the designated form. Example: PTK_ExecForm (“FORM1”). Example: PTK_FormDel (“FORMNAME”). LPTSTR gname).DLL erroneous return value specification. Example: PTK_DrawPcxGraphics (100. Parameters: pid:User-defined form name with a maximum of 16 characters. py:Y coordinate in dots. it must be user-defined name in the PTK_PcxGraphicsDownload(). game:Graphics name with a maximum of 16 characters. Syntax: int PTK_DrawPcxGraphics (unsigned int px. PTK_PcxGraphicsList Description: This function causes the printer to print the list of graphics that stored to RAM or flash memory from host.Syntax: int PTK_FormDownload (LPTSTR pid). Parameters: px:X coordinate in dots. 18 . unsigned int py. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Example: PTK_FormDownload (“FORMNAME”). PTK_DrawPcxGraphics Description: This function is used to print the designated graphics.“PCX1”).DLL erroneous return value specification. Note: The graphics must store in the printer by using PTK_PcxGraphicsDownload before it to be printed. Use this form prior to execute this function after storing the form to the printer Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.50. PTK_PcxGraphicsDownload Description: This function causes the printer to store a PCK graphics to printer.Syntax: int PTK_PcxGraphicsList (void ). Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Syntax: int PTK_PcxGraphicsDel (LPTSTR pid).DLL erroneous return value specification. Parameters: pid: Graphics name with a maximum of 16 characters. 19 . if pid = “*”. Example: PTK_PcxGraphicsDel (“PCX2” ). char* pcxpath).DLL erroneous return value specification. graphics can only be printed by using this name in PTK_DrawPcxGraphics () after the graphics being stored to the printer pcxpath: The path of the PCX graphics in memory. all graphics will be deleted from RAM or flash memory. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. PTK_PcxGraphicsDel Description: This function causes the printer to delete graphics currently stored in RAM or flash memory. Syntax: int PTK_PcxGraphicsDownload (char* pcxname. Parameters: pcxname:User-defined graphics name with a maximum of 16 characters. Example: PTK_PcxGraphicsList ( ). DLL erroneous return value specification. Syntax: int PTK_PrintPCX (unsigned int px. unsigned int py."c:\\phone.XXX” or “X:\\XXX\\XXX.Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Syntax: int PTK_DrawBinGraphics ( unsigned int px.DLL erroneous return value specification. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. unsigned int pbyte.PCX”. py:Y coordinate in dots. Format: “XXXXXXXX. PTK_PrintPCX Description: This function is used to print a PCK graphics. include the path of the file. “c:\\test1111. PTK_DrawBinGraphics Description: This function causes the printer to print binary graphics.100. UCHAR* Gdata ). Binary graphics is non-compressed graphics data. a value of“1”does not print a dot. char* filename). unsigned int pH. Each bit represents a dot. a value of“0”prints a dot. Parameters: px:X coordinate in dots.pcx”). filename:PCX Graphics name with a maximum of 16 characters. Example: PTK_PcxGraphicsDownload (“PCXA”. Using this function is equal to use PTK_PcxGraphicsDownload()and PTK_DrawPcxGraphics() at the same time. Example: PTK_PrintPCX(10. Parameters: 20 . unsigned int py.pcx"). Ph:Height of graphic. PTK_DrawBinGraphics (20.30. If 8 cannot divide the bits of one line data. Gdata([…raster data…]):Binary graphic data.0x1f. in dots. Byte1 Byte2 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Line1 Line2 Line3 0 1 2 3 4 5 6 7 8 9 10 11 13 Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Line1’s Byte2(0xff) , Line2’s Byte1(0xe0). data size = pbyte * pH (Bytes)。 Binary data transmission sequence is left to right.buf).DLL erroneous return value specification. Example: char buf[] = {0xff.px:X coordinate in dots.0xe0.0xff…}.14. and then the corresponding bit is 0. then the bytes equal to the result add 1. pbyte:Bytes for one line data. Line3’s Byte1(0xff). Example: the bytes of one line data is 2(14 bits data).Line2’s Byte2(0x1f).0xff. Line3’s Byte2(0xff),… The part of the broken line is non-graphic area. up to down. py:Y coordinate in dots. 21 .0xff.4. example: data transmission sequence : Line1’s Byte1(0xff). Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.PTK_DrawLineXor Description: This function causes the printer to draw straight-line (If two straight-lines intersects.DLL erroneous return value specification. py:Y coordinate in dots. unsigned int pbyte. 22 . use an exclusive or operation). unsigned int py. unsigned int py.DLL erroneous return value specification. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.20. py:Y coordinate in dots. pH:Vertical length in dots. Parameters: px:X coordinate in dots. Example: PTK_DrawLineXor (100.5. PTK_DrawLineOr Description: This function causes the printer to draw straight-line (If two straight-lines intersects. pbyte:Horizontal length in dots. unsigned int pH). unsigned int pH). use Or operation). pH:Vertical length in dots. Syntax: int PTK_DrawLineXor (unsigned int px. pbyte:Horizontal length in dots. Parameters: px:X coordinate in dots. unsigned int pbyte. Syntax: int PTK_DrawLineXor (unsigned int px.110). PTK_DrawDiagonal Description: This function is to draw diagonal. pH).80). unsigned int py. py:Y coordinate in dots. pEx:End X coordinate in dots. unsigned int plength. 23 . Syntax: int PTK_DrawDiagonal (unsigned int px.20. PTK_DrawWhiteLine Description: This function is used to draw a whit line.110). Parameters: px:X coordinate in dots.5. pH:Vertical length in dots. py:Y coordinate in dots. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. unsigned int unsigned int pEy). Example: PTK_DrawDiagonal (50.10. Syntax: int PTK_DrawWhiteLine (unsigned int px.DLL erroneous return value specification.30. pEy:End Y coordinate in dots. unsigned int Parameters: px:X coordinate in dots. unsigned int thickness. unsigned int py.100. pEx. plength:Horizontal length in dots. thickness:set Thickness in dots.Example: PTK_DrawLineOr (100. By pressing the “feed” button for each label to be printed. Syntax: int PTK_SetPrinterState (char state).DLL erroneous return value specification. 2. It suggest that use this function to clear the contents in printer buffer before sending a new label to the printer.(default) L: After printing a label the printer will stop. Will continue automatically after previously printed label is removed (with peeler kit installed) 24 . PTK_SetPrinterState Description: This function is used to set the printer’s working state. requiring user input to print the next label.DLL erroneous return value specification. PTK_ClearBuffer Description: This function is used to clear the contents in printer buffer. Example: PTK_ClearBuffer ( ).5.110). Parameters: State: D:Enable direct thermal printing (without ribbon). Example: PTK_DrawWhiteLine (100. Please do not use this function during editing the FORM. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Syntax: int PTK_ClearBuffer (void). Input determined by: 1.20. Parameters: none.Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK. P: Enable continuous printout. 1—65535.C: Enable Cutting mode. 2. (Only with peeler kit installed) Notes: 1. use the PTK_PrintLabelAuto()instead. Please refer to the trouble-shooting section to correct the errors. Syntax: int PTK_PrintLabel (unsigned int number. PTK_PrintLabelAuto Description: This function causes the printer to execute to printing job automatically. If the cpnumber have no set value . as soon as all variable data 25 . (Only with cutter kit installed) N: Enable Peeler mode. Example: PTK_SetPrinterState (‘D’). Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK. It suggests that use this function when variables or counter values exist. Example: PTK_PrintLabel (2. The printer prints the form.DLL erroneous return value specification. cpnumber:Number of copies per label. The cutter and dispenser cannot be enabled at the same time. it will default 1.DLL erroneous return value specification. Notes: Please don’t use this function during editing the FORM. PTK_PrintLabel Description: This function is used to order the printer to execute the print work. Parameters: number:Number of lable sets. the READY light in front panel will flicker. 1—65535. unsigned int cpnumber).3). Once the options are incorrectly selected. cpnumber:Number of copies for per label. 1—65535. The value of gapH is related to the position of labels. Example: PTK_SetLabelHeight (160. 26 . unsigned int cpnumber). unsigned int gapH). gapH:The height of media gap/black line/bore hole in dots. Syntax: int PTK_SetLabelHeight (unsigned int lheight. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. it will default 1. Black Line Mode: Set gapH to B plus black line thickness in dots. Syntax: int PTK_PrintLabelAuto (unsigned int number. 24). set gapH to gap length. Notes: Only use in FORM. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. The transmissive (gap) sensor will be used to detect the end of media. The printer is in Gap mode and parameters are set with the media AutoSense.DLL erroneous return value specification. Parameters: number:Number of label. Value range: 0-65535.DLL erroneous return value specification. Gap mode: By default. PTK_SetLabelHeight Description: This function is used to set the label’s height and the height of media gap/black line/bore hole. If the cpnumber haven’t been set. Example: PTK_PrintLabelAuto (2.3). Continuous Media Mode: Set gapH to 0 (zero).have been input. Value range:0-65535. 1—65535. Parameters: lheight:Label height in dots. DLL erroneous return value specification. Example: PTK_SetCoordinateOrigin (12.23). lwidth). Syntax: int PTK_SetCoordinateOrigin (unsigned int px. unsigned int py). PTK_SetPrintSpeed Description: This function is used to set the print speed. Example: PTK_SetLabelWidth (250). 27 . Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Parameters: px:X coordinate moved distance in dots. Py:Y coordinate moved distance in dots. PTK_SetCoordinateOrigin Description: This function is used to set/change the coordinate origin point. Syntax: int PTK_SetLabelWidth (unsigned int Parameters: lwidth:label width in dots . Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK.DLL erroneous return value specification.PTK_SetLabelWidth Description: This function is used to set the label’s width. Parameters: none.DLL erroneous return value specification.DLL erroneous return value specification.0 ips (75 mm/s) 3. PTK_PrintConfigunation Description: This function is used to print the current printer configuration. Parameters: px:Value range :0 – 6. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.0 ips (200 mm/s) PPLB(compatible) 0 or 1 2 3 4 5 6 Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK.0 ips (50 mm/s) 2.5 ips (37 mm/s) 2. Syntax: int PTK_PrintConfigunation ( ). Example: 28 . or 10 – 80。 p1 value Speed 10 15 20 25 30 35 40 50 60 70 80 1.0 ips (175 mm/s) 8.0 ips (150 mm/s) 7.5 ips (63 mm/s) 3.Syntax: int PTK_SetPrintSpeed (unsigned int px).0 ips (125 mm/s) 6.0 ips (25 mm/s) 1. Example: PTK_SetPrintSpeed (5).5 ips (83 mm/s) 4.0 ips (100 mm/s) 5. 29 . value range: 00—99; pmax:Maximum number of characters. nsigned int pEx. py:Vertical start position (Y) in dots. pmsg:remind contents;Will be sent to KDU or displayed on LCD display of the printer.DLL erroneous return value specification. R.right justification.16.PTK_PrintConfigunation ( ). Example: PTK_DefineVariable (0."\”Enter Title:\”"). Syntax: int PTK_DefineVariable (unsigned int pid. unsigned int pmax. PTK_DrawRectangle Description: This function is used to draw rectangle. N-no justification. L-left justification. PTK_DefineVariable Description: This function is used to define variable in the FORM.L. unsigned int pEy). LPTSTR pmsg). unsigned int py. Parameters: px:Horizontal start position (X) in dots. C-center. Syntax: int PTK_DrawRectangle (unsigned int px. Parameters: pid:Variable ID number. char porder. the length should limited to under 16 characters. value range: 1—99. If you use KDU. porder:Field Justification. unsigned int thickness. Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK. T: Print from top left corner. pEx:Horizontal end position (X) in dots. Syntax: int PTK_SetDirection (char direct).250. B: Print from bottom right corner. Acceptable values are B or T. lines and rectangles. PTK_SetDirection Description: This function is used to set print orientation for all graphics. bar codes.DLL erroneous return value specification. PTK_EnableFlASH Description: This function is used to enable Flash memory. The default value is T.thickness:Line thickness in dots. rectangle. Parameters: none Returns: 30 . Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. this function will change the direction of contents,such as text. Example: PTK_DrawRectangle (50. pEy:Vertical end position (Y) in dots.DLL erroneous return value specification. text. Syntax: int PTK_EnableFlASH ( void). Example: PTK_SetDirection (‘B’). barcode. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.120.150).5. the data sent to the printer will be stored to the flash memory when use this function. straight line. Parameters: direct:Orientation. PTK_Download Description: This function is used to download variable or counter variable to the printer. Parameters: none Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. 31 . Syntax: int PTK_Download(void). Please refer to the command “?” of the PPL I.DLL erroneous return value specification.DLL erroneous return value specification. Example: PTK_Download( ). Parameters: none Returns: 0-> OK; Other returns: Please make reference to chapter: CDFPSK. PTK_DisableFLASH This function is used to disable Flash memory. Syntax: int PTK_ DisableFLASH (void).DLL erroneous return value specification. Example: PTK_ DisableFLASH ( ).0-> OK; Other returns: Please refer to chapter: CDFPSK. Example: PTK_EnableFlASH ( ). The data sent to the printer will be stored to the SDRAM when use this function. Syntax: int PTK_Reset(void). then power on. PTK_BackFeed Description: This function is used to get printer error and status reports immediately. The reset function is not available during the download of PCX graphics. Users can get the current error state by this function. Example: PTK_Reset( ).PTK_Reset Description: This function is used to reset the printer. This function is equal to the power off. The reset function can be sent to the printer during all other printing operations.DLL erroneous return value specification. thus reinitializing the printer. up to 2 seconds. The printer will report 4 bytes back to the host by the following format: 0x0d 0x0a :<CR><LF> 0xXX XX :Error/Status code Syntax: int PTK_BackFeed (void). Example: 32 . soft fonts or while the printer is in dump mode. The reset function cannot be used within a stored form.DLL erroneous return value specification. Parameters: none Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. Parameters: none Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK. The printer will ignore all commands sent while the reset command is executing. PTK_CutPage Description: This function is used to set cutter’s working circle (namely the cutter will start to cut labels once how many labels have been printed) Syntax: int PTK_CutPage (UINT page). value range: 1-999. the default value is 1.PTK_BackFeed ( ). 33 . Parameters: page:pages. Returns: 0-> OK; Other returns: Please refer to chapter: CDFPSK.DLL erroneous return value specification. Example: PTK_CutPage(1). (ditto). PTK_FormDel execution error. PTK_DS execution error. PTK_FormDel parameter error. PTK_DrawText pHorizontal or pVertical parameter error. PTK_DefineCounter parameter error. PTK_PcxGraphicsList execution error. PTK_FormDel distribution memory error. PTK_EnableCircumgyrate execution error. PTK_DrawBarcode parameter error. PTK_FormDownload execution error. PTK_PcxGraphicsDel distribution memory error. PTK_DrawLineXor execution error. PTK_PcxGraphicsDownload open file error. PTK_ExecForm distribution memory error.dll -3001 : -3002 : -3003 : -3004 : -3005 : -3006 : -3007 : -3008 : -3009 : -3010 : -3011 : -3012 : -3013 : -3014 : -3015 : -3016 : -3017 : -3018 : -3019 : -3020 : -3021 : -3022 : -3023 : -3024 : -3025 : -3026 : -3027 : -3028 : -3029 : -3030 : -3031 : -3032 : -3033 : -3034 : -3035 : -3036 : -3037 : -3038 : -3039 : -3040 : -3041 : -3042 : -3043 : Erroneous return value specification PTK_GetInfo execution error. PTK_DefineCounter execution error. PTK_SoftFontDel execution error. PTK_SoftFontList execution error.CDFPSK. PTK_SetDarkness execution error. PTK_ExecForm parameter error. 34 . PTK_DrawPcxGraphics execution error. PTK_DrawText execution error. PTK_DrawPcxGraphics parameter error. PTK_FormDownload distribution memory error. NULL. NULL. PTK_DrawPcxGraphics distribution memory error. PTK_DisableCircumgyrate execution error. PTK_ExecForm execution error. PTK_FormDownload parameter error. PTK_FormList execution error. PTK_PcxGraphicsDownload distribution memory error. PTK_DrawText pFont parameter error. PTK_DrawBinGraphics execution error. PTK_FormEnd execution error. PTK_PcxGraphicsDel parameter error. PTK_DrawBarcode execution error. PTK_DrawText parameter error; PTK_DrawText or PTK_DrawBarcode pdirec parameter error. PTK_PcxGraphicsDel execution error. PTK_PcxGraphicsDownload execution error. PTK_SoftFontDel parameter error. PTK_SetPrintSpeed parameter error. PTK_SetDirection execution error. PTK_DisableErrorReport execution error. PTK_DefineVariable execution error. PTK_PrintLabel parameter error. PTK_Y execution error. PTK_DefineVariable parameter error. save PCX data error. PTK_PrintLabelAuto parameter error. PTK_SetLabelHeight execution error. build PCX file error. PTK_Y parameter error. PTK_CutPage execution error; 35 . build PrinterDC fail. PTK_SetLabelWidth execution error. PTK_EnableErrorReport execution error.-3044 : -3045 : -3046 : -3047 : -3048 : -3049 : -3050 : -3051 : -3052 : -3053 : -3054 : -3055 : -3056 : -3057 : -3058 : -3059 : -3060 : -3061 : -3062 : -3063 : -3064 : -3065 : -3066 : -3067 : -3068 : -3069 : -3070 : -3071 : -3072 : -3073 : -3074 : -3075 : -3076 : -3077 : -3078 : -3079 : -3080 : -3081 : -3082 : -3100 : -3101 : PTK_DrawLineOr execution error. PTK_BackFeed execution error. deal with the error. PTK_DisableFLASH execution error. SetCommPort change the serial port error. PTK_DefineVariable parameter error. PTK_Reset execution error. PTK_ClearBuffer execution error. distribution save PCX data memory error. distribution save bitmap memory error. distribution save PCX HEAD file framework memory error. PTK_SetCoordinateOrigin execution error. PTK_DrawWhiteLine execution error. PTK_PrintConfigunation execution error. PTK_SetPrintSpeed execution error. PTK_DrawDiagonal execution error. PTK_SetDirection parameter error. PTK_PrintPCX execution error. PTK_SetPrinterState parameter error. PTK_Download execution error. PTK_PrintLabelAuto execution error. PTK_PrintLabel execution error. PTK_DrawRectangle execution error. PTK_EnableFlASH execution error. PTK_SetPrinterState execution error. distribution save contemporary file path memory error. -3200 to -3400 : the port have not opened or have closed. 36 .
Copyright © 2024 DOKUMEN.SITE Inc.