SATO Printer Interface API

Similar documents
MULTIFUNCTIONAL DIGITAL SYSTEMS. Software Installation Guide

MULTIFUNCTIONAL DIGITAL SYSTEMS. Software Installation Guide

Ludlum Lumic Data Logger Software Manual Version 1.1.xx

Daniel MeterLink Software v1.40

ABSOFT Corporation Software License Agreement. Specifically for IMSL FORTRAN 5.0 BUNDLED WITH FORTRAN COMPILERS FROM ABSOFT FOR WINDOWS OR OS X

If the firmware version indicated is earlier than the "Version 1.06", please update the unit s firmware.

CX Recorder. User Guide. Version 1.0 February 8, Copyright 2010 SENSR LLC. All Rights Reserved. R V1.0

INTELLEX SOFTWARE VERSION 3.1 UPGRADE

Network-MIDI Driver Installation Guide

SensView User Guide. Version 1.0 February 8, Copyright 2010 SENSR LLC. All Rights Reserved. R V1.0

DME-N Network Driver Installation Guide for M7CL

TOOLS for n Version2 Update Guide

Installing Enterprise Switch Manager

Price List Utilities. For Dynamics CRM 2016

Installing Enterprise Switch Manager

0Introduction. Overview. This introduction contains general information and tips for using your Avaya CD-ROM.

TWAIN 163/211. User Manual

FlukeView. Users Manual. Software for ScopeMeter Test Tools

TotalShredder USB. User s Guide

Installation and Configuration Manual. Price List Utilities. for Microsoft Dynamics CRM Dynamics Professional Solutions Ltd 1 / 14

FONT SOFTWARE END USER LICENSE AGREEMENT. We recommend that you print this Font Software End User License Agreement for further reference.

End User License Agreement

ABB Network Partner. User s Manual CAP/REx 500*2.0

vippaq Main App. User Guide

ST-C700 Firmware Update service

ALL-TEST PRO 33IND PC Software Quick Start Guide

Online Localization Service

OCTOSHAPE SDK AND CLIENT LICENSE AGREEMENT (SCLA)

fontseek.info outofthedark.xyz

SATO All-In-One Printer Control Application

Snapture for Pocket PC For Windows 95/98/ME/2000/XP/2003 and PocketPC

SonicWALL CDP 2.1 Agent Tool User's Guide

Mobile Banking and Mobile Deposit Terms & Conditions

User s Manual. JAI Control Tool. Operation Manual. Document Version: C Document P/N:10493

Shimadzu LabSolutions Connector Plugin

MOTIF-RACK XS Editor VST Installation Guide

Contents. 1 Introduction. 2 Setting up PC scanning. 3 Connecting to the copier. 4 Installing the TWAIN driver

AhnLab Software License Agreement

Telecommunication Systems Division. Persistent Pager Add-on User Guide

Ecma International Policy on Submission, Inclusion and Licensing of Software

Studio Manager. for / Installation Guide. Keep This Manual For Future Reference.

RTA Gateway N34 Hardware Jumper Configuration

Quick Start Guide. Model 0260 Secondary Electronics

Customer Support: For more information or support, please visit or at Product Release Information...

User Guide. Portable Calibration Module

CA File Master Plus. Release Notes. Version

Emerald. Caller-ID Search Version 1.2. Emerald Management Suite IEA Software, Inc.

Installation & Set-Up Guide (For PFW users)

Getting Started (No installation necessary) Windows On Windows systems, simply double click the AntGram icon to launch the program.

Getting Started.

MicroStrategy Desktop Quick Start Guide

Beta Testing Licence Agreement

OfficeServ Link User Manual

User Guide. Portable Calibration Module

USB Server User Manual

OBDII Programmer Quick Start Guide

HUAWEI H30-U10. Quick Start Guide

TERMS & CONDITIONS. Complied with GDPR rules and regulation CONDITIONS OF USE PROPRIETARY RIGHTS AND ACCEPTABLE USE OF CONTENT

INSTRUCTION MANUAL Data transfer software for VM-82A

ssj1708 User s Manual Version 1.3 Revised February 2nd, 2009 Created by the J1708 Experts

Release Information. Revision History. Version: build 018 Release Date: 23 rd November 2011

Map Utility Ver. 1.8 Instruction Manual

ADN. System Installer. Instruction manual

Ecma International Policy on Submission, Inclusion and Licensing of Software

Font Software License

