#include "pch.h"
#include "framework.h"
#include "LabelMakerSDK.h"
#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include "Label_tspl.h"
#include "Shapes_tspl.h"
#include "Text_tspl.h"
#include "Barcode1D_tspl.h"
#include "BcdAztec_tspl.h"
#include "BcdDatamatrix_tspl.h"
#include "BcdMaxicode_tspl.h"
#include "BcdPdf417_tspl.h"
#include "BcdQRCode_tspl.h"
#include "cRfidWrite_tspl.h"
#include "Coordinate.h"
Macros | |
#define | TSPL 0 |
#define | PGL 1 |
#define | UINT32 unsigned int |
#define | DLLEXINT extern "C" __declspec(dllexport) int __stdcall |
#define | DLLEXBOOL extern "C" __declspec(dllexport) bool __stdcall |
#define | DLLEXUINT32 extern "C" __declspec(dllexport) UINT32 __stdcall |
#define | DLLEXVOID extern "C" __declspec(dllexport) void __stdcall |
#define | DLLEXSHORT extern "C" __declspec(dllexport) short __stdcall |
#define | DLLEXPBYTE extern "C" __declspec(dllexport) byte* __stdcall |
#define | DLLEXSTRING extern "C" __declspec(dllexport) const char* __stdcall |
#define | DLLEXPVOID extern "C" __declspec(dllexport) void* __stdcall |
#define | NON_USED -1 |
Typedefs | |
typedef Label_tspl | LabelType |
typedef Text_tspl | TextType |
typedef MaxicodeBarcode_tspl | MexiCodeBarcodeType |
typedef Pdf417Barcode_tspl | Pdf417BarcodeType |
typedef DataMatrixBarcode_tspl | DataMatrixBarcodeType |
typedef AztecBarcode_tspl | AztecBarcodeType |
typedef QRBarcode_tspl | QRBarcodeType |
typedef cRfidWrite_tspl | RfidWriteType |
typedef Line_tspl | LineType |
typedef Box_tspl | BoxType |
typedef Barcode1D_tspl | Barcode1DType |
Enumerations | |
enum | { _MaxicodeMsgStructured = 0 , _MaxicodeMsgStructuredOpenSystemStandard , _MaxicodeMsg } |
Functions | |
DLLEXVOID | CreateLabel (int iPrintLanguageTyp, std::string LabelName, float dotsPerUnit, ScaleEnum unit) |
Create a label. | |
DLLEXPVOID | CreateTexts (float x_start, float y_start, float fontsize_x, float fontsize_y, std::string data, ScaleEnum scale, FontSizeUnitsEnum FontSizeUnit, FontStyleEnum FontStyle, AlignEnum Alignment, std::string fontName, int rotation) |
Create texts in a Label. | |
DLLEXPVOID | CreateBarcode1D (float start_x, float start_y, std::string content, ScaleEnum scale, float narrowBar, float wideBar, float Height, BarcodeTypeEnum_1D BcdTyp, bool PrintHumanReadable, RotateEnum rotation, bool PdfLocTop) |
Create barcode 1D in a Label. | |
DLLEXPVOID | CreateLines (float start_x, float start_y, float end_x, float end_y, float lineThickness, ScaleEnum scale) |
Create lines in a Label. | |
DLLEXPVOID | CreateBoxs (float start_x, float start_y, float end_x, float end_y, float lineThickness, ScaleEnum scale) |
Create boxes in a Label. | |
DLLEXPVOID | CreateMaxicodeBarcodes (int iMaxicodeTyp, MaxicodeModeEnum mode, std::string postalCode, std::string countryCode, std::string serviceClass, std::string remainingMsg, std::string year, std::string primaryMsg, float start_x, float start_y, ScaleEnum scale, bool ZipperPattern, RotateEnum rotation) |
Create Maxicode barcodes in a Label. | |
DLLEXPVOID | CreatePdf417Bcodes (float start_x, float start_y, std::string content, ScaleEnum scale, float xdim, float ydim, Pdf417ErrCorrectionEnum ErrorCorrection, int row, int col, RotateEnum rotation) |
Create PDF417 barcodes in a Label. | |
DLLEXPVOID | CreateAztecBarcodes (float start_x, float start_y, std::string content, ScaleEnum scale, float xdim, AztecCodeTypeEnum CodeType, int iFixedErrCorrection, int iLayers, RotateEnum rotation) |
Create aztec barcodes in a Label. | |
DLLEXPVOID | CreateDataMatrixBarcodes (float start_x, float start_y, std::string content, ScaleEnum scale, float xdim, RotateEnum Rotation, bool UseRectangle, std::string MatrixMultiLine, char CtrlChar1, char CtrlChar2, int row, int col) |
Create data matrix barcodes in a Label. | |
DLLEXPVOID | CreateQRBarcodes (float start_x, float start_y, std::string content, ScaleEnum scale, float xdim, QRCodeMaskEnum Mask, std::vector< std::tuple< QRCodeManualEncodingEnum, std::string > > *dataManuallyEncoded, QRCodeErrorCorrectionEnum errEnum, QRCodeModelEnum modelEnum, RotateEnum rotation) |
Create data QR barcodes in a Label. | |
std::string | ToHexString (const std::string &input) |
DLLEXPVOID | CreateRfidEncode (unsigned int a32BitField, unsigned int a16BitField, std::string a6CharAsciiString, RfidMemBlockEnum MemBlock, int iOffsetFromStart, std::string _10BytesUserData, std::string _4BytesHexUserData, RfidPasswordTypeEnum PasswordEnum, std::string Password) |
Create RFID in a Label. | |
DLLEXVOID | LabelToString (std::string &str) |
Create a label with TSPL or PGL. | |
DLLEXVOID | CloseLabel () |
Release a resource. | |
Variables | |
CLabelMakerSDKApp | theApp |
LabelType * | gpLabel = nullptr |
TextType * | gpTextType = nullptr |
MexiCodeBarcodeType * | gpMexiCodeBarcodeType = nullptr |
Pdf417BarcodeType * | gpPdf417BarcodeType = nullptr |
DataMatrixBarcodeType * | gpDataMatrixBarcodeType = nullptr |
AztecBarcodeType * | gpAztecBarcodeType = nullptr |
QRBarcodeType * | gpQRBarcodeType = nullptr |
RfidWriteType * | gpRfidWriteType = nullptr |
LineType * | gpLineType = nullptr |
BoxType * | gpBoxType = nullptr |
Barcode1DType * | gpBarcode1DType = nullptr |
PrintResolution * | gpPrinterResolution = nullptr |
Ruler * | gpRuler = nullptr |
CellRect * | gpCellRect = nullptr |
CellSquare * | gpCellSquare = nullptr |
std::vector< void * > | ObjectsPtr |
std::vector< void * > | ObjRulerPtr |
std::vector< void * > | ObjStartPtr |
std::vector< void * > | ObjEndPtr |
std::vector< void * > | ObjCellSquarePtr |
std::vector< void * > | ObjCellRectPtr |
std::vector< void * > | ObjTextItemPtr |
int | giPrintLanguageTyp = 0 |
#define DLLEXBOOL extern "C" __declspec(dllexport) bool __stdcall |
#define DLLEXINT extern "C" __declspec(dllexport) int __stdcall |
#define DLLEXPBYTE extern "C" __declspec(dllexport) byte* __stdcall |
#define DLLEXPVOID extern "C" __declspec(dllexport) void* __stdcall |
#define DLLEXSHORT extern "C" __declspec(dllexport) short __stdcall |
#define DLLEXSTRING extern "C" __declspec(dllexport) const char* __stdcall |
#define DLLEXUINT32 extern "C" __declspec(dllexport) UINT32 __stdcall |
#define DLLEXVOID extern "C" __declspec(dllexport) void __stdcall |
#define NON_USED -1 |
#define PGL 1 |
#define TSPL 0 |
#define UINT32 unsigned int |
typedef AztecBarcode_tspl AztecBarcodeType |
typedef Barcode1D_tspl Barcode1DType |
typedef Box_tspl BoxType |
typedef DataMatrixBarcode_tspl DataMatrixBarcodeType |
typedef Label_tspl LabelType |
typedef Line_tspl LineType |
typedef MaxicodeBarcode_tspl MexiCodeBarcodeType |
typedef Pdf417Barcode_tspl Pdf417BarcodeType |
typedef QRBarcode_tspl QRBarcodeType |
typedef cRfidWrite_tspl RfidWriteType |
typedef Text_tspl TextType |
anonymous enum |
DLLEXVOID CloseLabel | ( | ) |
DLLEXPVOID CreateAztecBarcodes | ( | float | start_x, |
float | start_y, | ||
std::string | content, | ||
ScaleEnum | scale, | ||
float | xdim, | ||
AztecCodeTypeEnum | CodeType, | ||
int | iFixedErrCorrection, | ||
int | iLayers, | ||
RotateEnum | rotation ) |
Create aztec barcodes in a Label.
[in] | start_x | : start point for x coordinate |
[in] | start_y | : start point for y coordinate |
[in] | content | : aztec content |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | xdim | : set a cellsize for x coordinate |
[in] | CodeType | : set a code type (e.g. AztecCodeTypeEnum::Compact) |
[in] | iFixedErrCorrection | : set the FixedErrCorrection (e.g. AztecCodeTypeEnum::FixedErrCorrection) |
[in] | iLayers | : set the layers |
[in] | rotation | : set a rotation (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted) |
DLLEXPVOID CreateBarcode1D | ( | float | start_x, |
float | start_y, | ||
std::string | content, | ||
ScaleEnum | scale, | ||
float | narrowBar, | ||
float | wideBar, | ||
float | Height, | ||
BarcodeTypeEnum_1D | BcdTyp, | ||
bool | PrintHumanReadable, | ||
RotateEnum | rotation, | ||
bool | PdfLocTop ) |
Create barcode 1D in a Label.
[in] | x_start | : start point for x coordinate |
[in] | y_start | : start point for y coordinate |
[in] | content | : barcode 1D content |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | narrowBar | : set a narrow |
[in] | wideBar | : set a wide |
[in] | Height | : set a height |
[in] | BcdTyp | : set a barcode type (e.g. BarcodeTypeEnum_1D::Code_128) |
[in] | PrintHumanReadable | : a flag to set PrintHumanReadable |
[in] | rotation | : set a rotation (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted) |
[in] | PdfLocTop | : set a flag to print human-readable data above the barcode. (Default value is below) |
DLLEXPVOID CreateBoxs | ( | float | start_x, |
float | start_y, | ||
float | end_x, | ||
float | end_y, | ||
float | lineThickness, | ||
ScaleEnum | scale ) |
Create boxes in a Label.
[in] | x_start | : start point for x coordinate |
[in] | y_start | : start point for y coordinate |
[in] | end_x | : end point for x coordinate |
[in] | end_y | : end point for y coordinate |
[in] | lineThickness | : set a lineThickness |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
DLLEXPVOID CreateDataMatrixBarcodes | ( | float | start_x, |
float | start_y, | ||
std::string | content, | ||
ScaleEnum | scale, | ||
float | xdim, | ||
RotateEnum | Rotation, | ||
bool | UseRectangle, | ||
std::string | MatrixMultiLine, | ||
char | CtrlChar1, | ||
char | CtrlChar2, | ||
int | row, | ||
int | col ) |
Create data matrix barcodes in a Label.
[in] | start_x | : start point for x coordinate |
[in] | start_y | : start point for y coordinate |
[in] | content | : data matrix content |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | xdim | : set a cellsize for x coordinate |
[in] | Rotation | : set a rotation (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted) |
[in] | UseRectangle | : set a flag to use rectangle |
[in] | MatrixMultiLine | : set a multiline string |
[in] | rotationCtrlChar1 | : set a CtrlChar1 |
[in] | rotationCtrlChar2 | : set a CtrlChar2 |
[in] | row | : set the number of rows can be used to limit the height of the barcode. |
[in] | col | : set the number of columns can be used to limit the width of the barcode. |
DLLEXVOID CreateLabel | ( | int | iPrintLanguageTyp, |
std::string | LabelName, | ||
float | dotsPerUnit, | ||
ScaleEnum | unit ) |
Create a label.
[in] | iPrintLanguageTyp | : select TSPL or PGL |
[in] | LabelName | : set a label name |
[in] | dotsPerUnit | : set DPI (203/300/600) |
[in] | unit | : set unit (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
DLLEXPVOID CreateLines | ( | float | start_x, |
float | start_y, | ||
float | end_x, | ||
float | end_y, | ||
float | lineThickness, | ||
ScaleEnum | scale ) |
Create lines in a Label.
[in] | x_start | : start point for x coordinate |
[in] | y_start | : start point for y coordinate |
[in] | end_x | : end point for x coordinate |
[in] | end_y | : end point for y coordinate |
[in] | lineThickness | : set a lineThickness |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
DLLEXPVOID CreateMaxicodeBarcodes | ( | int | iMaxicodeTyp, |
MaxicodeModeEnum | mode, | ||
std::string | postalCode, | ||
std::string | countryCode, | ||
std::string | serviceClass, | ||
std::string | remainingMsg, | ||
std::string | year, | ||
std::string | primaryMsg, | ||
float | start_x, | ||
float | start_y, | ||
ScaleEnum | scale, | ||
bool | ZipperPattern, | ||
RotateEnum | rotation ) |
Create Maxicode barcodes in a Label.
[in] | iMaxicodeTyp | : select a maxicode type (e.g. _MaxicodeMsgStructured) |
[in] | mode | : set a maxicode (e.g. MaxicodeModeEnum::MODE_2) |
[in] | postalCode | : set a postal code string |
[in] | countryCode | : set a country code string |
[in] | serviceClass | : set a service class string |
[in] | remainingMsg | : set a remaining message string |
[in] | year | : set a year string |
[in] | primaryMsg | : set a primary message string |
[in] | start_x | : start point for x coordinate |
[in] | start_y | : start point for y coordinate |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | ZipperPattern | : set a flag for zipper pattern or not |
[in] | rotation | : set a rotation (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted) |
DLLEXPVOID CreatePdf417Bcodes | ( | float | start_x, |
float | start_y, | ||
std::string | content, | ||
ScaleEnum | scale, | ||
float | xdim, | ||
float | ydim, | ||
Pdf417ErrCorrectionEnum | ErrorCorrection, | ||
int | row, | ||
int | col, | ||
RotateEnum | rotation ) |
Create PDF417 barcodes in a Label.
[in] | start_x | : start point for x coordinate |
[in] | start_y | : start point for y coordinate |
[in] | content | : PDF417 content |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | xdim | : set a cellsize for x coordinate |
[in] | ydim | : set a cellsize for y coordinate The cell size can be thought of as the width and height of the narrowest bar element within a PDF417 row. Changing the dimensions of the smallest element affects the overall width and height of the barcode. |
[in] | ErrorCorrection | : set a error correction (e.g. Pdf417ErrCorrectionEnum::LEVEL_5) |
[in] | row | : set the number of rows can be used to limit the height of the barcode. |
[in] | col | : set the number of columns can be used to limit the width of the barcode. |
[in] | rotation | : set a rotation (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted) |
DLLEXPVOID CreateQRBarcodes | ( | float | start_x, |
float | start_y, | ||
std::string | content, | ||
ScaleEnum | scale, | ||
float | xdim, | ||
QRCodeMaskEnum | Mask, | ||
std::vector< std::tuple< QRCodeManualEncodingEnum, std::string > > * | dataManuallyEncoded, | ||
QRCodeErrorCorrectionEnum | errEnum, | ||
QRCodeModelEnum | modelEnum, | ||
RotateEnum | rotation ) |
Create data QR barcodes in a Label.
[in] | start_x | : start point for x coordinate |
[in] | start_y | : start point for y coordinate |
[in] | content | : QR content |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | xdim | : set a cellsize for x coordinate |
[in] | Mask | : set a mask (e.g. QRCodeMaskEnum::Mask_4) |
[in] | dataManuallyEncoded | : set a dataManuallyEncoded |
[in] | errEnu | : set an error enum (e.g. QRCodeErrorCorrectionEnum::EC_15) |
[in] | modelEnum | : set a model enum (e.g. QRCodeModelEnumz::MODEL_1) |
[in] | rotation | : set a rotation (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted) |
DLLEXPVOID CreateRfidEncode | ( | unsigned int | a32BitField, |
unsigned int | a16BitField, | ||
std::string | a6CharAsciiString, | ||
RfidMemBlockEnum | MemBlock, | ||
int | iOffsetFromStart, | ||
std::string | _10BytesUserData, | ||
std::string | _4BytesHexUserData, | ||
RfidPasswordTypeEnum | PasswordEnum, | ||
std::string | Password ) |
Create RFID in a Label.
[in] | a32BitField | : set RFID 32 bit field |
[in] | a16BitField | : set RFID 16 bit field |
[in] | a6CharAsciiString | : set RFID 6 characters ASCII string |
[in] | MemBlock | : set a memory block (e.g. RfidMemBlockEnum::EPC) |
[in] | iOffsetFromStart | : set an offset from start |
[in] | _10BytesUserData | : set a RFID 10 bytes string |
[in] | _4BytesHexUserData | : set a RFID 4 bytes string |
[in] | PasswordEnum | : set a password enum (e.g. RfidPasswordTypeEnum::Lock) |
[in] | Password | : set a password string |
DLLEXPVOID CreateTexts | ( | float | x_start, |
float | y_start, | ||
float | fontsize_x, | ||
float | fontsize_y, | ||
std::string | data, | ||
ScaleEnum | scale, | ||
FontSizeUnitsEnum | FontSizeUnit, | ||
FontStyleEnum | FontStyle, | ||
AlignEnum | Alignment, | ||
std::string | fontName, | ||
int | rotation ) |
Create texts in a Label.
[in] | x_start | : start point for x coordinate |
[in] | y_start | : start point for y coordinate |
[in] | fontsize_x | : font size for x coordinate |
[in] | fontsize_y | : font size for y coordinate |
[in] | data | : text content |
[in] | scale | : set a scale (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | FontSizeUnit | : set a font size unit (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | FontStyle | : set a font style (FontSizeUnitsEnum::Ruler/FontSizeUnitsEnum::Points/FontSizeUnitsEnum::Percent) |
[in] | Alignment | : set a alignment for text (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch) |
[in] | fontName | : set font name |
[in] | rotation | : set a rotation (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted) |
DLLEXVOID LabelToString | ( | std::string & | str | ) |
Create a label with TSPL or PGL.
[out] | str | : TSPL or PGL strings |
std::string ToHexString | ( | const std::string & | input | ) |
int giPrintLanguageTyp = 0 |
AztecBarcodeType* gpAztecBarcodeType = nullptr |
Barcode1DType* gpBarcode1DType = nullptr |
BoxType* gpBoxType = nullptr |
CellRect* gpCellRect = nullptr |
CellSquare* gpCellSquare = nullptr |
DataMatrixBarcodeType* gpDataMatrixBarcodeType = nullptr |
LabelType* gpLabel = nullptr |
LineType* gpLineType = nullptr |
MexiCodeBarcodeType* gpMexiCodeBarcodeType = nullptr |
Pdf417BarcodeType* gpPdf417BarcodeType = nullptr |
PrintResolution* gpPrinterResolution = nullptr |
QRBarcodeType* gpQRBarcodeType = nullptr |
RfidWriteType* gpRfidWriteType = nullptr |
Ruler* gpRuler = nullptr |
TextType* gpTextType = nullptr |
std::vector<void*> ObjCellRectPtr |
std::vector<void*> ObjCellSquarePtr |
std::vector<void*> ObjectsPtr |
std::vector<void*> ObjEndPtr |
std::vector<void*> ObjRulerPtr |
std::vector<void*> ObjStartPtr |
std::vector<void*> ObjTextItemPtr |
CLabelMakerSDKApp theApp |