diff --git a/lib/autoreplyprint.jar b/lib/autoreplyprint.jar index b5c36a5..e69de29 100644 Binary files a/lib/autoreplyprint.jar and b/lib/autoreplyprint.jar differ diff --git a/src/main/resources/autoreplyprint/linux-x64/.gitignore b/src/main/resources/autoreplyprint/linux-x64/.gitignore deleted file mode 100644 index a093304..0000000 --- a/src/main/resources/autoreplyprint/linux-x64/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -autoreplyprint.h -libautoreplyprint.so* - diff --git a/src/main/resources/autoreplyprint/linux-x64/dependencies.txt b/src/main/resources/autoreplyprint/linux-x64/dependencies.txt deleted file mode 100644 index 1d2cbd0..0000000 --- a/src/main/resources/autoreplyprint/linux-x64/dependencies.txt +++ /dev/null @@ -1,2 +0,0 @@ -ldd libautoreplyprint.so - diff --git a/src/main/resources/autoreplyprint/linux-x64/update.sh b/src/main/resources/autoreplyprint/linux-x64/update.sh deleted file mode 100644 index 91b430e..0000000 --- a/src/main/resources/autoreplyprint/linux-x64/update.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cp ../../../autoreplyprint_src/autoreplyprint_main/autoreplyprint.h . -cp ../../build-autoreplyprint-Qt_5_6_3_x64_static-Release/libautoreplyprint.so* . - diff --git a/src/main/resources/autoreplyprint/linux-x86/.gitignore b/src/main/resources/autoreplyprint/linux-x86/.gitignore deleted file mode 100644 index a093304..0000000 --- a/src/main/resources/autoreplyprint/linux-x86/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -autoreplyprint.h -libautoreplyprint.so* - diff --git a/src/main/resources/autoreplyprint/linux-x86/dependencies.txt b/src/main/resources/autoreplyprint/linux-x86/dependencies.txt deleted file mode 100644 index 1d2cbd0..0000000 --- a/src/main/resources/autoreplyprint/linux-x86/dependencies.txt +++ /dev/null @@ -1,2 +0,0 @@ -ldd libautoreplyprint.so - diff --git a/src/main/resources/autoreplyprint/linux-x86/update.sh b/src/main/resources/autoreplyprint/linux-x86/update.sh deleted file mode 100644 index 5321ae7..0000000 --- a/src/main/resources/autoreplyprint/linux-x86/update.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cp ../../../autoreplyprint_src/autoreplyprint_main/autoreplyprint.h . -cp ../../build-autoreplyprint-Qt_5_6_3_x86_static-Release/libautoreplyprint.so* . - diff --git a/src/main/resources/autoreplyprint/mac/.gitignore b/src/main/resources/autoreplyprint/mac/.gitignore deleted file mode 100644 index 92f6b40..0000000 --- a/src/main/resources/autoreplyprint/mac/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -autoreplyprint.h -libautoreplyprint*.dylib - diff --git a/src/main/resources/autoreplyprint/mac/dependencies.txt b/src/main/resources/autoreplyprint/mac/dependencies.txt deleted file mode 100644 index 1d2cbd0..0000000 --- a/src/main/resources/autoreplyprint/mac/dependencies.txt +++ /dev/null @@ -1,2 +0,0 @@ -ldd libautoreplyprint.so - diff --git a/src/main/resources/autoreplyprint/mac/update.sh b/src/main/resources/autoreplyprint/mac/update.sh deleted file mode 100644 index e3c354b..0000000 --- a/src/main/resources/autoreplyprint/mac/update.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cp ../../../autoreplyprint_src/autoreplyprint_main/autoreplyprint.h . -cp ../../build-autoreplyprint-Desktop_Qt_5_12_0_clang_64bit-Release/libautoreplyprint*.dylib . - diff --git a/src/main/resources/autoreplyprint/win32/.gitignore b/src/main/resources/autoreplyprint/win32/.gitignore deleted file mode 100644 index f030e1c..0000000 --- a/src/main/resources/autoreplyprint/win32/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -autoreplyprint.dll -autoreplyprint.exp -autoreplyprint.lib -autoreplyprint.h diff --git a/src/main/resources/autoreplyprint/win32/copydll.bat b/src/main/resources/autoreplyprint/win32/copydll.bat deleted file mode 100644 index c58d561..0000000 --- a/src/main/resources/autoreplyprint/win32/copydll.bat +++ /dev/null @@ -1,4 +0,0 @@ -copy ..\..\build-autoreplyprint-QT5_6_3_VC2015_STATIC_32-Release\release\autoreplyprint.dll . /y -copy ..\..\build-autoreplyprint-QT5_6_3_VC2015_STATIC_32-Release\release\autoreplyprint.exp . /y -copy ..\..\build-autoreplyprint-QT5_6_3_VC2015_STATIC_32-Release\release\autoreplyprint.lib . /y -copy ..\..\..\autoreplyprint_src\autoreplyprint_main\autoreplyprint.h . /y diff --git a/src/main/resources/autoreplyprint/win64/.gitignore b/src/main/resources/autoreplyprint/win64/.gitignore deleted file mode 100644 index f030e1c..0000000 --- a/src/main/resources/autoreplyprint/win64/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -autoreplyprint.dll -autoreplyprint.exp -autoreplyprint.lib -autoreplyprint.h diff --git a/src/main/resources/autoreplyprint/win64/copydll.bat b/src/main/resources/autoreplyprint/win64/copydll.bat deleted file mode 100644 index 50e0ea7..0000000 --- a/src/main/resources/autoreplyprint/win64/copydll.bat +++ /dev/null @@ -1,4 +0,0 @@ -copy ..\..\build-autoreplyprint-QT5_6_0_VC2015_STATIC_64-Release\release\autoreplyprint.dll . /y -copy ..\..\build-autoreplyprint-QT5_6_0_VC2015_STATIC_64-Release\release\autoreplyprint.exp . /y -copy ..\..\build-autoreplyprint-QT5_6_0_VC2015_STATIC_64-Release\release\autoreplyprint.lib . /y -copy ..\..\..\autoreplyprint_src\autoreplyprint_main\autoreplyprint.h . /y diff --git a/src/main/resources/autoreplyprint/目录说明.txt b/src/main/resources/autoreplyprint/目录说明.txt deleted file mode 100644 index 1aa3caa..0000000 --- a/src/main/resources/autoreplyprint/目录说明.txt +++ /dev/null @@ -1,10 +0,0 @@ -考虑到应用场景 -1 WIN10系统编译32位,64位动态库。 - 可能要到XP系统下面去使用,开发例子程序。 - 比如VS2005 C++ C# - 也可能去其他系统下面使用,开发例子程序。 -2 可能要生成多种系统下的库,一起放到某个位置 - -考虑到以上应用场景 -1 决定每个目录单独一个文件夹,同时包括头文件和库文件。 -2 使用的时候,直接目录复制过去即可使用。 diff --git a/src/main/resources/win32-x86-64/SSSE32.H b/src/main/resources/win32-x86-64/SSSE32.H deleted file mode 100644 index 5808cab..0000000 --- a/src/main/resources/win32-x86-64/SSSE32.H +++ /dev/null @@ -1,350 +0,0 @@ -#ifndef SSSE32_H -#define SSSE32_H -#include -#include - -//״̬�� -#define IFD_OK 0 //ִ�гɹ� -#define IFD_ICC_TypeError -1 //��Ƭ���Ͳ��� -#define IFD_ICC_NoExist -2 //�޿� -#define IFD_ICC_NoPower -3 //�п�δ�ϵ� -#define IFD_ICC_NoResponse -4 //��Ƭ��Ӧ�� -#define IFD_ConnectError -11 //���������Ӵ� -#define IFD_UnConnected -12 //δ��������(û��ִ�д��豸����) -#define IFD_BadCommand -13 //(��̬��)��֧�ָ����� -#define IFD_ParameterError -14 //(������̬���)��������� -#define IFD_CheckSumError -15 //��ϢУ��ͳ��� -#define IFD_OutTime -20 //��ϢУ��ͳ��� -#define IFD_False -21 //����ִ��ʧ�� - - -#ifdef __cplusplus -extern "C" { -#endif -// -/*############�豸��������#################*/ -long WINAPI ICC_Reader_Open(char* dev_Name); -long WINAPI ICC_Reader_Close(long ReaderHandle); -long WINAPI ICC_PosBeep(long ReaderHandle, unsigned char time);//���� -long WINAPI ICC_Reader_EnterDFU (long ReaderHandle); //����USB���س���״̬ -long WINAPI ICC_Reader_LeaveDFU (long ReaderHandle); //�뿪USB���س���״̬ -long WINAPI ICC_Reader_Libinfo(char* info); -long WINAPI ICC_Reader_ReadEEPROM (long ReaderHandle,int offset,int length,unsigned char *buffer);//��eeprom��ȡ���� -long WINAPI ICC_Reader_WriteEEPROM (long ReaderHandle,int offset,int length,unsigned char *buffer);//��eepromд������ -long WINAPI ICC_Machine_Reset(long ReaderHandle); -void WINAPI ICC_Reader_PPS(bool IsEnable); -long WINAPI ICC_Reader_GetDeviceVersion(long ReaderHandle, unsigned char *VDate); -long WINAPI ICC_Reader_GetKeybordVersion(long ReaderHandle,char *VDate); - -long WINAPI ICC_Reader_GetDeviceSN(long ReaderHandle,char* dev_Ser); //��ȡ�豸���кţ����豸��ȡ -long WINAPI ICC_Reader_SetDeviceSN(long ReaderHandle,char* dev_Ser); //�����豸���к� - -long WINAPI ICC_Reader_ContatctInfo(long ReaderHandle,char *VDate); //��ȡ�Ӵ����ܱ� -long WINAPI ICC_Reader_NoContatctInfo(long ReaderHandle,char *VDate);//��ȡ�ǽӹ��ܱ� -long WINAPI ICC_Reader_GetDeviceCSN(long ReaderHandle,unsigned char *data); -long WINAPI ICC_DispInfo(long ReaderHandle,unsigned char row,unsigned char list,char *data); //��ʾ��Ϣ -long WINAPI ICC_DispSound(long ReaderHandle,unsigned char type,unsigned char nMode); //������ʾ��Ϣ type(1~14) nMode==0���ü���������nMode==1���ü������� -/* - 1����忨 2����ˢ�� 3���������� 4������������ 5��������� 6�������ɹ� 7��������ʱ 8������ʧ�� 9����ȡ�ؿ� 10���������������� 11�����ٴ��������� 12�������������� 13������������� 14����ȷ�������� -*/ - -long WINAPI ICC_CtlLight(long ReaderHandle);//���������� -long WINAPI ICC_ChangeLight(long ReaderHandle,unsigned char mode);//�ı���Ļ���� mode=1 ���� mode=0���� -long WINAPI ICC_GetInputPass(long ReaderHandle, unsigned char ctime, unsigned char *rlen, unsigned char start,unsigned char stop,unsigned char * cpass);//��ȡ���룬����ʱ start==0�����ü��̣�start==1�����ü��� -long WINAPI ICC_GetInputPassID(long ReaderHandle, unsigned char ctime, unsigned char *rlen, unsigned char start,unsigned char stop,unsigned char * cardID,unsigned char * cpass);//��ȡ���룬����ʱ,��ID -long WINAPI ICC_GetTimeOut(long ReaderHandle,unsigned char flag);//��ȡ���롢��������ʱ -long WINAPI ICC_PassGet(long ReaderHandle,unsigned char *rlen,unsigned char time,unsigned char start,unsigned char stop,unsigned char * cpass);//��ȡ���� -long WINAPI ICC_PassGetID(long ReaderHandle,unsigned char *rlen,unsigned char time,unsigned char start,unsigned char stop,unsigned char * cardID,unsigned char * cpass);//��ȡ���룬������ -long WINAPI ICC_PassCheck(long ReaderHandle,unsigned char *rlen,unsigned char * cpass); //���������Ƿ��� -long WINAPI ICC_PassSetDES(long ReaderHandle,unsigned char DES); //���ü���ģʽ3des or des -long WINAPI ICC_PassSetDevID(long ReaderHandle,unsigned char *devID);//���ü����豸ID -long WINAPI ICC_PassGetDevID(long ReaderHandle,unsigned char *devID);//��ȡ�����豸ID -long WINAPI ICC_PassSetKeyLen(long ReaderHandle,unsigned char len);//�������볤�� -long WINAPI ICC_Reader_Auto(long ReaderHandle,int t_IntType); -long WINAPI PICC_Reader_ID_N(long ReaderHandle,unsigned char *GetData); -/*###############################################*/ - -long WINAPI ICC_PassGetSG(long ReaderHandle,unsigned char *rlen,unsigned char * cpass); -long WINAPI ICC_GetInputPassSG(long ReaderHandle, unsigned char *rlen,unsigned char * cpass); - -/*############�Ӵ�CPU��������#################*/ -long WINAPI ICC_Reader_pre_PowerOn(long ReaderHandle,unsigned char ICC_Slot_No,unsigned char* Response);//�ϵ� �� �������ݳ��� -long WINAPI ICC_Reader_hot_PowerOn(long ReaderHandle,unsigned char ICC_Slot_No,unsigned char* Response);//�ϵ� �� �������ݳ��� - -long WINAPI ICC_Reader_Zpre_PowerOn(long ReaderHandle,unsigned char ICC_Slot_No,unsigned char* Response);//ס����С�� -long WINAPI ICC_Reader_PowerOn(long ReaderHandle,unsigned char ICC_Slot_No,unsigned char* Response);//�ϵ� �������ݳ��� ��+�� -long WINAPI ICC_Reader_PowerOnHEX(long ReaderHandle,unsigned char ICC_Slot_No,unsigned char* Response);//�ϵ� ��+�� �������ݳ��� -/* - ����ICC_Slot_No��0x01 - SAM1:0x11 - SAM2:0x12 - SAM3:0x13 - SAM4:0x14 - ��ͬ - -*/ -long WINAPI ICC_Reader_PowerOff(long ReaderHandle,unsigned char ICC_Slot_No);//�µ� - -long WINAPI ICC_Reader_GetStatus(long ReaderHandle,unsigned char ICC_Slot_No);//��ȡ����״̬ - -long WINAPI ICC_Reader_Application(long ReaderHandle,unsigned char ICC_Slot_No, - long Lenth_of_Command_APDU,unsigned char* Command_APDU, - unsigned char* Response_APDU); //ִ��apdu���� �������ݳ��� - -long WINAPI ICC_Reader_LongApplication(long ReaderHandle,unsigned char ICC_Slot_No, - long Lenth_of_Command_APDU,unsigned char* Command_APDU, - unsigned char* Response_APDU); //ִ��apdu���� �������ݳ��� - -//cpuetu=01��02��03��04����IJ����ʷֱ�Ϊ9600��19200��38400��115200 -//unsigned char cpupro ---- ����Э������ =0��ʾT=0Э�� =1��ʾT=1Э�� -long WINAPI ICC_SetCpupara(long ReaderHandle,unsigned char ICC_Slot_No,unsigned char cpupro,unsigned char cpuetu);//�������� -long WINAPI ICC_SetCpuETU(long ReaderHandle,unsigned char ICC_Slot_No,unsigned char cpupro,unsigned char cpuetu);//�������� - - -long WINAPI PICC_Reader_SetTypeA(long ReaderHandle);//���ö�typeA -long WINAPI PICC_Reader_SetTypeB(long ReaderHandle);//���ö�typeB -long WINAPI PICC_Reader_Select(long ReaderHandle,unsigned char cardtype);//ѡ��Ƭ��41Ϊtypea,M1 42Ϊtypeb,TypeB��Ƭ�����ϵ��ѡ�� -long WINAPI PICC_Reader_Request(long ReaderHandle);//typea M1����Ƭ -long WINAPI PICC_Reader_RFControl(long ReaderHandle,short flag);//flag=0 �ر����� flag=1 ������ -long WINAPI PICC_Reader_anticoll(long ReaderHandle,unsigned char *uid);//����ײ typea M1��Ƭ - -/*############ M1����������#################*/ -long WINAPI PICC_Reader_M1Rest(long ReaderHandle,unsigned char *uid); -long WINAPI PICC_Reader_Authentication(long ReaderHandle,unsigned char Mode, unsigned char SecNr);//��֤��Կ M1 -long WINAPI PICC_Reader_Authentication_Pass(long ReaderHandle,unsigned char Mode, unsigned char SecNr,unsigned char *PassWord);//��֤��ԿM1 ����Կ���� -long WINAPI PICC_Reader_Readval(long ReaderHandle,unsigned char Addr,unsigned long *value); //��ֵ -long WINAPI PICC_Reader_Initval(long ReaderHandle,unsigned char Addr,unsigned long value);//��ʼ��ֵ -long WINAPI PICC_Reader_Increment(long ReaderHandle,unsigned char Addr,unsigned long value); //��ֵ -long WINAPI PICC_Reader_Decrement(long ReaderHandle,unsigned char Addr,unsigned long value);//��ֵ -long WINAPI PICC_Reader_Read(long ReaderHandle,unsigned char Addr,unsigned char *Data); //��ȡ��ƬM1 -long WINAPI PICC_Reader_Write(long ReaderHandle,unsigned char Addr,unsigned char *Data);//д������M1 -long WINAPI PICC_Reader_LoadKey(long ReaderHandle,unsigned char Mode,unsigned char SecNr,unsigned char *Key);//װ����Կ -long WINAPI PICC_Reader_ReadHEX(long ReaderHandle,unsigned char Addr,unsigned char *DataHex); //��ȡ��ƬM1 - -long WINAPI PICC_Reader_WriteHEX(long ReaderHandle,unsigned char Addr,unsigned char *DataHex);//д������M1 -/* -SecNr:������ -Mode��01 02 03 �ֱ�Ϊ��һ������������ԿKeyA -04 05 06 �ֱ�Ϊ��һ������������ԿKEYB -*/ -/*############ ID ���� #####################################*/ -long WINAPI PICC_Reader_IdCard(long ReaderHandle,unsigned char *Number); - -/*############ TypeA CPU ���������� #################*/ -long WINAPI PICC_Reader_PowerOnTypeA(long ReaderHandle,unsigned char* Response);//�ϵ� �������ݳ��� ʧ��С��0 - -/*############ TypeB CPU ����������#################*/ -long WINAPI PICC_Reader_PowerOnTypeB(long ReaderHandle,unsigned char* Response);//�ϵ� �������ݳ��� ʧ��С��0 -long WINAPI ICC_Reader_ApplicationHEX(long ReaderHandle,unsigned char ICC_Slot_No, - char* Command_APDU, - char* Response_APDU); //ִ��apdu���� �������ݳ��� - - -long WINAPI PICC_Reader_Application(long ReaderHandle, - long Lenth_of_Command_APDU,unsigned char* Command_APDU, - unsigned char* Response_APDU); //type a/bִ��apdu���� �������ݳ��� ʧ��С��0 - -long WINAPI HD_USBkey(long ReaderHandle,unsigned char _Adr, int len);//ģ����� - -//############################### ���� Flash ########################################################## -long WINAPI ICC_Reader_ReadFlash(long ReaderHandle,int offset,int len,unsigned char *data); -long WINAPI ICC_Reader_WriteFlash(long ReaderHandle,int offset,int len,unsigned char *data); - -//############################### �����֤ ############################################################ - -long WINAPI PICC_Read_SAM(long ReaderHandle,unsigned char* strSam); -long WINAPI Base64_encode(char *bytes_to_encode, int in_len,int *out_len,char * t_outpData);//Base64���� - -long WINAPI iReadCertInfo(long m_hReader,int iType, char *pPhotoPath, char *pPhotoData, char *Info); -long WINAPI PICC_Reader_ID_Request(long ReaderHandle);//���֤Ѱ�� -long WINAPI PICC_Reader_ID_Select(long ReaderHandle);//���֤ѡ�� -long WINAPI PICC_Reader_ID_Read(long ReaderHandle,unsigned char* Response);//���֤���� -long WINAPI PICC_Reader_ID_Read2(long ReaderHandle,unsigned char *data);/*��ȡ���֤ ��Ӷ�ȡָ����Ϣ*/ -long WINAPI PICC_Reader_Read_CardID(long ReaderHandle,unsigned char* Response);//�����֤ID -long WINAPI PICC_Reader_ReadIDMsgWG(long ReaderHandle, const char* pBmpFile, char *pName, char *pSex, char *pNation, char *pBirth, char *pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char *pExpire,char * pErrMsg,char * cardtype); -long WINAPI PICC_Reader_ReadIDMsg(long ReaderHandle, const char* pBmpFile, char *pName, char *pSex, char *pNation, char *pBirth, char *pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char *pExpire,char * pErrMsg); -long WINAPI PICC_Reader_ReadIDInfo(long ReaderHandle, const char* pBmpFile, char *pName, char *pSex, char *pNation, char *pBirth, char *pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char *pExpire,char * pErrMsg); -long WINAPI PICC_Reader_ReadIDMsg2(long ReaderHandle, char *pName, char *pSex, char *pNation, char *pBirth, char *pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char *pExpire,unsigned char * tupian,char * pErrMsg);//ͼƬ��Ϣ�洢��tupian���� -long WINAPI PICC_Reader_ReadIDInfo2(long ReaderHandle,const char* pBmpFile,char *pName, char *pSex, char *pNation, char *pBirth, char *pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char *pExpire,char *pFing,char * pErrMsg,char *pCardDex,char *pOrganID,char *txzhm , char * qfcs); -long WINAPI PICC_Reader_ID_CertInfo (long ReaderHandle, const char*pBmpFile, char *pName, char *pSex, char *pNation, char *pBirth, char*pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char*pExpire, char *pPassPortNO, char *pSignTimes, char *pIDType, char*PhotoInBase64 ); -//��Ӷ�ȡָ����Ϣ ���pBmpFile==NULL����������Ƭ������������Ƭ�������봫��·�������磺C:/zhaopian/zp.bmp -long WINAPI PICC_Reader_ReadIDPhotoInfo(long ReaderHandle, char* pBmpFileData, char *pName, char *pSex, char *pNation, char *pBirth, char *pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char *pExpire,char * pErrMsg); - -//################################����������################################################################ -long WINAPI Rcard(long ReaderHandle,unsigned char ctime,int track,unsigned char *rlen,unsigned char *getdata);//�������� -long WINAPI ICC_Reader_GetMagCardMode(long ReaderHandle,unsigned char *GetData); //��ȡ�������ģʽ -long WINAPI ICC_Reader_SetMagCardMode(long ReaderHandle,int mode, unsigned char* InData); //���ô������ģʽ -long WINAPI PICC_Reader_SetMsg(long ReaderHandle ,unsigned char t_flag, unsigned char *SendData,int t_len, unsigned char *GetData); - - -//////////////////////////////////////////////////////////////////////////2G 20170411 -long WINAPI PICC_Reader_2G_IPCtrl(long ReaderHandle,unsigned char type,unsigned char cIPlen,unsigned char *ipData,unsigned char cPortlen,unsigned char *portData);//����IP -long WINAPI PICC_Reader_2G_TimeCON(long ReaderHandle,unsigned char TimeConfig);//����ʱ�� -long WINAPI PICC_Reader_2G_IPState(long ReaderHandle,unsigned char typeState);//����ʱ�� - -long WINAPI ICC_GetInputPassEx(long ReaderHandle, unsigned char ctime, int *rlen, unsigned char * cpass, int disinfo,unsigned char type);//xians yuyin - -//////////////////////////////////////////////////////////////////////////20170712 - -long WINAPI PICC_Reader_OpenClose(long ReaderHandle,unsigned char typeState) ;//�������� - -/*######################ɨ�����λ############*/ -long WINAPI ICC_CtrScanCode(long ReaderHandle,int InFlag, int WFlag) ; -long WINAPI ICC_ScanCodeSM(long ReaderHandle, int time ,unsigned char*pCodeInfo,int WFlag); - - - -long WINAPI ICC_ScanCodeStar(long ReaderHandle, unsigned char*pCodeInfo,int WFlag); - -long WINAPI ICC_ScanCodeStop(long ReaderHandle ,unsigned char*pCodeInfo,int WFlag); - -long WINAPI ICC_ScanCodeRead(long ReaderHandle, unsigned char*pCodeInfo); - -long WINAPI StrToHex(unsigned char *Src, int len,unsigned char *Des); -long WINAPI HexToStr(unsigned char *Src,int len,unsigned char *Des ); -/*#####################��Ļ��ʾ#####################*/ - -long WINAPI ICC_Reader_DownloadPhoto(long ReaderHandle,int Pnumber, char* Addr); -long WINAPI ICC_Reader_DownloadParamControl(long ReaderHandle,int FlagNO, long TimeData ); -long WINAPI ICC_Reader_ShowQRCode(long ReaderHandle,long momey, int lent,unsigned char * Addr ); -long WINAPI ICC_Reader_CloseQRCode(long ReaderHandle ); - -long WINAPI ICC_GetBankCardNo(long ReaderHandle,int nType,unsigned char* bankCardNo,int* bankCardNoLen) ;//���п����� nType = 0x00 ѡ��Ӵ�����0x01ѡ��ǽӿ� ����0λִ�гɹ�����0ʧ�� -long WINAPI PICC_Reader_SSCardInfo1(long ReaderHandle,unsigned char* pSSCardID ,unsigned char* pIDNum , unsigned char* pName ,unsigned char* pSex ,unsigned char* pBorn ) ; - -long WINAPI PICC_Reader_SSCard(long ReaderHandle,unsigned char* pSSCardID ); - -long WINAPI ReadMifare(long ReaderHandle,int block,unsigned char * password, unsigned char* ReData); - -long WINAPI WriteMifare(long ReaderHandle,int block,unsigned char * password, unsigned char* ReData); - -long WINAPI PICC_Reader_GATIDMsg(long ReaderHandle, const char* pBmpFile, char *pName, char *pSex , char *pBirth, char *pAddress, char *pCertNo, char *pDepartment , char *pEffectData, char *pExpire,char * txIDNO , char * number,char* zhengjialx,char * pErrMsg); -/*###############################��������#######################*/ - - -int WINAPI IC_Init(int Port); //���豸���� -int WINAPI IC_Exit(); //�ر��豸���� -int WINAPI IC_CardRead(const char *file_name, char *data); //��ȡ��Ƭ�ļ� ������� file_name ��Ҫ��ȡ�ļ����� ����0001 -int WINAPI IC_CardNo(char *data); //��ȡ��Ƭ���к� -int WINAPI IC_CardInfo(char *data); //��ȡ�û�����Ƭ��Ϣ -int WINAPI IC_CardRandom(char *data); //��ȡ��Ƭ����� -int WINAPI IC_CardWrite(const char *info); //д�� info�����뱨����Ϣ��ע�����Ҫ��14�����ݣ�Ҳ������14����|���ָ���磺1|2|3|4|5|6|7|8|9|10|11|12|13|14|�� -int WINAPI ICC_GetStatus(int so); -/*##################4428*/ -/*############ 4428 ������������#################*/ - -long WINAPI ICC_Reader_4428_PowerOn(long ReaderHandle,unsigned char *data); //4428���ϵ� -long WINAPI ICC_Reader_4428_PowerOnHEX(long ReaderHandle,unsigned char *dataHex); //4428���ϵ磬����HEX�� -long WINAPI ICC_Reader_4428_PowerOff(long ReaderHandle); //4428���µ� -long WINAPI ICC_Reader_4428_Read(long ReaderHandle,int offset,int len,unsigned char *data); //4428�������� -long WINAPI ICC_Reader_4428_ReadHEX(long ReaderHandle,int offset,int len,unsigned char *dataHex); //4428�������ݣ�����HEX�� -long WINAPI ICC_Reader_4428_Write(long ReaderHandle,int offset,int len,unsigned char *data); //4428��д���� -long WINAPI ICC_Reader_4428_WriteHEX(long ReaderHandle,int offset,int len,unsigned char *dataHEX); //4428��д���ݣ�����HEX�� -long WINAPI ICC_Reader_4428_Verify(long ReaderHandle,unsigned char *key); //4428����֤��Կ -long WINAPI ICC_Reader_4428_VerifyHEX(long ReaderHandle,unsigned char *keyHex); //4428����֤��Կ��������ԿΪHEX�� -long WINAPI ICC_Reader_4428_Change(long ReaderHandle,unsigned char *newkey); //4428���޸���Կ -long WINAPI ICC_Reader_4428_ChangeHEX(long ReaderHandle,unsigned char *newkeyHex); //4428���޸���Կ��������ԿΪHEX�� -long WINAPI ICC_Reader_4428_ReadProtect(long ReaderHandle,int offset,int len,unsigned char *data); //4428������������ -long WINAPI ICC_Reader_4428_WriteProtect(long ReaderHandle,int offset,int len,unsigned char *data); //4428��д�������� -long WINAPI ICC_Reader_4428_ReadCount(long ReaderHandle); //��ȡ4428����Կʣ����֤���� ���ش���0~8�� - - - -/*############ 4442������������#################*/ -long WINAPI ICC_Reader_ChangeSlot(long ReaderHandle,unsigned char icc_slot_no);/*�л���2��2������*/ -long WINAPI ICC_Reader_4442_PowerOn(long ReaderHandle,unsigned char *data); //4442���ϵ� �������ݳ��� -long WINAPI ICC_Reader_4442_PowerOff(long ReaderHandle); //4442���µ� -long WINAPI ICC_Reader_4442_Read(long ReaderHandle,int offset,int len,unsigned char *data); //4442�������� -long WINAPI ICC_Reader_4442_Write(long ReaderHandle,int offset,int len,unsigned char *data); //4442��д���� -long WINAPI ICC_Reader_4442_Verify(long ReaderHandle,unsigned char *key); //4442����֤��Կ -long WINAPI ICC_Reader_4442_Change(long ReaderHandle,unsigned char *newkey); //4442���޸���Կ -long WINAPI ICC_Reader_4442_ReadProtect(long ReaderHandle,int offset,int len,unsigned char *data); //4442������������ -long WINAPI ICC_Reader_4442_WriteProtect(long ReaderHandle,int offset,int len,unsigned char *data); //4442��д�������� -long WINAPI ICC_Reader_4442_ReadCount(long ReaderHandle); //��ȡ4442����Կʣ����֤���� ���ش���0~3�� - - -long WINAPI ICC_Reader_4442_ReadData(long ReaderHandle,int offset,int len,unsigned char *data); - -long WINAPI ICC_Reader_4442_WriteData(long ReaderHandle,unsigned char *key,int offset,int len,unsigned char *data); - - - - - -/*############ 15693 ����������#################*/ - -long WINAPI PICC_Reader_Inventory(long ReaderHandle,unsigned char* Response_APDU);//������ͨ������ͻ���ڵõ��������������п�Ƭ�����к� -long WINAPI PICC_Reader_15693_Read(long ReaderHandle,unsigned char blk_add,unsigned char* Response_APDU);//������ȡ1��������ֵ -long WINAPI PICC_Reader_15693_Write(long ReaderHandle,unsigned char blk_add,unsigned char* data, - unsigned char* Response_APDU);//��һ�������д������ÿ��ֻ��дһ���飩 -long WINAPI PICC_Reader_API(long ReaderHandle,unsigned char* data,unsigned char* Response_APDU);//Data[0] 0����дAPI,1������API -long WINAPI PICC_Reader_DSFID(long ReaderHandle,unsigned char* data,unsigned char* Response_APDU);//Data[0] 0����дDSFID,1������DSFID -long WINAPI PICC_Reader_LockDataBlock(long ReaderHandle,unsigned char blk_add,unsigned char* Response_APDU);//�������������ݡ�ע�⣺�˹��̲����棨���ܽ����������������ݲ������޸ġ� -long WINAPI PICC_Reader_SystemInfor(long ReaderHandle,unsigned char *Response_APDU);//���ڵõ�������ϸ��Ϣ - - -long WINAPI ICC_Reader_ICData(long ReaderHandle,char * Name, char * CardNo, char * ID , char* ksbm,char * gmbb); -long WINAPI hs_ReadMFEF06(HANDLE icdev,char *IDnum,char *name,char *exname,char *sex,char *nation,char *addr,char *birthday); -long WINAPI hs_ReadMFEF05(HANDLE icdev,char *pincode,char *cardtype,char *version,char *orgnum,char *starttime,char *endtime,char *cardnum); - -long WINAPI ReadSiHB(long ReaderHandle , char* SiCode,char*Ver,char*CardNo,char*IdNo,char* Name,char*Sex); -long WINAPI PICC_Reader_SSCardSZID(long ReaderHandle , char* pIDNum ); -long WINAPI PICC_Reader_SFZID(long ReaderHandle, char *pCertNo,char * pErrMsg); -long WINAPI PICC_Reader_selectType(long ReaderHandle,char* TypeID); -long WINAPI ICC_ScanCode(long ReaderHandle, unsigned char*pCodeInfo, int outTine); -long WINAPI iReadCardBas(int iType, char* pOutInfo); -long WINAPI iReadCardBas_HSM_Step1(int iType, char* pOutInfo); -long WINAPI iReadCardBas_HSM_Step2(char *pKey, char* pOutInfo); -long WINAPI iGetDevUID(char *pOutInfo); -long WINAPI ICC_SelscetScan(long ReaderHandle, unsigned char*pCodeInfo , int * lent); -long WINAPI ICC_StopSelscetScan(long ReaderHandle); -long WINAPI PICC_IDCard_Read(long ReaderHandle,const char *pcBmpPath, char *pcTypeID, char *Info, char *pcErrMsg); - - -int WINAPI iOpenPort( char * pErrMsg); -int WINAPI iClosePort(char* pErrMsg); -int WINAPI iReadPin (int pCtrlType,int outtime, char* pErrMsg ,char *pInputPin); - -long WINAPI ixunReader(char *pInputPin); -long WINAPI PICC_Reader_ReadIDCard(long ReaderHandle,char * msg); -int WINAPI GetCardType(); -int WINAPI GetName(char * Info); -int WINAPI GetSex(char * Info); -int WINAPI GetNation(char * Info); -int WINAPI GetBirth(char * Info); -int WINAPI GetAddress(char * Info); -int WINAPI GetCertNo(char * Info); -int WINAPI GetDepartemt(char * Info); -int WINAPI GetEffectDate(char * Info); -int WINAPI GetExpireDate(char * Info); -int WINAPI GetBmpFileData(char * Info); -int WINAPI GetBmpFile(char* pBmpfilepath); -int WINAPI IsFingerExist(); -int WINAPI GetFingerprint(unsigned char* fpInfo); -int WINAPI GetEnName(char * Info); -int WINAPI GetNationalityCode(char * Info); -int WINAPI GetTXZHM(char * Info); -int WINAPI GetTXZQFCS(char * Info); -int WINAPI GetHZCS(char * Info); - - -int WINAPI OpenReader(int a1); -int WINAPI CloseReader(); -int WINAPI CardRest(int a1, char * a2, int *a3); -int WINAPI SendCmd(int a1, char *a2, char *a3); -bool WINAPI CardHalt(); -int WINAPI ReadIDPic(int a1, char * a2); -int WINAPI HD_PosBeep(int a1); - -/*********************���п�*************************************/ -int ICC_GetInfo(long ReaderHandle,int nType,char *TagList, char *AIDList,char *UserInfo); -int ICC_GetTxDetail(long ReaderHandle,int nType,char *AIDList,char *TrDtail); -int ICC_GenARQC(long ReaderHandle,int nType ,char *TxData,char *AIDList,char *ARQCLen,char *ascARQC,char *hexARQC); -int ICC_ARPC_ExeICScript(long ReaderHandle,int nType,char *TxData,char *ARPCLen, char *hexARPC,char *Status,char *TC, char *ScriptResult); - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/main/resources/win32-x86-64/SSSE32.lib b/src/main/resources/win32-x86-64/SSSE32.lib deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/resources/win32-x86-64/autoreplyprint.dll b/src/main/resources/win32-x86-64/autoreplyprint.dll deleted file mode 100644 index 46f232f..0000000 Binary files a/src/main/resources/win32-x86-64/autoreplyprint.dll and /dev/null differ diff --git a/src/main/resources/win32-x86-64/autoreplyprint.exp b/src/main/resources/win32-x86-64/autoreplyprint.exp deleted file mode 100644 index 7704d7f..0000000 Binary files a/src/main/resources/win32-x86-64/autoreplyprint.exp and /dev/null differ diff --git a/src/main/resources/win32-x86-64/autoreplyprint.h b/src/main/resources/win32-x86-64/autoreplyprint.h deleted file mode 100644 index 49aea2c..0000000 --- a/src/main/resources/win32-x86-64/autoreplyprint.h +++ /dev/null @@ -1,3405 +0,0 @@ - -#ifndef AUTOREPLYPRINT_H -#define AUTOREPLYPRINT_H - -//AUTOREPLYPRINT_API -#ifdef _MSC_VER - #ifdef AUTOREPLYPRINT_EXPORTS - #ifndef AUTOREPLYPRINT_API - #define AUTOREPLYPRINT_API __declspec(dllexport) - #endif - #else - #ifndef AUTOREPLYPRINT_API - #define AUTOREPLYPRINT_API __declspec(dllimport) - #endif - #endif -#else - #ifndef AUTOREPLYPRINT_API - #define AUTOREPLYPRINT_API - #endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef enum CP_ComDataBits { CP_ComDataBits_4 = 4, CP_ComDataBits_5 = 5, CP_ComDataBits_6 = 6, CP_ComDataBits_7 = 7, CP_ComDataBits_8 = 8 } CP_ComDataBits; - - -typedef enum CP_ComParity { CP_ComParity_NoParity, CP_ComParity_OddParity, CP_ComParity_EvenParity, CP_ComParity_MarkParity, CP_ComParity_SpaceParity } CP_ComParity; - - -typedef enum CP_ComStopBits { CP_ComStopBits_One, CP_ComStopBits_OnePointFive, CP_ComStopBits_Two } CP_ComStopBits; - - -typedef enum CP_ComFlowControl { CP_ComFlowControl_None, CP_ComFlowControl_XonXoff, CP_ComFlowControl_RtsCts, CP_ComFlowControl_DtrDsr } CP_ComFlowControl; - - -typedef enum CP_CharacterSet { - CP_CharacterSet_USA = 0, - CP_CharacterSet_FRANCE = 1, - CP_CharacterSet_GERMANY = 2, - CP_CharacterSet_UK = 3, - CP_CharacterSet_DENMARK_I = 4, - CP_CharacterSet_SWEDEN = 5, - CP_CharacterSet_ITALY = 6, - CP_CharacterSet_SPAIN_I = 7, - CP_CharacterSet_JAPAN = 8, - CP_CharacterSet_NORWAY = 9, - CP_CharacterSet_DENMARK_II = 10, - CP_CharacterSet_SPAIN_II = 11, - CP_CharacterSet_LATIN = 12, - CP_CharacterSet_KOREA = 13, - CP_CharacterSet_SLOVENIA = 14, - CP_CharacterSet_CHINA = 15 -} CP_CharacterSet; - - -typedef enum CP_CharacterCodepage { - CP_CharacterCodepage_CP437 = 0, - CP_CharacterCodepage_KATAKANA = 1, - CP_CharacterCodepage_CP850 = 2, - CP_CharacterCodepage_CP860 = 3, - CP_CharacterCodepage_CP863 = 4, - CP_CharacterCodepage_CP865 = 5, - CP_CharacterCodepage_WCP1251 = 6, - CP_CharacterCodepage_CP866 = 7, - CP_CharacterCodepage_MIK = 8, - CP_CharacterCodepage_CP755 = 9, - CP_CharacterCodepage_IRAN = 10, - CP_CharacterCodepage_CP862 = 15, - CP_CharacterCodepage_WCP1252 = 16, - CP_CharacterCodepage_WCP1253 = 17, - CP_CharacterCodepage_CP852 = 18, - CP_CharacterCodepage_CP858 = 19, - CP_CharacterCodepage_IRAN_II = 20, - CP_CharacterCodepage_LATVIAN = 21, - CP_CharacterCodepage_CP864 = 22, - CP_CharacterCodepage_ISO_8859_1 = 23, - CP_CharacterCodepage_CP737 = 24, - CP_CharacterCodepage_WCP1257 = 25, - CP_CharacterCodepage_THAI = 26, - CP_CharacterCodepage_CP720 = 27, - CP_CharacterCodepage_CP855 = 28, - CP_CharacterCodepage_CP857 = 29, - CP_CharacterCodepage_WCP1250 = 30, - CP_CharacterCodepage_CP775 = 31, - CP_CharacterCodepage_WCP1254 = 32, - CP_CharacterCodepage_WCP1255 = 33, - CP_CharacterCodepage_WCP1256 = 34, - CP_CharacterCodepage_WCP1258 = 35, - CP_CharacterCodepage_ISO_8859_2 = 36, - CP_CharacterCodepage_ISO_8859_3 = 37, - CP_CharacterCodepage_ISO_8859_4 = 38, - CP_CharacterCodepage_ISO_8859_5 = 39, - CP_CharacterCodepage_ISO_8859_6 = 40, - CP_CharacterCodepage_ISO_8859_7 = 41, - CP_CharacterCodepage_ISO_8859_8 = 42, - CP_CharacterCodepage_ISO_8859_9 = 43, - CP_CharacterCodepage_ISO_8859_15 = 44, - CP_CharacterCodepage_THAI_2 = 45, - CP_CharacterCodepage_CP856 = 46, - CP_CharacterCodepage_CP874 = 47, - CP_CharacterCodepage_TCVN3 = 48 -} CP_CharacterCodepage; - - -typedef enum CP_MultiByteEncoding { CP_MultiByteEncoding_GBK = 0, CP_MultiByteEncoding_UTF8 = 1, CP_MultiByteEncoding_BIG5 = 3, CP_MultiByteEncoding_ShiftJIS = 4, CP_MultiByteEncoding_EUCKR = 5 } CP_MultiByteEncoding; - - -typedef enum CP_ImageBinarizationMethod { CP_ImageBinarizationMethod_Dithering, CP_ImageBinarizationMethod_Thresholding, CP_ImageBinarizationMethod_ErrorDiffusion } CP_ImageBinarizationMethod; - - -typedef enum CP_ImageCompressionMethod { CP_ImageCompressionMethod_None, CP_ImageCompressionMethod_Level1, CP_ImageCompressionMethod_Level2 } CP_ImageCompressionMethod; - - -typedef enum CP_ImagePixelsFormat { - CP_ImagePixelsFormat_MONO = 1, - CP_ImagePixelsFormat_MONOLSB = 2, - CP_ImagePixelsFormat_GRAY8 = 3, - CP_ImagePixelsFormat_BYTEORDERED_RGB24 = 4, - CP_ImagePixelsFormat_BYTEORDERED_BGR24 = 5, - CP_ImagePixelsFormat_BYTEORDERED_ARGB32 = 6, - CP_ImagePixelsFormat_BYTEORDERED_RGBA32 = 7, - CP_ImagePixelsFormat_BYTEORDERED_ABGR32 = 8, - CP_ImagePixelsFormat_BYTEORDERED_BGRA32 = 9 -} CP_ImagePixelsFormat; - - -typedef enum CP_QRCodeECC { CP_QRCodeECC_L = 1, CP_QRCodeECC_M = 2, CP_QRCodeECC_Q = 3, CP_QRCodeECC_H = 4 } CP_QRCodeECC; - - -typedef enum CP_Pos_Alignment { CP_Pos_Alignment_Left, CP_Pos_Alignment_HCenter, CP_Pos_Alignment_Right } CP_Pos_Alignment; - - -typedef enum CP_Pos_BarcodeType { - CP_Pos_BarcodeType_UPCA = 0x41, - CP_Pos_BarcodeType_UPCE = 0x42, - CP_Pos_BarcodeType_EAN13 = 0x43, - CP_Pos_BarcodeType_EAN8 = 0x44, - CP_Pos_BarcodeType_CODE39 = 0x45, - CP_Pos_BarcodeType_ITF = 0x46, - CP_Pos_BarcodeType_CODEBAR = 0x47, - CP_Pos_BarcodeType_CODE93 = 0x48, - CP_Pos_BarcodeType_CODE128 = 0x49 -} CP_Pos_BarcodeType; - - -typedef enum CP_Pos_BarcodeTextPrintPosition { CP_Pos_BarcodeTextPrintPosition_None, CP_Pos_BarcodeTextPrintPosition_AboveBarcode, CP_Pos_BarcodeTextPrintPosition_BelowBarcode, CP_Pos_BarcodeTextPrintPosition_AboveAndBelowBarcode } CP_Pos_BarcodeTextPrintPosition; - - -typedef enum CP_Page_DrawDirection { CP_Page_DrawDirection_LeftToRight, CP_Page_DrawDirection_BottomToTop, CP_Page_DrawDirection_RightToLeft, CP_Page_DrawDirection_TopToBottom } CP_Page_DrawDirection; - - // Page mode draw functions (CP_Page_DrawXXX) - // Horizontal and vertical coordinates can be specified as -1 -2 -3 to indicate that the print is aligned -#ifndef MarcoDefinitionCPPageDrawAlignment -#define MarcoDefinitionCPPageDrawAlignment -#define CP_Page_DrawAlignment_Left -1 -#define CP_Page_DrawAlignment_HCenter -2 -#define CP_Page_DrawAlignment_Right -3 -#define CP_Page_DrawAlignment_Top -1 -#define CP_Page_DrawAlignment_VCenter -2 -#define CP_Page_DrawAlignment_Bottom -3 -#endif - - -typedef enum CP_Label_BarcodeType { - CP_Label_BarcodeType_UPCA = 0, - CP_Label_BarcodeType_UPCE = 1, - CP_Label_BarcodeType_EAN13 = 2, - CP_Label_BarcodeType_EAN8 = 3, - CP_Label_BarcodeType_CODE39 = 4, - CP_Label_BarcodeType_ITF = 5, - CP_Label_BarcodeType_CODEBAR = 6, - CP_Label_BarcodeType_CODE93 = 7, - CP_Label_BarcodeType_CODE128 = 8, - CP_Label_BarcodeType_CODE11 = 9, - CP_Label_BarcodeType_MSI = 10, - CP_Label_BarcodeType_128M = 11, - CP_Label_BarcodeType_EAN128 = 12, - CP_Label_BarcodeType_25C = 13, - CP_Label_BarcodeType_39C = 14, - CP_Label_BarcodeType_39 = 15, - CP_Label_BarcodeType_EAN13PLUS2 = 16, - CP_Label_BarcodeType_EAN13PLUS5 = 17, - CP_Label_BarcodeType_EAN8PLUS2 = 18, - CP_Label_BarcodeType_EAN8PLUS5 = 19, - CP_Label_BarcodeType_POST = 20, - CP_Label_BarcodeType_UPCAPLUS2 = 21, - CP_Label_BarcodeType_UPCAPLUS5 = 22, - CP_Label_BarcodeType_UPCEPLUS2 = 23, - CP_Label_BarcodeType_UPCEPLUS5 = 24, - CP_Label_BarcodeType_CPOST = 25, - CP_Label_BarcodeType_MSIC = 26, - CP_Label_BarcodeType_PLESSEY = 27, - CP_Label_BarcodeType_ITF14 = 28, - CP_Label_BarcodeType_EAN14 = 29 -} CP_Label_BarcodeType; - - -typedef enum CP_Label_BarcodeTextPrintPosition { CP_Label_BarcodeTextPrintPosition_None, CP_Label_BarcodeTextPrintPosition_AboveBarcode, CP_Label_BarcodeTextPrintPosition_BelowBarcode, CP_Label_BarcodeTextPrintPosition_AboveAndBelowBarcode } CP_Label_BarcodeTextPrintPosition; - - -typedef enum CP_Label_Rotation { CP_Label_Rotation_0, CP_Label_Rotation_90, CP_Label_Rotation_180, CP_Label_Rotation_270 } CP_Label_Rotation; - - -typedef enum CP_Label_Color { CP_Label_Color_White, CP_Label_Color_Black } CP_Label_Color; - - // ERROR_CUTTER - // Cutter error - // ERROR_FLASH - // FLASH error - // ERROR_NOPAPER - // No paper - // ERROR_VOLTAGE - // Voltage error - // ERROR_MARKER - // Black mark or seam mark error detected - // ERROR_ENGINE - // Unrecognized printer engine - // ERROR_OVERHEAT - // Overheat - // ERROR_COVERUP - // Open cover or shaft not pressed down - // ERROR_MOTOR - // Motor out of step (usually paper jam) - // INFO_LABELPAPER - // Current paper identified as label paper (0 is continuous paper) - // INFO_LABELMODE - // Currently in label mode - // INFO_HAVEDATA - // We have data to start processing - // INFO_NOPAPERCANCELED - // The last document was cancelled after it was short of paper - // INFO_PAPERNOFETCH - // The documents were not taken - // INFO_PRINTIDLE - // Current print idle - // INFO_RECVIDLE - // The current receive buffer is empty -#ifndef MarcoDefinitionCPPrinterStatus -#define MarcoDefinitionCPPrinterStatus -#define CP_PRINTERSTATUS_ERROR_CUTTER(error_status) (error_status & 0x01) -#define CP_PRINTERSTATUS_ERROR_FLASH(error_status) (error_status & 0x02) -#define CP_PRINTERSTATUS_ERROR_NOPAPER(error_status) (error_status & 0x04) -#define CP_PRINTERSTATUS_ERROR_VOLTAGE(error_status) (error_status & 0x08) -#define CP_PRINTERSTATUS_ERROR_MARKER(error_status) (error_status & 0x10) -#define CP_PRINTERSTATUS_ERROR_ENGINE(error_status) (error_status & 0x20) -#define CP_PRINTERSTATUS_ERROR_OVERHEAT(error_status) (error_status & 0x40) -#define CP_PRINTERSTATUS_ERROR_COVERUP(error_status) (error_status & 0x80) -#define CP_PRINTERSTATUS_ERROR_MOTOR(error_status) (error_status & 0x100) -#define CP_PRINTERSTATUS_INFO_LABELPAPER(info_status) (info_status & 0x02) -#define CP_PRINTERSTATUS_INFO_LABELMODE(info_status) (info_status & 0x04) -#define CP_PRINTERSTATUS_INFO_HAVEDATA(info_status) (info_status & 0x08) -#define CP_PRINTERSTATUS_INFO_NOPAPERCANCELED(info_status) (info_status & 0x10) -#define CP_PRINTERSTATUS_INFO_PAPERNOFETCH(info_status) (info_status & 0x20) -#define CP_PRINTERSTATUS_INFO_PRINTIDLE(info_status) (info_status & 0x40) -#define CP_PRINTERSTATUS_INFO_RECVIDLE(info_status) (info_status & 0x80) -#endif - - // The real-time state here is four bytes - // From low byte to high byte corresponds to these four instructions in the instruction set: - // 10 04 01 - // 10 04 02 - // 10 04 03 - // 10 04 04 - // For some models, due to customization or other reasons, the definition of state value may be inconsistent with here, subject to the actual measurement - // - // DRAWER_OPENED - // Drawer Opened - // OFFLINE - // Offline - // COVERUP - // Cover UP - // FEED_PRESSED - // Feed Pressed - // NOPAPER - // No Paper - // ERROR_OCCURED - // Error Occured - // CUTTER_ERROR - // Cutter Error - // UNRECOVERABLE_ERROR - // Unrecoverable Error - // DEGREE_OR_VOLTAGE_OVERRANGE - // Degree or voltage error - // PAPER_NEAREND - // Paper Near End - // PAPER_TAKEOUT - // Paper takeout -#ifndef MarcoDefinitionCPRTStatus -#define MarcoDefinitionCPRTStatus -#define CP_RTSTATUS_DRAWER_OPENED(status) (((status >> 0) & 0x04) == 0x00) -#define CP_RTSTATUS_OFFLINE(status) (((status >> 0) & 0x08) == 0x08) -#define CP_RTSTATUS_COVERUP(status) (((status >> 8) & 0x04) == 0x04) -#define CP_RTSTATUS_FEED_PRESSED(status) (((status >> 8) & 0x08) == 0x08) -#define CP_RTSTATUS_NOPAPER(status) (((status >> 8) & 0x20) == 0x20) -#define CP_RTSTATUS_ERROR_OCCURED(status) (((status >> 8) & 0x40) == 0x40) -#define CP_RTSTATUS_CUTTER_ERROR(status) (((status >> 16) & 0x08) == 0x08) -#define CP_RTSTATUS_UNRECOVERABLE_ERROR(status) (((status >> 16) & 0x20) == 0x20) -#define CP_RTSTATUS_DEGREE_OR_VOLTAGE_OVERRANGE(status) (((status >> 16) & 0x40) == 0x40) -#define CP_RTSTATUS_PAPER_NEAREND(status) (((status >> 24) & 0x0C) == 0x0C) -#define CP_RTSTATUS_PAPER_TAKEOUT(status) (((status >> 24) & 0x04) == 0x04) -#endif - - -#ifndef MarcoDefinitionCPLabelTextStyle -#define MarcoDefinitionCPLabelTextStyle -#define CP_LABEL_TEXT_STYLE_BOLD (1<<0) -#define CP_LABEL_TEXT_STYLE_UNDERLINE (1<<1) -#define CP_LABEL_TEXT_STYLE_HIGHLIGHT (1<<2) -#define CP_LABEL_TEXT_STYLE_STRIKETHROUGH (1<<3) -#define CP_LABEL_TEXT_STYLE_ROTATION_0 (0<<4) -#define CP_LABEL_TEXT_STYLE_ROTATION_90 (1<<4) -#define CP_LABEL_TEXT_STYLE_ROTATION_180 (2<<4) -#define CP_LABEL_TEXT_STYLE_ROTATION_270 (3<<4) -#define CP_LABEL_TEXT_STYLE_WIDTH_ENLARGEMENT(n) ((n)<<8) -#define CP_LABEL_TEXT_STYLE_HEIGHT_ENLARGEMENT(n) ((n)<<12) -#endif - - -typedef void (*CP_OnNetPrinterDiscovered)(const char *local_ip, const char *discovered_mac, const char *discovered_ip, const char *discovered_name, const void *private_data); - - -typedef void (*CP_OnBluetoothDeviceDiscovered)(const char *device_name, const char *device_address, const void *private_data); - - -typedef void (*CP_OnWiFiP2PDeviceDiscovered)(const char *device_name, const char *device_address, const char *device_type, const void *private_data); - - -typedef void (*CP_OnPortOpenedEvent)(void *handle, const char *name, void *private_data); - - -typedef void (*CP_OnPortOpenFailedEvent)(void *handle, const char *name, void *private_data); - - -typedef void (*CP_OnPortClosedEvent)(void *handle, void *private_data); - - -typedef void (*CP_OnPortWrittenEvent)(void *handle, const unsigned char *buffer, unsigned int count, void *private_data); - - -typedef void (*CP_OnPortReceivedEvent)(void *handle, const unsigned char *buffer, unsigned int count, void *private_data); - - -typedef void (*CP_OnPrinterStatusEvent)(void *handle, const long long printer_error_status, const long long printer_info_status, void *private_data); - - -typedef void (*CP_OnPrinterReceivedEvent)(void *handle, const unsigned int printer_received_byte_count, void *private_data); - - -typedef void (*CP_OnPrinterPrintedEvent)(void *handle, const unsigned int printer_printed_page_id, void *private_data); - - // get library version string - // - // return - // return library version string -AUTOREPLYPRINT_API const char *CP_Library_Version(void); - - // Enumerate serial port - // - // pBuf - // The buffer to save enumerated port list - // - // cbBuf - // The buffer size - // - // pcbNeeded - // The buffer bytes needed - // - // return - // Enumerated port count -AUTOREPLYPRINT_API unsigned int CP_Port_EnumCom(char *pBuf, unsigned int cbBuf, unsigned int *pcbNeeded); - - // Enumerate parallel port - // - // pBuf - // The buffer to save enumerated port list - // - // cbBuf - // The buffer size - // - // pcbNeeded - // The buffer bytes needed - // - // return - // Enumerated port count -AUTOREPLYPRINT_API unsigned int CP_Port_EnumLpt(char *pBuf, unsigned int cbBuf, unsigned int *pcbNeeded); - - // Enumerate usb port - // - // pBuf - // The buffer to save enumerated port list - // - // cbBuf - // The buffer size - // - // pcbNeeded - // The buffer bytes needed - // - // return - // Enumerated port count -AUTOREPLYPRINT_API unsigned int CP_Port_EnumUsb(char *pBuf, unsigned int cbBuf, unsigned int *pcbNeeded); - - // Enumerate net printer - // - // timeout - // enumrate timeout ms - // - // cancel - // cancel bit, if value is non-zero, enum process will exit. - // - // on_discovered - // enumrated callback function - // - // private_data - // the parameter passed to callback function - // - // return - // none -AUTOREPLYPRINT_API void CP_Port_EnumNetPrinter(unsigned int timeout, int *cancel, CP_OnNetPrinterDiscovered on_discovered, const void *private_data); - - // Enumerate bt printer - // - // on_discovered - // enumrated callback function - // - // private_data - // the parameter passed to callback function - // - // return - // none -AUTOREPLYPRINT_API void CP_Port_EnumBtDevice(unsigned int timeout, int *cancel, CP_OnBluetoothDeviceDiscovered on_discovered, const void *private_data); - - // Enumerate BLE printer - // - // on_discovered - // enumrated callback function - // - // private_data - // the parameter passed to callback function - // - // return - // none -AUTOREPLYPRINT_API void CP_Port_EnumBleDevice(unsigned int timeout, int *cancel, CP_OnBluetoothDeviceDiscovered on_discovered, const void *private_data); - - // Enumerate WiFi P2P printer - // - // on_discovered - // enumrated callback function - // - // private_data - // the parameter passed to callback function - // - // return - // none -AUTOREPLYPRINT_API void CP_Port_EnumWiFiP2PDevice(unsigned int timeout, int *cancel, CP_OnWiFiP2PDeviceDiscovered on_discovered, const void *private_data); - - // Open com port - // - // name - // port name - // for example COM1,COM2,COM3,...COM11... - // - // baudrate - // baudrate - // Normally choose 9600,19200,38400,57600,115200. - // Need to keep the same as printer baudrate, suggest using high baudrate to get better printing speed. - // - // databits - // databits, value range is [4,8] - // - // parity - // Parity bit, The values are defined as follows: - // value define - // 0 no parity - // 1 odd parity - // 2 even parity - // 3 mark parity - // 4 space parity - // - // stopbits - // Parity bit, The values are defined as follows: - // value define - // 0 1bit stopbits - // 1 1.5bit stopbits - // 2 2bit stopbits - // - // flowcontrol - // flow control - // - // autoreplymode - // 0 don't start autoreplymode - // 1 start autoreplymode - // attention: - // Only some models support automatic return mode, please ask the seller if you support it - // After the automatic return mode is enabled, the printer will return the status automatically - // The state of the printer cannot be automatically obtained if it is not started - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // If serial port was occupied, open serial will fail - // If baud rate don't match with printer baud rate, it won't print. -AUTOREPLYPRINT_API void *CP_Port_OpenCom(const char *name, unsigned int baudrate, CP_ComDataBits databits, CP_ComParity parity, CP_ComStopBits stopbits, CP_ComFlowControl flowcontrol, int autoreplymode); - - // Open Lpt - // - // name - // port name - // for example: LPT1,LPT2,LPT3... - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // Parallel port just support one way communication, just can write, but can't read - // All the query status function, are invalid for parallel port. -AUTOREPLYPRINT_API void *CP_Port_OpenLpt(const char *name); - - // Open USB - // - // name - // port name - // Can get printer name through Port_EnumUSB - // Can use any other strings, at this time, if find USB printer, will open directly. - // - // autoreplymode - // 0 don't start autoreplymode - // 1 start autoreplymode - // attention: - // Only some models support automatic return mode, please ask the seller if you support it - // After the automatic return mode is enabled, the printer will return the status automatically - // The state of the printer cannot be automatically obtained if it is not started - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // USB printer connect to computer, if device manager appear USB Printing Support, then can open USE this function. -AUTOREPLYPRINT_API void *CP_Port_OpenUsb(const char *name, int autoreplymode); - - // Open Tcp - // - // local_ip - // Bind to local IP - // For multiple network CARDS or multiple local ips, select the specified IP - // Passing in a 0 indicates that it is not specified - // - // dest_ip - // IP Addres or printer name - // For example: 192.168.1.87 - // - // dest_port - // Port Number - // Fixed value: 9100 - // - // timeout - // connect timeout - // - // autoreplymode - // 0 don't start autoreplymode - // 1 start autoreplymode - // attention: - // Only some models support automatic return mode, please ask the seller if you support it - // After the automatic return mode is enabled, the printer will return the status automatically - // The state of the printer cannot be automatically obtained if it is not started - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // PC and printer need in the same network segment, so they can connect -AUTOREPLYPRINT_API void *CP_Port_OpenTcp(const char *local_ip, const char *dest_ip, unsigned short dest_port, unsigned int timeout, int autoreplymode); - - // Connect Bluetooth Printer Via SPP - // - // address - // bluetooth address - // - // autoreplymode - // 0 don't start autoreplymode - // 1 start autoreplymode - // attention: - // Only some models support automatic return mode, please ask the seller if you support it - // After the automatic return mode is enabled, the printer will return the status automatically - // The state of the printer cannot be automatically obtained if it is not started - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // only for android -AUTOREPLYPRINT_API void *CP_Port_OpenBtSpp(const char *address, int autoreplymode); - - // Connect Bluetooth Printer Via BLE - // - // address - // bluetooth address - // - // autoreplymode - // 0 don't start autoreplymode - // 1 start autoreplymode - // attention: - // Only some models support automatic return mode, please ask the seller if you support it - // After the automatic return mode is enabled, the printer will return the status automatically - // The state of the printer cannot be automatically obtained if it is not started - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // only for android,ios,macos -AUTOREPLYPRINT_API void *CP_Port_OpenBtBle(const char *address, int autoreplymode); - - // Connect Bluetooth Printer Via BLE(Use Special Proto To Transfer Data) - // - // address - // bluetooth address - // - // autoreplymode - // 0 don't start autoreplymode - // 1 start autoreplymode - // attention: - // Only some models support automatic return mode, please ask the seller if you support it - // After the automatic return mode is enabled, the printer will return the status automatically - // The state of the printer cannot be automatically obtained if it is not started - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // only for ios,macos -AUTOREPLYPRINT_API void *CP_Port_OpenBtBleProtoV2(const char *address, int autoreplymode); - - // Creates a memory buffer that all subsequent print instructions are written to - // - // buffer_size - // buffer size - // - // return - // Return handle, If open success, return non-zero value, else return zero. - // - // remarks - // This can be used in the following two scenarios - // scenario one: - // A single document needs to send more than one instruction, and you want to put all the instructions together and send them to the printer at once to improve the transmission speed - // scenario two: - // Sometimes you need to know exactly what a function is sending, you need to know exactly what data is being sent, right -AUTOREPLYPRINT_API void *CP_Port_OpenMemoryBuffer(unsigned int buffer_size); - - // get memory buffer data pointer - // - // handle - // Port handle, returned by OpenXXX - // - // return - // return memory buffer data pointer. or return zero means failed -AUTOREPLYPRINT_API unsigned char *CP_Port_GetMemoryBufferDataPointer(void *handle); - - // get memory buffer data length - // - // handle - // Port handle, returned by OpenXXX - // - // return - // return memory buffer data length -AUTOREPLYPRINT_API unsigned int CP_Port_GetMemoryBufferDataLength(void *handle); - - // Clear memory buffer data - // - // handle - // Port handle, returned by OpenXXX - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_ClearMemoryBufferData(void *handle); - - // Connect WiFi P2P Printer - // - // address - // printer address - // for example: "01:02:03:04:05:06" - // - // timeout - // connect timeout ms, you can set to 10000 - // - // return - // return printer IP address (network byte ordered) - // If open success, return non-zero value, else return zero. - // - // remarks - // only for android -AUTOREPLYPRINT_API int CP_Port_WiFiP2P_Connect(const char *device_address, unsigned int timeout); - - // Disconnect WiFi P2P Connection -AUTOREPLYPRINT_API void CP_Port_WiFiP2P_Disconnect(); - - // Check WiFi P2P Is Connected - // - // return - // if connected, return true. - // if not connected, return false. -AUTOREPLYPRINT_API int CP_Port_WiFiP2P_IsConnected(); - - // Write data to port - // - // handle - // Port handle, returned by OpenXXX - // - // buffer - // buffer - // - // count - // buffer length - // - // timeout - // Timeout ms - // - // return - // return bytes writted. or return -1 means failed -AUTOREPLYPRINT_API int CP_Port_Write(void *handle, const unsigned char *buffer, unsigned int count, unsigned int timeout); - - // Receive data from port - // - // handle - // Port handle, returned by OpenXXX - // - // buffer - // buffer - // - // count - // buffer length - // - // timeout - // Timeout ms - // - // return - // return bytes readed. or return -1 means failed -AUTOREPLYPRINT_API int CP_Port_Read(void *handle, unsigned char *buffer, unsigned int count, unsigned int timeout); - - // Receive data from port - // - // handle - // Port handle, returned by OpenXXX - // - // buffer - // buffer - // - // count - // buffer length - // - // timeout - // Timeout ms - // - // breakByte - // break read byte - // - // return - // return bytes readed. or return -1 means failed -AUTOREPLYPRINT_API int CP_Port_ReadUntilByte(void *handle, unsigned char *buffer, unsigned int count, unsigned int timeout, unsigned char breakByte); - - // get readable data from port - // - // handle - // Port handle, returned by OpenXXX - // - // return - // return readable. or return -1 means failed -AUTOREPLYPRINT_API int CP_Port_Available(void *handle); - - // Skip receive buffer - // - // handle - // Port handle, returned by OpenXXX - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_SkipAvailable(void *handle); - - // Check Connection Valid - // - // handle - // Port handle, returned by OpenXXX - // - // return - // Returns true if the port is open and the status is continuously updated - // False is returned if the port is not open, closed, or the status is not updated for more than 6 seconds -AUTOREPLYPRINT_API int CP_Port_IsConnectionValid(void *handle); - - // Check Port Is Opened - // - // handle - // Port handle, returned by OpenXXX - // - // return - // Returns true if the port is open and the connection is not broken or closed - // Returns false if the port is not open, or if the connection is broken or closed -AUTOREPLYPRINT_API int CP_Port_IsOpened(void *handle); - - // Close Port - // - // handle - // Port handle, returned by OpenXXX - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_Close(void *handle); - - // Add Callback, Open Port Success - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_AddOnPortOpenedEvent(const CP_OnPortOpenedEvent event, void *private_data); - - // Add Callback, Open Port Failed - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_AddOnPortOpenFailedEvent(const CP_OnPortOpenFailedEvent event, void *private_data); - - // Add Callback, Port Closed - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_AddOnPortClosedEvent(const CP_OnPortClosedEvent event, void *private_data); - - // Add Callback, Port Written Bytes - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_AddOnPortWrittenEvent(const CP_OnPortWrittenEvent event, void *private_data); - - // Add Callback, Port Received Bytes - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_AddOnPortReceivedEvent(const CP_OnPortReceivedEvent event, void *private_data); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_RemoveOnPortOpenedEvent(const CP_OnPortOpenedEvent event); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_RemoveOnPortOpenFailedEvent(const CP_OnPortOpenFailedEvent event); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_RemoveOnPortClosedEvent(const CP_OnPortClosedEvent event); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_RemoveOnPortWrittenEvent(const CP_OnPortWrittenEvent event); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Port_RemoveOnPortReceivedEvent(const CP_OnPortReceivedEvent event); - - // Add Callback, Printer Status Updated - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_AddOnPrinterStatusEvent(const CP_OnPrinterStatusEvent event, void *private_data); - - // Add Callback, Printer Received Byte Count Updated - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_AddOnPrinterReceivedEvent(const CP_OnPrinterReceivedEvent event, void *private_data); - - // Add Callback, Printer Printed Page ID Updated - // - // event - // callback function - // - // private_data - // the parameter passed to callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_AddOnPrinterPrintedEvent(const CP_OnPrinterPrintedEvent event, void *private_data); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_RemoveOnPrinterStatusEvent(const CP_OnPrinterStatusEvent event); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_RemoveOnPrinterReceivedEvent(const CP_OnPrinterReceivedEvent event); - - // Remove Callback - // - // event - // callback function - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_RemoveOnPrinterPrintedEvent(const CP_OnPrinterPrintedEvent event); - - // Get Printer Resolution Info - // - // handle - // Port handle, returned by OpenXXX - // - // width_mm - // Max Page Width - // - // height_mm - // Max Page Height - // - // dots_per_mm - // Dots Per MM - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_GetPrinterResolutionInfo(void *handle, unsigned int *width_mm, unsigned int *height_mm, unsigned int *dots_per_mm); - - // Get Printer Firmware Version - // - // handle - // Port handle, returned by OpenXXX - // - // pBuf - // The buffer - // - // cbBuf - // The buffer size - // - // pcbNeeded - // The buffer bytes needed - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_GetPrinterFirmwareVersion(void *handle, char *pBuf, unsigned int cbBuf, unsigned int *pcbNeeded); - - // Get Printer Status - // - // handle - // Port handle, returned by OpenXXX - // - // printer_error_status - // Printer Error Status - // - // printer_info_status - // Printer Info Status - // - // timestamp_ms - // timestamp - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_GetPrinterStatusInfo(void *handle, long long *printer_error_status, long long *printer_info_status, long long *timestamp_ms); - - // Get Printer Received Byte Count - // - // handle - // Port handle, returned by OpenXXX - // - // printer_received_byte_count - // Printer Received Byte Count - // - // timestamp_ms - // timestamp - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_GetPrinterReceivedInfo(void *handle, unsigned int *printer_received_byte_count, long long *timestamp_ms); - - // Get Printer Printed Page ID - // - // handle - // Port handle, returned by OpenXXX - // - // printer_printed_page_id - // Printer Printed Page ID - // - // timestamp_ms - // timestamp - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_GetPrinterPrintedInfo(void *handle, unsigned int *printer_printed_page_id, long long *timestamp_ms); - - // Get Printer Label Position Adjustment - // - // handle - // Port handle, returned by OpenXXX - // - // label_print_position_adjustment - // Printer label print position adjustment - // - // label_tear_position_adjustment - // Printer label tear position adjustment - // - // timestamp_ms - // timestamp - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_GetPrinterLabelPositionAdjustmentInfo(void *handle, double *label_print_position_adjustment, double *label_tear_position_adjustment, long long *timestamp_ms); - - // adjust label print position and tear paper position - // - // handle - // Port handle, returned by OpenXXX - // - // label_print_position_adjustment - // Label print position adjustment mm (adjustment can not exceed [-4,4]) - // - // label_tear_position_adjustment - // Label tear position adjustment mm (adjustment can not exceed [-4,4]) - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Printer_SetPrinterLabelPositionAdjustmentInfo(void *handle, double label_print_position_adjustment, double label_tear_position_adjustment); - - // Clear Printer Buffer Runtime - // - // handle - // Port handle, returned by OpenXXX - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_ClearPrinterBuffer(void *handle); - - // Clear Printer Error Runtime - // - // handle - // Port handle, returned by OpenXXX - // - // return - // true on success. - // false on failed. -AUTOREPLYPRINT_API int CP_Printer_ClearPrinterError(void *handle); - - // Query the real-time status of the printer - // If it is a machine that supports automatic return, the state will be returned automatically. No need to use this command to query - // Due to the real-time state instruction, there is no check, the result cannot be guaranteed to be correct - // - // handle - // Port handle, returned by OpenXXX - // - // timeout - // timeout ms - // The wait time for query does not exceed this time - // - // return - // If command is successfully, it returns rtstatus else it returns 0. - // Please check CP_RTSTATUS_XXX for the detailed status. If the status definition is inconsistent with the actual model, the actual measurement shall prevail. -AUTOREPLYPRINT_API int CP_Pos_QueryRTStatus(void *handle, unsigned int timeout); - - // Query the print result of the previous content - // - // handle - // Port handle, returned by OpenXXX - // - // timeout - // timeout ms - // The wait time for query print results does not exceed this time - // - // return - // If print is successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_QueryPrintResult(void *handle, unsigned int timeout); - - // Turn on cashbox - // - // handle - // Port handle, returned by OpenXXX - // - // nDrawerIndex - // Cashbox no, value are defined as follow: - // value define - // 0 Cashbox pin 2 - // 1 Cashbox pin 5 - // - // nHighLevelTime - // Cashbox pulse high potential ms time - // - // nLowLevelTime - // Cashbox pulse low potential ms time - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_KickOutDrawer(void *handle, int nDrawerIndex, int nHighLevelTime, int nLowLevelTime); - - // Buzzer call - // - // handle - // Port handle, returned by OpenXXX - // - // nBeepCount - // Calling times - // - // nBeepMs - // Calling time ms, value range is [100,900], flour to 100 milliseconds. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_Beep(void *handle, int nBeepCount, int nBeepMs); - - // feed to cutter position and half cut paper - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_FeedAndHalfCutPaper(void *handle); - - // full cut paper - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_FullCutPaper(void *handle); - - // half cut paper - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_HalfCutPaper(void *handle); - - // printer feed numLines - // - // handle - // Port handle, returned by OpenXXX - // - // numLines - // number of lines to feed - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_FeedLine(void *handle, int numLines); - - // printer feed numDots - // - // handle - // Port handle, returned by OpenXXX - // - // numDots - // number of dots to feed - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_FeedDot(void *handle, int numDots); - - // printer print self test page - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintSelfTestPage(void *handle); - - // print text - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintText(void *handle, const char *str); - - // print text - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to UTF8 encoding. -AUTOREPLYPRINT_API int CP_Pos_PrintTextInUTF8(void *handle, const wchar_t *str); - - // print text - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to GBK encoding. -AUTOREPLYPRINT_API int CP_Pos_PrintTextInGBK(void *handle, const wchar_t *str); - - // print text - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to BIG5 encoding. -AUTOREPLYPRINT_API int CP_Pos_PrintTextInBIG5(void *handle, const wchar_t *str); - - // print text - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to ShiftJIS encoding. -AUTOREPLYPRINT_API int CP_Pos_PrintTextInShiftJIS(void *handle, const wchar_t *str); - - // print text - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to EUCKR encoding. -AUTOREPLYPRINT_API int CP_Pos_PrintTextInEUCKR(void *handle, const wchar_t *str); - - // print text - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the string to print - // - // len - // the length to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintTextInBytes(void *handle, const char *str, int len); - - // print 1D barcode - // - // handle - // Port handle, returned by OpenXXX - // - // nBarcodeType - // barcode type - // values are defined as follow: - // value type - // 0x41 UPC-A - // 0x42 UPC-E - // 0x43 EAN13 - // 0x44 EAN8 - // 0x45 CODE39 - // 0x46 ITF - // 0x47 CODABAR - // 0x48 CODE93 - // 0x49 CODE128 - // - // str - // the barcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintBarcode(void *handle, CP_Pos_BarcodeType nBarcodeType, const char *str); - - // print Code128 barcode, this function auto change type b and c to print more characters. - // Normally, do not use this function to print CODE128 code - // This function is mainly used for compatibility with some older models - // New models already support automatic switching codes by default - // New models cannot print barcodes using this function - // - // handle - // Port handle, returned by OpenXXX - // - // str - // the barcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintBarcode_Code128Auto(void *handle, const char *str); - - // print qrcode - // - // handle - // Port handle, returned by OpenXXX - // - // nVersion - // Assign charater version. The value range is:[0,16] - // When version is 0, printer caculates version number according to character set automatically. - // - // nECCLevel - // Assign error correction level. - // The value range is: [1, 4]. - // Definitios are as below: - // ECC error correction level - // 1 L:7%, low error correction, much data. - // 2 M:15%, medium error correction - // 3 Q:optimize error correction - // 4 H:30%, the highest error correction, less data. - // - // str - // the qrcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintQRCode(void *handle, int nVersion, CP_QRCodeECC nECCLevel, const char *str); - - // print qrcode - // - // handle - // Port handle, returned by OpenXXX - // - // nQRCodeUnitWidth - // QRCode code block width, the value range is [1, 16] - // - // nECCLevel - // Assign error correction level. - // The value range is: [1, 4]. - // Definitios are as below: - // ECC error correction level - // 1 L:7%, low error correction, much data. - // 2 M:15%, medium error correction - // 3 Q:optimize error correction - // 4 H:30%, the highest error correction, less data. - // - // str - // the qrcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintQRCodeUseEpsonCmd(void *handle, int nQRCodeUnitWidth, CP_QRCodeECC nECCLevel, const char *str); - - // print 2 qrcode - // - // handle - // Port handle, returned by OpenXXX - // - // nQRCodeUnitWidth - // QRCode code block width, the value range is [1, 8] - // - // nQR1Position - // nQR2Position - // QRCode position - // - // nQR1Version - // nQR2Version - // Assign charater version. The value range is:[0,16] - // When version is 0, printer caculates version number according to character set automatically. - // - // nQR1ECCLevel - // nQR2ECCLevel - // Assign error correction level. - // The value range is: [1, 4]. - // Definitios are as below: - // ECC error correction level - // 1 L:7%, low error correction, much data. - // 2 M:15%, medium error correction - // 3 Q:optimize error correction - // 4 H:30%, the highest error correction, less data. - // - // strQR1 - // strQR2 - // the qrcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintDoubleQRCode(void *handle, int nQRCodeUnitWidth, int nQR1Position, int nQR1Version, CP_QRCodeECC nQR1ECCLevel, const char *strQR1, int nQR2Position, int nQR2Version, CP_QRCodeECC nQR2ECCLevel, const char *strQR2); - - // print pdf417 barcode - // - // handle - // Port handle, returned by OpenXXX - // - // columnCount - // column count, range is [0,30] - // - // rowCount - // row count, range is 0,[3,90] - // - // unitWidth - // module unit width, range is [2,8] - // - // rowHeight - // row height, range is [2,8] - // - // nECCLevel - // ecc level, range is [0,8] - // - // dataProcessingMode - // data processing mode, 0 select standard PDF417, 1 select cutoff PDF417 - // - // str - // the pdf417 data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintPDF417BarcodeUseEpsonCmd(void *handle, int columnCount, int rowCount, int unitWidth, int rowHeight, int nECCLevel, int dataProcessingMode, const char *str); - - // print image - // - // handle - // Port handle, returned by OpenXXX - // - // dstw - // the width to print - // - // dsth - // the height to print - // - // pszFile - // image file path - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // compression_method - // print data compress method, values are defined as follow - // value define - // 0 no compress - // 1 compress level 1 - // 2 compress level 2 - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintRasterImageFromFile(void *handle, int dstw, int dsth, const char *pszFile, CP_ImageBinarizationMethod binaryzation_method, CP_ImageCompressionMethod compression_method); - - // print image (data can be readed from file) - // - // handle - // Port handle, returned by OpenXXX - // - // dstw - // the width to print - // - // dsth - // the height to print - // - // data - // image data - // - // data_size - // image data size - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // compression_method - // print data compress method, values are defined as follow - // value define - // 0 no compress - // 1 compress level 1 - // 2 compress level 2 - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintRasterImageFromData(void *handle, int dstw, int dsth, const unsigned char *data, unsigned int data_size, CP_ImageBinarizationMethod binaryzation_method, CP_ImageCompressionMethod compression_method); - - // print image pixels - // - // handle - // Port handle, returned by OpenXXX - // - // img_data - // image pixels data - // - // img_datalen - // image pixels data length - // - // img_width - // image pixel width - // - // img_height - // image pixel height - // - // img_stride - // image horizontal stirde. means bytes per line. - // - // img_format - // image pixel data format, values are defined as follow - // value define - // 1 mono - // 2 monolsb - // 3 gray - // 4 r.g.b in byte-ordered - // 5 b.g.r in byte-ordered - // 6 a.r.g.b in byte-ordered - // 7 r.g.b.a in byte-ordered - // 8 a.b.g.r in byte-ordered - // 9 b.g.r.a in byte-ordered - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // compression_method - // print data compress method, values are defined as follow - // value define - // 0 no compress - // 1 compress level 1 - // 2 compress level 2 - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintRasterImageFromPixels(void *handle, const unsigned char *img_data, unsigned int img_datalen, int img_width, int img_height, int img_stride, CP_ImagePixelsFormat img_format, CP_ImageBinarizationMethod binaryzation_method, CP_ImageCompressionMethod compression_method); - - // print one horizontal line - // - // handle - // Port handle, returned by OpenXXX - // - // nLineStartPosition - // line start position - // - // nLineEndPosition - // line end position - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintHorizontalLine(void *handle, int nLineStartPosition, int nLineEndPosition); - - // print one horizontal line - // - // handle - // Port handle, returned by OpenXXX - // - // nLineStartPosition - // line start position - // - // nLineEndPosition - // line end position - // - // nLineThickness - // line thickness - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintHorizontalLineSpecifyThickness(void *handle, int nLineStartPosition, int nLineEndPosition, int nLineThickness); - - // print multiple horizontal lines at one row, multi call can print curve - // - // handle - // Port handle, returned by OpenXXX - // - // nLineCount - // Line count - // - // pLineStartPosition - // Line start position - // - // pLineEndPosition - // Line end position - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_PrintMultipleHorizontalLinesAtOneRow(void *handle, int nLineCount, int *pLineStartPosition, int *pLineEndPosition); - - // reset printer, clear settings - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_ResetPrinter(void *handle); - - // set print speed (some printer suppert) - // - // handle - // Port handle, returned by OpenXXX - // - // nSpeed - // print speed in mm/s - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetPrintSpeed(void *handle, int nSpeed); - - // set print density (some printer suppert) - // - // handle - // Port handle, returned by OpenXXX - // - // nDensity - // the print density[0,15] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetPrintDensity(void *handle, int nDensity); - - // set printer to single byte mode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetSingleByteMode(void *handle); - - // set character set - // - // handle - // Port handle, returned by OpenXXX - // - // nCharacterSet - // character set, range is [0, 15] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetCharacterSet(void *handle, CP_CharacterSet nCharacterSet); - - // set character codepage - // - // handle - // Port handle, returned by OpenXXX - // - // nCharacterCodepage - // character codepage, range is [0,255] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetCharacterCodepage(void *handle, CP_CharacterCodepage nCharacterCodepage); - - // set printer to multi byte mode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetMultiByteMode(void *handle); - - // set printer multi byte encoding - // - // handle - // Port handle, returned by OpenXXX - // - // nEncoding - // multi byte encoding, values defined as follow: - // value define - // 0 GBK - // 1 UTF8 - // 3 BIG5 - // 4 SHIFT-JIS - // 5 EUC-KR - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetMultiByteEncoding(void *handle, CP_MultiByteEncoding nEncoding); - - // set print movement unit - // - // handle - // Port handle, returned by OpenXXX - // - // nHorizontalMovementUnit - // horizontal movement unit - // - // nVerticalMovementUnit - // vertical movement unit - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // if set movement unit to 200, 1mm means 8point. -AUTOREPLYPRINT_API int CP_Pos_SetMovementUnit(void *handle, int nHorizontalMovementUnit, int nVerticalMovementUnit); - - // set print area left margin - // - // handle - // Port handle, returned by OpenXXX - // - // nLeftMargin - // print area left margin - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetPrintAreaLeftMargin(void *handle, int nLeftMargin); - - // set print area width - // - // handle - // Port handle, returned by OpenXXX - // - // nWidth - // print area width - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetPrintAreaWidth(void *handle, int nWidth); - - // set horizontal absolute print position - // - // handle - // Port handle, returned by OpenXXX - // - // nPosition - // print position - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetHorizontalAbsolutePrintPosition(void *handle, int nPosition); - - // set horizontal relative print position - // - // handle - // Port handle, returned by OpenXXX - // - // nPosition - // print position - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetHorizontalRelativePrintPosition(void *handle, int nPosition); - - // set vertical absolute print position, only valid in page mode. - // - // handle - // Port handle, returned by OpenXXX - // - // nPosition - // print position - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetVerticalAbsolutePrintPosition(void *handle, int nPosition); - - // set vertical relative print position, only valid in page mode. - // - // handle - // Port handle, returned by OpenXXX - // - // nPosition - // print position - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetVerticalRelativePrintPosition(void *handle, int nPosition); - - // set print alignment - // - // handle - // Port handle, returned by OpenXXX - // - // nAlignment - // print alignment, value are defined as follow: - // value define - // 0 align left - // 1 align center - // 2 align right - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetAlignment(void *handle, CP_Pos_Alignment nAlignment); - - // set text scale - // - // handle - // Port handle, returned by OpenXXX - // - // nWidthScale - // width scale - // - // nHeightScale - // height scale - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetTextScale(void *handle, int nWidthScale, int nHeightScale); - - // set ascii text font type - // - // handle - // Port handle, returned by OpenXXX - // - // nFontType - // ascii text font type, values defined as follow: - // value define - // 0 FontA (12x24) - // 1 FontB (9x17) - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetAsciiTextFontType(void *handle, int nFontType); - - // set text bold - // - // handle - // Port handle, returned by OpenXXX - // - // nBold - // text bold , values defined as follow: - // value define - // 0 don't bold - // 1 bold - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetTextBold(void *handle, int nBold); - - // set text underline - // - // handle - // Port handle, returned by OpenXXX - // - // nUnderline - // text underline, values defined as follow: - // value define - // 0 no underline - // 1 1 point underline - // 2 2 point underline - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetTextUnderline(void *handle, int nUnderline); - - // set text upside down - // - // handle - // Port handle, returned by OpenXXX - // - // nUpsideDown - // upside down, values defined as follow: - // value define - // 0 print text dont't upside down - // 1 print text upside down - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetTextUpsideDown(void *handle, int nUpsideDown); - - // set text black and white reverse - // - // handle - // Port handle, returned by OpenXXX - // - // nWhiteOnBlack - // black and white reverse, values defined as follow: - // value define - // 0 print text normal - // 1 print text black and white reverse - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetTextWhiteOnBlack(void *handle, int nWhiteOnBlack); - - // set text rotate 90 print - // - // handle - // Port handle, returned by OpenXXX - // - // nRotate - // set text rotate, value defined as follow: - // value define - // 0 print normal - // 1 text print rotate 90 degree - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetTextRotate(void *handle, int nRotate); - - // set line height - // - // handle - // Port handle, returned by OpenXXX - // - // nLineHeight - // line height, value range is [1,255] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetTextLineHeight(void *handle, int nLineHeight); - - // set ascii text char right spacing - // - // handle - // Port handle, returned by OpenXXX - // - // nSpacing - // right spacing, range is [1,255] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetAsciiTextCharRightSpacing(void *handle, int nSpacing); - - // set kanji text char left spacing and right spacing - // - // handle - // Port handle, returned by OpenXXX - // - // nLeftSpacing - // left spacing, range is [1,255] - // - // nRightSpacing - // right spacing, range is [1,255] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetKanjiTextCharSpacing(void *handle, int nLeftSpacing, int nRightSpacing); - - // set barcode and qrcode unit width - // - // handle - // Port handle, returned by OpenXXX - // - // nBarcodeUnitWidth - // It assigns the code basic element width. range is [2,6] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetBarcodeUnitWidth(void *handle, int nBarcodeUnitWidth); - - // set barcode height - // - // handle - // Port handle, returned by OpenXXX - // - // nBarcodeHeight - // Barcode height, range is [1,255] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetBarcodeHeight(void *handle, int nBarcodeHeight); - - // set barcode readable text font type - // - // handle - // Port handle, returned by OpenXXX - // - // nFontType - // It assigns HRI(Human Readable Interpretation) character font types. - // value type - // 0 standard ASCII - // 1 small ASCII - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetBarcodeReadableTextFontType(void *handle, int nFontType); - - // set barcode readable text print position - // - // handle - // Port handle, returned by OpenXXX - // - // nTextPosition - // barcode readable text position, value range is [0, 3]. - // value defined as follow: - // value define - // 0 don't show readable text - // 1 show readable text below barcode - // 2 show readable text above barcode - // 3 show readable text above and below barcode - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Pos_SetBarcodeReadableTextPosition(void *handle, CP_Pos_BarcodeTextPrintPosition nTextPosition); - - // select page mode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_SelectPageMode(void *handle); - - // select page mode and set movement unit , page area.and other params to default value. - // - // handle - // Port handle, returned by OpenXXX - // - // nHorizontalMovementUnit - // horizontal movement unit - // - // nVerticalMovementUnit - // vertical movement unit - // - // x - // horizontal start position - // - // y - // vertical start position - // - // width - // print area width - // - // height - // print area height - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_SelectPageModeEx(void *handle, int nHorizontalMovementUnit, int nVerticalMovementUnit, int x, int y, int width, int height); - - // exit page mode and enter standard mode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. - // none -AUTOREPLYPRINT_API int CP_Page_ExitPageMode(void *handle); - - // print page in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_PrintPage(void *handle); - - // clear page in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_ClearPage(void *handle); - - // set page area in pagemode, max height is 2000(8 dot per mm) - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal start position - // - // y - // vertical start position - // - // width - // print area width - // - // height - // print area height - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_SetPageArea(void *handle, int x, int y, int width, int height); - - // set print direction in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // nDirection - // print area direction - // 0 left -> right - // 1 bottom -> top - // 2 right -> left - // 3 top -> bottom - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_SetPageDrawDirection(void *handle, CP_Page_DrawDirection nDirection); - - // draw rect in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // width - // rect width - // - // height - // rect height - // - // color - // rect color, 0 means white, 1 means black. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawRect(void *handle, int x, int y, int width, int height, int color); - - // draw box in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // width - // box width - // - // height - // box height - // - // borderwidth - // box border width - // - // bordercolor - // box border color, 0 means white, 1 means black. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawBox(void *handle, int x, int y, int width, int height, int borderwidth, int bordercolor); - - // draw text in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawText(void *handle, int x, int y, const char *str); - - // draw text in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to UTF8 encoding. -AUTOREPLYPRINT_API int CP_Page_DrawTextInUTF8(void *handle, int x, int y, const wchar_t *str); - - // draw text in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to GBK encoding. -AUTOREPLYPRINT_API int CP_Page_DrawTextInGBK(void *handle, int x, int y, const wchar_t *str); - - // draw text in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to BIG5 encoding. -AUTOREPLYPRINT_API int CP_Page_DrawTextInBIG5(void *handle, int x, int y, const wchar_t *str); - - // draw text in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to ShiftJIS encoding. -AUTOREPLYPRINT_API int CP_Page_DrawTextInShiftJIS(void *handle, int x, int y, const wchar_t *str); - - // draw text in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to EUCKR encoding. -AUTOREPLYPRINT_API int CP_Page_DrawTextInEUCKR(void *handle, int x, int y, const wchar_t *str); - - // print 1D barcode in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // nBarcodeType - // barcode type - // values are defined as follow: - // value type - // 0x41 UPC-A - // 0x42 UPC-E - // 0x43 EAN13 - // 0x44 EAN8 - // 0x45 CODE39 - // 0x46 ITF - // 0x47 CODABAR - // 0x48 CODE93 - // 0x49 CODE128 - // - // str - // the barcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawBarcode(void *handle, int x, int y, CP_Pos_BarcodeType nBarcodeType, const char *str); - - // print qrcode in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // nVersion - // Assign charater version. The value range is:[0,16] - // When version is 0, printer caculates version number according to character set automatically. - // - // nECCLevel - // Assign error correction level. - // The value range is: [1, 4]. - // Definitios are as below: - // ECC error correction level - // 1 L:7%, low error correction, much data. - // 2 M:15%, medium error correction - // 3 Q:optimize error correction - // 4 H:30%, the highest error correction, less data. - // - // str - // the qrcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawQRCode(void *handle, int x, int y, int nVersion, CP_QRCodeECC nECCLevel, const char *str); - - // print image in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // dstw - // the width to print - // - // dsth - // the height to print - // - // pszFile - // image file path - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawRasterImageFromFile(void *handle, int x, int y, int dstw, int dsth, const char *pszFile, CP_ImageBinarizationMethod binaryzation_method); - - // print image in pagemode(data can be readed from file) - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // dstw - // the width to print - // - // dsth - // the height to print - // - // data - // image data - // - // data_size - // image data size - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawRasterImageFromData(void *handle, int x, int y, int dstw, int dsth, const unsigned char *data, unsigned int data_size, CP_ImageBinarizationMethod binaryzation_method); - - // print image pixels in pagemode - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // img_data - // image pixels data - // - // img_datalen - // image pixels data length - // - // img_width - // image pixel width - // - // img_height - // image pixel height - // - // img_stride - // image horizontal stirde. means bytes per line. - // - // img_format - // image pixel data format, values are defined as follow - // value define - // 1 mono - // 2 monolsb - // 3 gray - // 4 r.g.b in byte-ordered - // 5 b.g.r in byte-ordered - // 6 a.r.g.b in byte-ordered - // 7 r.g.b.a in byte-ordered - // 8 a.b.g.r in byte-ordered - // 9 b.g.r.a in byte-ordered - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Page_DrawRasterImageFromPixels(void *handle, int x, int y, const unsigned char *img_data, unsigned int img_datalen, int img_width, int img_height, int img_stride, CP_ImagePixelsFormat img_format, CP_ImageBinarizationMethod binaryzation_method); - - // enable black mark mode, need reboot printer. - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_EnableBlackMarkMode(void *handle); - - // disable black mark mode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_DisableBlackMarkMode(void *handle); - - // set black mark max search length(reboot will also valid) - // - // handle - // Port handle, returned by OpenXXX - // - // maxFindLength - // max find length (maxFindLength x 0.125 mm) - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_SetBlackMarkMaxFindLength(void *handle, int maxFindLength); - - // find next black mark - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_FindNextBlackMark(void *handle); - - // in black mode, set start print position - // - // handle - // Port handle, returned by OpenXXX - // - // position - // position > 0 means feed, position < 0 means feedback. distance is position x 0.125 mm. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_SetBlackMarkPaperPrintPosition(void *handle, int position); - - // in black mark mode, set cut position - // - // handle - // Port handle, returned by OpenXXX - // - // position - // position > 0 means feed, position < 0 means feedback. distance is position x 0.125 mm. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_SetBlackMarkPaperCutPosition(void *handle, int position); - - // full cut paper - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_FullCutBlackMarkPaper(void *handle); - - // half cut paper - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_BlackMark_HalfCutBlackMarkPaper(void *handle); - - // enable label mode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_EnableLabelMode(void *handle); - - // disable label mode - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DisableLabelMode(void *handle); - - // calibrate label paper(change to different label paper, need calibration) - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_CalibrateLabel(void *handle); - - // Feed paper to gap - // - // handle - // Port handle, returned by OpenXXX - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_FeedLabel(void *handle); - - // assign the start of a label page, and set Page size, reference point coordinates and page rotation. - // - // handle - // Port handle, returned by OpenXXX - // - // x - // page start point x coordinates - // - // y - // page start point y coordinates - // - // width - // page width - // - // height - // page height - // - // rotation - // page rotating. The value range of rotate is {0,1}. Page doesn't rotate to print as 0, and rotate 90 degree to print as 1. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_PageBegin(void *handle, int x, int y, int width, int height, CP_Label_Rotation rotation); - - // print the label page contents to label paper - // - // handle - // Port handle, returned by OpenXXX - // - // copies - // Copies [ 1 - 255 ] - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_PagePrint(void *handle, int copies); - - // draw text in assigned position of label page.only for single line - // - // handle - // Port handle, returned by OpenXXX - // - // x - // define text start position x coordinates,the value range is: [0,Page_Width-1] - // - // y - // define text start position y coordinates,the value range is: [0,Page_Height-1] - // - // font - // Choose font, can use 24. - // some printer can use 16, [20,99]. - // - // style - // chracter style. - // Databits define - // 0 Bold flag bit: font bold for 1,don't bold if reset zero clearing. - // 1 underline flag bit: underline text for 1, don't underline if rest zero clearing - // 2 inverse flag bit: inverse for 1(white in black), don't inverse rest zero clearing - // 3 delete line flage bit: for 1 text with delete line,don't delete line if reset zero clearing. - // [5,4] rotate flag bit: 00 rotates 0 degree - // 01 rotates 90 degree - // 10 rotates 180 degree - // 11 rotates 270 degree - // [11,8] font width magnification times; - // [15,12] font height magnification times; - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawText(void *handle, int x, int y, int font, int style, const char *str); - - // draw text in assigned position of label page.only for single line - // - // handle - // Port handle, returned by OpenXXX - // - // x - // define text start position x coordinates,the value range is: [0,Page_Width-1] - // - // y - // define text start position y coordinates,the value range is: [0,Page_Height-1] - // - // font - // Choose font, can use 24. - // some printer can use 16, [20,99]. - // - // style - // chracter style. - // Databits define - // 0 Bold flag bit: font bold for 1,don't bold if reset zero clearing. - // 1 underline flag bit: underline text for 1, don't underline if rest zero clearing - // 2 inverse flag bit: inverse for 1(white in black), don't inverse rest zero clearing - // 3 delete line flage bit: for 1 text with delete line,don't delete line if reset zero clearing. - // [5,4] rotate flag bit: 00 rotates 0 degree - // 01 rotates 90 degree - // 10 rotates 180 degree - // 11 rotates 270 degree - // [11,8] font width magnification times; - // [15,12] font height magnification times; - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to UTF8 encoding. -AUTOREPLYPRINT_API int CP_Label_DrawTextInUTF8(void *handle, int x, int y, int font, int style, const wchar_t *str); - - // draw text in assigned position of label page.only for single line - // - // handle - // Port handle, returned by OpenXXX - // - // x - // define text start position x coordinates,the value range is: [0,Page_Width-1] - // - // y - // define text start position y coordinates,the value range is: [0,Page_Height-1] - // - // font - // Choose font, can use 24. - // some printer can use 16, [20,99]. - // - // style - // chracter style. - // Databits define - // 0 Bold flag bit: font bold for 1,don't bold if reset zero clearing. - // 1 underline flag bit: underline text for 1, don't underline if rest zero clearing - // 2 inverse flag bit: inverse for 1(white in black), don't inverse rest zero clearing - // 3 delete line flage bit: for 1 text with delete line,don't delete line if reset zero clearing. - // [5,4] rotate flag bit: 00 rotates 0 degree - // 01 rotates 90 degree - // 10 rotates 180 degree - // 11 rotates 270 degree - // [11,8] font width magnification times; - // [15,12] font height magnification times; - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to GBK encoding. -AUTOREPLYPRINT_API int CP_Label_DrawTextInGBK(void *handle, int x, int y, int font, int style, const wchar_t *str); - - // draw text in assigned position of label page.only for single line - // - // handle - // Port handle, returned by OpenXXX - // - // x - // define text start position x coordinates,the value range is: [0,Page_Width-1] - // - // y - // define text start position y coordinates,the value range is: [0,Page_Height-1] - // - // font - // Choose font, can use 24. - // some printer can use 16, [20,99]. - // - // style - // chracter style. - // Databits define - // 0 Bold flag bit: font bold for 1,don't bold if reset zero clearing. - // 1 underline flag bit: underline text for 1, don't underline if rest zero clearing - // 2 inverse flag bit: inverse for 1(white in black), don't inverse rest zero clearing - // 3 delete line flage bit: for 1 text with delete line,don't delete line if reset zero clearing. - // [5,4] rotate flag bit: 00 rotates 0 degree - // 01 rotates 90 degree - // 10 rotates 180 degree - // 11 rotates 270 degree - // [11,8] font width magnification times; - // [15,12] font height magnification times; - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to BIG5 encoding. -AUTOREPLYPRINT_API int CP_Label_DrawTextInBIG5(void *handle, int x, int y, int font, int style, const wchar_t *str); - - // draw text in assigned position of label page.only for single line - // - // handle - // Port handle, returned by OpenXXX - // - // x - // define text start position x coordinates,the value range is: [0,Page_Width-1] - // - // y - // define text start position y coordinates,the value range is: [0,Page_Height-1] - // - // font - // Choose font, can use 24. - // some printer can use 16, [20,99]. - // - // style - // chracter style. - // Databits define - // 0 Bold flag bit: font bold for 1,don't bold if reset zero clearing. - // 1 underline flag bit: underline text for 1, don't underline if rest zero clearing - // 2 inverse flag bit: inverse for 1(white in black), don't inverse rest zero clearing - // 3 delete line flage bit: for 1 text with delete line,don't delete line if reset zero clearing. - // [5,4] rotate flag bit: 00 rotates 0 degree - // 01 rotates 90 degree - // 10 rotates 180 degree - // 11 rotates 270 degree - // [11,8] font width magnification times; - // [15,12] font height magnification times; - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to ShiftJIS encoding. -AUTOREPLYPRINT_API int CP_Label_DrawTextInShiftJIS(void *handle, int x, int y, int font, int style, const wchar_t *str); - - // draw text in assigned position of label page.only for single line - // - // handle - // Port handle, returned by OpenXXX - // - // x - // define text start position x coordinates,the value range is: [0,Page_Width-1] - // - // y - // define text start position y coordinates,the value range is: [0,Page_Height-1] - // - // font - // Choose font, can use 24. - // some printer can use 16, [20,99]. - // - // style - // chracter style. - // Databits define - // 0 Bold flag bit: font bold for 1,don't bold if reset zero clearing. - // 1 underline flag bit: underline text for 1, don't underline if rest zero clearing - // 2 inverse flag bit: inverse for 1(white in black), don't inverse rest zero clearing - // 3 delete line flage bit: for 1 text with delete line,don't delete line if reset zero clearing. - // [5,4] rotate flag bit: 00 rotates 0 degree - // 01 rotates 90 degree - // 10 rotates 180 degree - // 11 rotates 270 degree - // [11,8] font width magnification times; - // [15,12] font height magnification times; - // - // str - // the string to print - // - // return - // If command is written successfully, it returns true else it returns false. - // - // remarks - // The function converts the data to EUCKR encoding. -AUTOREPLYPRINT_API int CP_Label_DrawTextInEUCKR(void *handle, int x, int y, int font, int style, const wchar_t *str); - - // draw text in assigned position of label page.only for single line - // - // handle - // Port handle, returned by OpenXXX - // - // x - // define text start position x coordinates,the value range is: [0,Page_Width-1] - // - // y - // define text start position y coordinates,the value range is: [0,Page_Height-1] - // - // font - // Choose font, can use 24. - // some printer can use 16, [20,99]. - // - // style - // chracter style. - // Databits define - // 0 Bold flag bit: font bold for 1,don't bold if reset zero clearing. - // 1 underline flag bit: underline text for 1, don't underline if rest zero clearing - // 2 inverse flag bit: inverse for 1(white in black), don't inverse rest zero clearing - // 3 delete line flage bit: for 1 text with delete line,don't delete line if reset zero clearing. - // [5,4] rotate flag bit: 00 rotates 0 degree - // 01 rotates 90 degree - // 10 rotates 180 degree - // 11 rotates 270 degree - // [11,8] font width magnification times; - // [15,12] font height magnification times; - // - // str - // the string to print - // - // len - // the length to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawTextInBytes(void *handle, int x, int y, int font, int style, const char *str, int len); - - // Draw 1D code in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // barcode top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // barcode top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // nBarcodeType - // barcode type - // values are defined as macros - // - // nBarcodeTextPrintPosition - // barcode readable text position, value range is [0, 3]. - // value defined as follow: - // value define - // 0 don't show readable text - // 1 show readable text below barcode - // 2 show readable text above barcode - // 3 show readable text above and below barcode - // - // height - // define barcode height - // - // unitwidth - // It assigns the basic element width. value range is [1, 4]. - // - // rotation - // Mean rotating angle, - // the value range is: [0, 3]. - // Definitions are as below: - // Rotate value define - // 0 doesn't rotate to draw - // 1 rotates 90 degree draw. - // 2 rotates 180 degree draw. - // 3 rotates 270 degree draw - // - // str - // the barcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawBarcode(void *handle, int x, int y, CP_Label_BarcodeType nBarcodeType, CP_Label_BarcodeTextPrintPosition nBarcodeTextPrintPosition, int height, int unitwidth, CP_Label_Rotation rotation, const char *str); - - // print qrcode in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // Top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // Top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // nVersion - // Assign charater version. The value range is:[0,16] - // When version is 0, printer caculates version number according to character set automatically. - // - // nECCLevel - // Assign error correction level. - // The value range is: [1, 4]. - // Definitios are as below: - // ECC error correction level - // 1 L: 7%, low error correction, much data. - // 2 M: 15%, medium error correction - // 3 Q: optimize error correction - // 4 H: 30%, the highest error correction, less data. - // - // unitwidth - // It assigns the basic element width. value range is [1, 4]. - // - // rotation - // Mean rotating angle, - // the value range is: [0, 3]. - // Definitions are as below: - // Rotate value define - // 0 doesn't rotate to draw - // 1 rotates 90 degree draw. - // 2 rotates 180 degree draw. - // 3 rotates 270 degree draw - // - // str - // the qrcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawQRCode(void *handle, int x, int y, int nVersion, CP_QRCodeECC nECCLevel, int unitwidth, CP_Label_Rotation rotation, const char *str); - - // print qrcode in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // Top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // Top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // nVersion - // Assign charater version. The value range is:[0,16] - // When version is 0, printer caculates version number according to character set automatically. - // - // nECCLevel - // Assign error correction level. - // The value range is: [1, 4]. - // Definitios are as below: - // ECC error correction level - // 1 L: 7%, low error correction, much data. - // 2 M: 15%, medium error correction - // 3 Q: optimize error correction - // 4 H: 30%, the highest error correction, less data. - // - // unitwidth - // It assigns the basic element width. value range is [1, 4]. - // - // rotation - // Mean rotating angle, - // the value range is: [0, 3]. - // Definitions are as below: - // Rotate value define - // 0 doesn't rotate to draw - // 1 rotates 90 degree draw. - // 2 rotates 180 degree draw. - // 3 rotates 270 degree draw - // - // str - // the qrcode data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawQRCodeInUTF8(void *handle, int x, int y, int nVersion, CP_QRCodeECC nECCLevel, int unitwidth, CP_Label_Rotation rotation, const wchar_t *str); - - // print qrcode in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // Top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // Top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // nVersion - // Assign charater version. The value range is:[0,16] - // When version is 0, printer caculates version number according to character set automatically. - // - // nECCLevel - // Assign error correction level. - // The value range is: [1, 4]. - // Definitios are as below: - // ECC error correction level - // 1 L: 7%, low error correction, much data. - // 2 M: 15%, medium error correction - // 3 Q: optimize error correction - // 4 H: 30%, the highest error correction, less data. - // - // unitwidth - // It assigns the basic element width. value range is [1, 4]. - // - // rotation - // Mean rotating angle, - // the value range is: [0, 3]. - // Definitions are as below: - // Rotate value define - // 0 doesn't rotate to draw - // 1 rotates 90 degree draw. - // 2 rotates 180 degree draw. - // 3 rotates 270 degree draw - // - // str - // the qrcode data to print - // - // len - // the length to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawQRCodeInBytes(void *handle, int x, int y, int nVersion, CP_QRCodeECC nECCLevel, int unitwidth, CP_Label_Rotation rotation, const char *str, int len); - - // print pdf417code in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // Top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // Top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // column - // ColNum is colnum, which means how many digits in per line. A digit is 17*UnitWidth dots. Line number is produces automatically by printer,the limited range is 3~90. ColNum value range:[1,30]. - // - // nECCLevel - // Assign error correction level. - // The value range is: [0, 8]. - // Ecc value, error correction number, stored files number(byte) - // 0 2 1108 - // 1 4 1106 - // 2 8 1101 - // 3 16 1092 - // 4 32 1072 - // 5 64 1024 - // 6 128 957 - // 7 256 804 - // 8 512 496 - // - // unitwidth - // It assigns the basic element width. value range is [1, 3]. - // - // rotation - // Mean rotating angle, - // the value range is: [0, 3]. - // Definitions are as below: - // Rotate value define - // 0 doesn't rotate to draw - // 1 rotates 90 degree draw. - // 2 rotates 180 degree draw. - // 3 rotates 270 degree draw - // - // str - // the pdf417 data to print - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawPDF417Code(void *handle, int x, int y, int column, int nAspectRatio, int nECCLevel, int unitwidth, CP_Label_Rotation rotation, const char *str); - - // Draw picture in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // Top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // Top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // dstw - // the width to print - // - // dsth - // the height to print - // - // pszFile - // image file path - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // compression_method - // print data compress method, values are defined as follow - // value define - // 0 no compress - // 1 compress level 1 - // 2 compress level 2 - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawImageFromFile(void *handle, int x, int y, int dstw, int dsth, const char *pszFile, CP_ImageBinarizationMethod binaryzation_method, CP_ImageCompressionMethod compression_method); - - // Draw picture in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // Top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // Top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // dstw - // the width to print - // - // dsth - // the height to print - // - // data - // image data - // - // data_size - // image data size - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // compression_method - // print data compress method, values are defined as follow - // value define - // 0 no compress - // 1 compress level 1 - // 2 compress level 2 - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawImageFromData(void *handle, int x, int y, int dstw, int dsth, const unsigned char *data, unsigned int data_size, CP_ImageBinarizationMethod binaryzation_method, CP_ImageCompressionMethod compression_method); - - // Draw picture in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // Top left corner x coordinates, the value range is: [0,Page_Width-1] - // - // y - // Top left corner y coordinates, the value range is: [0,Page_Height-1] - // - // img_data - // image pixels data - // - // img_datalen - // image pixels data length - // - // img_width - // image pixel width - // - // img_height - // image pixel height - // - // img_stride - // image horizontal stirde. means bytes per line. - // - // img_format - // image pixel data format, values are defined as follow - // value define - // 1 mono - // 2 monolsb - // 3 gray - // 4 r.g.b in byte-ordered - // 5 b.g.r in byte-ordered - // 6 a.r.g.b in byte-ordered - // 7 r.g.b.a in byte-ordered - // 8 a.b.g.r in byte-ordered - // 9 b.g.r.a in byte-ordered - // - // binaryzation_method - // image binaryzation method. 0 means use dithering, 1 means use thresholding, 2 means use error diffusion. - // - // compression_method - // print data compress method, values are defined as follow - // value define - // 0 no compress - // 1 compress level 1 - // 2 compress level 2 - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawImageFromPixels(void *handle, int x, int y, const unsigned char *img_data, unsigned int img_datalen, int img_width, int img_height, int img_stride, CP_ImagePixelsFormat img_format, CP_ImageBinarizationMethod binaryzation_method, CP_ImageCompressionMethod compression_method); - - // draw line in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // startx - // straightway start point x coordinates,the value range is: [0,Page_Width-1] - // - // starty - // straightway start point y coordinates,the value range is: [0,Page_Height-1] - // - // endx - // straightway end point x coordinates,the value range is: [0,Page_Width-1] - // - // endy - // straightway end point y coordinates,the value range is:[0,Page_Height-1] - // - // linewidth - // line width - // - // linecolor - // line color, 0 means white, 1 means black. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawLine(void *handle, int startx, int starty, int endx, int endy, int linewidth, CP_Label_Color linecolor); - - // draw rect in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // width - // rect width - // - // height - // rect height - // - // color - // rect color, 0 means white, 1 means black. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawRect(void *handle, int x, int y, int width, int height, CP_Label_Color color); - - // draw box in the assigned position of label page - // - // handle - // Port handle, returned by OpenXXX - // - // x - // horizontal position - // - // y - // vertical position - // - // width - // box width - // - // height - // box height - // - // borderwidth - // box border width - // - // bordercolor - // box border color, 0 means white, 1 means black. - // - // return - // If command is written successfully, it returns true else it returns false. -AUTOREPLYPRINT_API int CP_Label_DrawBox(void *handle, int x, int y, int width, int height, int borderwidth, CP_Label_Color bordercolor); - - // Query battery level - // Only some models with batteries support this command - // - // handle - // Port handle, returned by OpenXXX - // - // timeout - // timeout ms - // The wait time for query does not exceed this time - // - // return - // Returns the battery power, and a range of 0-100. returns -1 to indicate that the query failed. -AUTOREPLYPRINT_API int CP_Proto_QueryBatteryLevel(void *handle, unsigned int timeout); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/src/main/resources/win32-x86-64/autoreplyprint.lib b/src/main/resources/win32-x86-64/autoreplyprint.lib deleted file mode 100644 index 9b5e5b3..0000000 Binary files a/src/main/resources/win32-x86-64/autoreplyprint.lib and /dev/null differ diff --git a/src/main/resources/win32-x86-64/copydll.bat b/src/main/resources/win32-x86-64/copydll.bat deleted file mode 100644 index 50e0ea7..0000000 --- a/src/main/resources/win32-x86-64/copydll.bat +++ /dev/null @@ -1,4 +0,0 @@ -copy ..\..\build-autoreplyprint-QT5_6_0_VC2015_STATIC_64-Release\release\autoreplyprint.dll . /y -copy ..\..\build-autoreplyprint-QT5_6_0_VC2015_STATIC_64-Release\release\autoreplyprint.exp . /y -copy ..\..\build-autoreplyprint-QT5_6_0_VC2015_STATIC_64-Release\release\autoreplyprint.lib . /y -copy ..\..\..\autoreplyprint_src\autoreplyprint_main\autoreplyprint.h . /y