MOTIF-RACK XS Editor Installation Guide

Oracle Binary Code License Agreement for Java Secure Sockets Extension for Connected Device Configuration 1.0.2

udynamo, Dynamag, DynaMAX, edynamo, mdynamo, BulleT

Tisio CE Release Notes

MegaStat Installation Instructions

PATGuard Time Manager 2

Mile Terms of Use. Effective Date: February, Version 1.1 Feb 2018 [ Mile ] Mileico.com

DEMO MANUAL DC2645A LTC MHz to 9GHz High Linearity I/Q Demodulator with Wideband IF Amplifier DESCRIPTION BOARD PHOTO

Product Manual Select Code Comcode Issue 8 January EasyView Software for the Galaxy Controller

Generic HART DTM for FDT 1.2 compliant Frame Applications Release 4

R227. Terms Code Discount per Sales Code Qty Ordered AR-1227

HYCU SCOM Management Pack for F5 BIG-IP

Product Release Information

Font Software - Commercial Desktop License

Affinity Systems 5250 Emulation Adapters

Uploading Files Using File Drag and Drop

Scan to Hard Disk. Administrator's Guide

Getting Started (No installation necessary) Windows On Windows systems, simply double click the AntPConc icon to launch the program.

Trimble S6 and SPS700 Total Station Firmware

Terms of Use. Changes. General Use.

Webfont License End User License Agreement (EULA)

AWLaunch. Software Manual. Version 1.2 Last Revised April 27, 2009

Epson Professional Imaging

IPNexus Server Secure Instant Messaging & Integrated Collaboration

Symantec Enterprise Security Manager Modules for Microsoft SQL Server Databases Release Notes. Release 2.0 for Symantec ESM 6.0, 6.1, and 6.

Bar Code Discovery. Administrator's Guide

SOFTWARE LICENSE LIMITED WARRANTY

JD Edwards World User Reserved Information. Version A9.2

Compass Consulting Group Terms of Use & Privacy Policy. Last Updated: 10/1/2018

Aellius LynX Office Lookup Enhancements

PCMCIA Flash Card User Guide

NetSupport Protect 2.00 Readme

ProxWriter. User s Manual. VT TECH Corp E. Industrial St., #1G Simi Valley, CA Phone: (805) Fax: (805) Web site:

Made in U.S.A. 1

CX1 Network Accelerometer & Inclinometer User Guide

Transcription:

SATO Printer Interface API Version 1.2 16-OCT-2014 SATO Global Business Services Pte. Ltd. SATO Printer Interface API Page 1

CONTENTS Software License Agreement... 3 Copyrights... 4 Limitation of Liability... 4 Trademarks... 4 Software updating disclaimer... 4 Overview... 5 System Requirements... 5 Software development environment... 5 Client computer... 5 Download... 5 Setup... 6 Using the SATO Printer Interface API... 7 Printer communication functions... 7 Connection... 7 Get list of ports... 7 Set interface port... 8 Set interface type... 9 Send single query and receive single reply... 10 Send single DATA... 11 Asynchronous send... 11 Disconnection... 12 Receive data from printer using async send method... 12 Printer driver functions... 13 Initiate the functions... 13 Get list of installed printer driver... 13 Get number of jobs in spooler from printer driver... 14 Get port information from printer driver... 14 Send string data through Driver... 14 Send byte array data through Driver... 15 Classes... 16 Class for USBInfo... 16 Class for TCPIPInfo... 16 Class for DriverInfo... 16 Class for PrinterInfo... 16 SATO Printer Interface API Page 2

SOFTW ARE LICENSE AGREEMENT PLEASE READ THE FOLLOWING TERMS AND CONDITIONS BEFORE USING THIS PRODUCT. BY INSTALLING THE PRODUCT YOU THEREBY INDICATE YOUR ACCEPTANCE OF THESE TERMS AND CONDITIONS. SHOULD YOU DISAGREE WITH ANY OF THE TERMS OR CONDITIONS LISTED BELOW, PROMPTLY REMOVE ALL FILES RELATED TO THIS PRODUCT FROM YOUR HOST PLATFORM AND RETURN THE PRODUCT TO SATO CORPORATION. 1. You explicitly agree to accept a non-exclusive license to use the Software identified on the distribution media solely for your own customary business or personal purposes. Your local and national laws govern this Agreement. 2. Henceforth, Software shall refer to the digitally encoded, machine-readable data and program. The term Software Product includes the Software identified on the distribution media, including any accompanying documentation. The term Distribution Media refers to any method by which the Software Product is delivered to the end user, including but not limited to Floppy Disks, CD-ROM, Magnetic Tape and On-Line distribution via the Internet. The Software Product is licensed (not sold) to you, and SATO either owns or licenses from other vendors who own all copyright, trade secret, patent and other proprietary rights in the Software Product. 3. To protect the proprietary rights of SATO Corporation, you agree to maintain the Software Product and other proprietary information concerning the Software Product in strict confidence and to establish reasonable procedures regulating access to and use of the software. 4. You agree not to duplicate or copy the Software except that you may make one backup copy. You agree that any such copy shall contain the same proprietary notices as those appearing on the original. 5. You shall not sub-license, sell, lease, or otherwise transfer all or any portion of the Software Product separate from the printer(s), without the prior written consent of SATO Corporation. 6. You may not modify or prepare derivative works of the Software Product. You may not transmit the Software Product over a network, by telephone, or electronically using any means; or reverse engineer, decompile or disassemble the Software. 7. You may transfer the Software Product with the printer(s), but only if the recipient agrees to accept the terms and conditions of this Agreement. Your license is automatically terminated if you transfer the Software Product and printer(s). 8. This License remains in force until terminated, and may be terminated by agreement between you and SATO Corporation, or by SATO Corporation, if you fail to comply with the terms of this License if such failure is not corrected within thirty (30) days after notice. When this License is terminated, you shall either return to the place you obtained them from, or destroy, the printer and all copies of the Software and documentation. 9. SATO Corporation warrants that for ninety (90) days after delivery, the Software will perform in accordance with specifications published by SATO Corporation, and that the distribution media will be free from defects in material and workmanship. SATO Corporation does not warrant that the Software is free from all bugs, errors and omissions. 10. Your exclusive remedy and the sole liability of SATO Corporation in connection with the Software is replacement of defective distribution media upon their return to SATO Corporation. SATO Corporation will not be liable for any loss or damage caused by delays in furnishing a Software Product or any other performance under this Agreement. SATO Corporation does not warrant that the functions contained in the Software will meet your requirements or that the operation of the Software will be uninterrupted or error free. 11. Use, duplication or disclosure by the Government is subject to restrictions as set forth in the relevant guidelines of your country, such as the Rights in Technical Data and Computer Software clause at FAR 242.227-7013, subdivision (b) (3) (ii) or subparagraph (c) (1) (ii), as appropriate. Further use, duplication or disclosure is subject to restrictions applicable to restricted rights software as set forth in FAR 52.227-19 (c) (2) or equivalent rules. THE PARTIES AGREE THAT ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY ARE EXCLUDED. SATO Corporation reserves the right to make changes and/or improvements in the Software without notice at any time. IN NO EVENT WILL SATO CORPORATION BE LIABLE FOR LOST PROFITS, LOST DATA, BUSINESS INTERRUPTIONS OR ANY OTHER DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THIS PRODUCT, EVEN IF SATO CORPORATION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR ANY DAMAGES CAUSED BY ABUSE OR MANIPULATION OF THE SOFTWARE. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU. YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. NEITHER PARTY SHALL BE BOUND BY ANY STATEMENT NOR REPRESENTATION NOT CONTAINED IN THIS AGREEMENT. NO CHANGE IN THIS AGREEMENT IS EFFECTIVE UNLESS WRITTEN AND SIGNED BY PROPERLY AUTHORIZED REPRESENTATIVES OF EACH PARTY. BY INSTALLING THIS SOFTWARE PRODUCT, YOU AGREE TO ACCEPT THE TERMS AND-CONDITIONS OF THIS AGREEMENT. SATO Printer Interface API Page 3

COPYRIGHTS Any unauthorized reproduction of the contents of this document, in part or whole, is strictly prohibited. LIMITATION OF LIABILITY SATO Corporation and its subsidiaries in Japan, the U.S and other countries make no representations or warranties of any kind regarding this material, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose. SATO Corporation shall not be held responsible for errors contained herein or any omissions from this material or for any damages, whether direct, indirect, incidental or consequential, in connection with the furnishing, distribution, performance or use of this material. Specifications and contents of this document are subject to change without notice. TRADEMARKS SATO is a registered trademark of SATO Corporation and/or its subsidiaries in Japan, the U.S and other countries. Microsoft and Windows are registered trademarks of Microsoft Corporation. All other trademarks are the property of their respective owners. SOFTWARE UPDATING DISCLAIMER While all efforts have been taken to ensure accuracy and currency of the information contained herein, there are instances where the contents of this document may be outdated. In that case, proceed to SATO worldwide websites (www.satoworldwide.com) to check whether an updated document has been made available for your reference. SATO Printer Interface API Page 4

OVERVIEW The SATO Printer Interface API was developed to simplify the communication between.net applications and SATO printers. Software developers can use this API to send printer commands to printer as well as to receive response from printer if there is any. Also, SATO Printer Interface API can be used for getting SATO printer list from printer driver, check number of job in printer spooler or printer information from printer driver. SYSTEM REQUIREMENTS SOFTWARE DEVELOPMENT ENVIRONMENT Microsoft Visual Studio 2010 (or higher version) Microsoft.NET Framework 4.0 (or higher version) Visual C++ Redistributable Package for Visual Studio 2013 o Available on Microsoft website [URL]. Please download and install the package for x86 platform [vcredist_x86.exe]. CLIENT COMPUTER Custom application developed with SATO Printer Interface API must be distributed with the DLL files of SATO Printer Interface API. And also following components must be installed on the client computer. Microsoft.NET Framework 4.0 (or higher version) Visual C++ Redistributable Package for Visual Studio 2013 DOWNLOAD Latest version of the SATO Printer Interface API is available on following URL webpage. http://www.satoworldwide.com/software/sato-printer-interface-api.aspx SATO Printer Interface API Page 5

SETUP Execute the SATO Printer Interface API setup package and follow the guidance of the setup wizard. By default, the SATO Printer Interface API files will be install in below folder. x86 environment: C: Program Files SATO SATO Printer Interface API x64 environment: C: Program Files (x86) SATO SATO Printer Interface API Copy all assembly (dlls) into project folder. Add reference both assembly into project references. SATO Printer Interface API Page 6

USING THE SATO PRINTER INTERFACE API PRINTER COMMUNICATION FUNCTIONS CONNECTION Initialize the API to get list of ports, send data to printer or receive data from printer. Connection() using SATOPrinterInterface; Connection SATOPrinter = new Connection(); GET LIST OF PORTS Gets a list of the port available on the computer. For COM port and LPT port, this returns all available ports based on Windows device management regardless printer connection. For USB, this returns connected SATO printer ports. TCPIP will return list of SATO printer IP address, Mac address, Name and Details information. COM port: GetCOMPortList() LPT port: GetLPTPortList() USB port: GetUSBPrinterList() SATO Printer Interface API Page 7

TCPIP: GetTCPIPPrinterList() COM port: List of string LPT port: List of string USB port: List of USBInfo class TCPIP : List of TCPIPInfo class COM port: List<string> COMPorts = SATOPrinter.GetCOMPortList(); LPT port: List<string> LPTPorts = SATOPrinter.GetLPTPortList(); USB port: List<USBInfo> USBList = SATOPrinter.GetUSBPrinterList(); TCPIP: List<TCPIPInfo> TCPIPList = SATOPrinter.GetTCPIPPrinterList(); SET INTERFACE PORT Before send data to printer, you have to specify port or IP address of printer. Below properties allow you to set COM, LPT or USB port or IP address and IP Port of printer you want to communicate. COM port:.comport LPT port:.lptport USB port:.usbportid SATO Printer Interface API Page 8

TCP/IP port:.tcpipaddress.tcpipport COM port: SATOPrinter.COMPort = COM1 ; LPT port: SATOPrinter.LPTPort = LPT1 ; USB port: SATOPrinter.USBPortID =? usb#vid_0828&pid_0122#6&1161632e&0&1#{a5dcbf10-6530-11d2-901f-00c04 fb951ed} ; TCP/IP port: SATOPrinter.TCPIPAddress = "10.25.7.204"; SATOPrinter.TCPIPPort = "1024"; SET INTERFACE TYPE After set port, you have to set interface type. Below properties allow you to set interface type COM, LPT, LPT or TCP/IP..Type SATO Printer Interface API Page 9

COM port: SATOPrinter.Type = InterfaceType.COM; LPT port: SATOPrinter.Type = InterfaceType.LPT; USB port: SATOPrinter.Type = InterfaceType.USB; TCP/IP port: SATOPrinter.Type = InterfaceType.TCPIP; SEND SINGLE QUERY AND RECEIVE SINGLE REPLY Query method will send single command to printer and return received single reply from printer. This method will connect to printer before send command and disconnect from printer reply is received. You do not need to disconnect after you use this method. You have to set interface port and type before you use this method. Default timeout for each interface are (USB: 1 sec, COM: 4.2 sec, LPT: 3 sec, TCPIP: 2.5 sec), once timeout it will throw exception with message No Reply received! Query(byte[] data) Byte Array data Byte Array data Byte[] Printer_Reply = SATOPrinter.Query(<Byte Array SBPL Query command>); SATO Printer Interface API Page 10

SEND SINGLE DATA Send method will send single command to printer. This method will connect to printer before send command and disconnect from printer after sent the command. You do not need to disconnect after you use this method. You have to set interface port and type before you use this method. Send(byte[] data) Byte Array data SATOPrinter.Send(<Byte Array SBPL command>); ASYNCHRONOUS SEND With AsyncSend method, you can send multiple data to printer and also receive multiple replies from printer asynchronously. This method will connect to printer before send first command. However this will not disconnect from printer thus, you have to disconnect once you have completed sending data to printer and/or receiving data from printer. You have to set interface port and type before you use this method. To handle reply from printer using this method, you must use event handler. You may refer to receive data from printer using async send method section of this document. AsyncSend(byte[] data) Byte Array data SATO Printer Interface API Page 11

SATOPrinter.AsyncSend(<Byte Array SBPL command>); DISCONNECTION After you use asynchronous send method, you must disconnect from printer. Disconnect() SATOPrinter.Disconnect(); RECEIVE DATA FROM PRINTER USING ASYNC SEND METHOD To process reply data from printer while you are using asynchronous send method, you need to use event handler. Below example in C# shows for initialize the event SATOPrinter.ByteAvailable += new EventHandler<Connection.ByteAvailableEventArgs>(ReadMsg); private void ReadMsg(object sender, Connection.ByteAvailableEventArgs e) { } byte[] b = e.data; string temp = SATOPrinter.ByteArray2String(b); SATO Printer Interface API Page 12

PRINTER DRIVER FUNCTIONS INITIATE THE FUNCTIONS Initialize the API to use the printer driver functions. PrinterDriver() PrinterDriver printerdriver = new PrinterDriver(); GET LIST OF INSTALLED PRINTER DRIVER Gets list of installed printer driver on the computer. This will reply SATO printer driver only. GetDriverList() List of DriverInfo List<DriverInfo> ListOfSATODriver = printerdriver.getdriverlist(); SATO Printer Interface API Page 13

GET NUMBER OF JOBS IN SPOOLER FROM PRINTER DRIVER Gets number of jobs in printer driver spooler of specified printer driver name. GetSpoolerPrintJobsNumber(string DriverName) String of Driver Name Integer Int NoOfPrintJob = printerdriver.getspoolerprintjobsnumber( SATO CL412e ); GET PORT INFORMATION FROM PRINTER DRIVER Gets port information of specified printer driver name. GetIPAddressAndPortFromDriver(string DriverName) String of Driver Name List of PrinterInfo List <PrinterInfo> printerinfo = printerdriver.getipaddressandportfromdriver( SATO CL412e ); SEND STRING DATA THROUGH DRIVER Send string data to specified printer driver name. SendStringViaDriver(string DriverName, string Data) String of Driver Name SATO Printer Interface API Page 14

String of data Bool of send result bool sentresult = printerdriver.sendstringviadriver( SATO CL4NX 203dpi,<String of SPBL Command>); SEND BYTE ARRAY DATA THROUGH DRIVER Send byte array data to specified printer driver name. SendBytesViaDriver(string DriverName, byte[] Data) String of Driver Name Byte Array of data Bool of send result bool sentresult = printerdriver.sendbytesviadriver( SATO CL4NX 203dpi,<Byte array of SPBL Command>); SATO Printer Interface API Page 15

CLASSES CLASS FOR USBINFO string Name string PortID CLASS FOR TCPIPINFO string Name string MacAddress string IPAddress string Details CLASS FOR DRIVERINFO string PrinterModel string DriverName string PortName bool Online CLASS FOR PRINTERINFO string IPAddress string Port InterfaceType Type SATO Printer Interface API Page 16

Extensive contact information of worldwide SATO operations can be found on the internet at www.satoworldwide.com SATO Printer Interface API Page 17