UniPRT 軟體開發套件 v2.0-pyd (Python)
 
載入中...
搜尋中...
無符合項目
LabelMakerSDK.LabelMakerSDK 類別 參考文件

公開方法(Public Methods)

 __init__ (self)
 
 WindowsFont (self, fontheight, rotation, fontstyle, fontunderline, szFaceName, content, brand, szFilePath, commTyp, ipAddress, port, macAddress, ComPort, BaudRate)
 在標籤中創建 Windows 文字圖像檔。
 
 Picture (self, x, y, strFileName)
 建立圖像標籤。
 
 CreateLabel (self, iPrintLanguageTyp, LabelName, dotsPerUnit, unit)
 建立標籤。
 
 CreateTexts (self, x_start, y_start, fontsize_x, fontsize_y, data, scale, FontSizeUnit, FontStyle, Alignment, fontName, rotation)
 建立文字標籤。
 
 CreateBarcode1D (self, start_x, start_y, content, scale, narrowBar, wideBar, Height, BcdTyp, PrintHumanReadable, rotation, PdfLocTop)
 在標籤中創建一維條碼。
 
 CreateLines (self, start_x, start_y, end_x, end_y, lineThickness, scale)
 在標籤中創建線條
 
 CreateBoxs (self, start_x, start_y, end_x, end_y, lineThickness, scale)
 在標籤中創建框
 
 CreateMaxicodeBarcodes (self, iMaxicodeTyp, mode, postalCode, countryCode, serviceClass, remainingMsg, year, primaryMsg, start_x, start_y, scale, ZipperPattern, rotation)
 在標籤中創建 Maxicode 條碼。
 
 CreatePdf417Bcodes (self, start_x, start_y, content, scale, xdim, ydim, ErrorCorrection, row, col, rotation)
 在標籤中創建 PDF417 條碼。
 
 CreateAztecBarcodes (self, start_x, start_y, content, scale, xdim, CodeType, iFixedErrCorrection, iLayers, rotation)
 在標籤中創建 aztec 條碼。
 
 CreateDataMatrixBarcodes (self, start_x, start_y, content, scale, xdim, Rotation, UseRectangle, MatrixMultiLine, CtrlChar1, CtrlChar2, row, col)
 在標籤中創建 data matrix 條碼。
 
 CreateQRBarcodes (self, start_x, start_y, content, scale, xdim, Mask, dataManuallyEncoded, errEnum, modelEnum, rotation)
 在標籤中創建 QR 條碼。
 
 ToHexString (self, input_str)
 
 CreateRfidEncode (self, a32BitField, a16BitField, a6CharAsciiString, MemBlock, iOffsetFromStart, _10BytesUserData, _4BytesHexUserData, PasswordEnum, Password)
 在標籤中創建 RFID。
 
 LabelToString (self, str)
 使用 TSPL 或 PGL 創建標籤。
 
 CloseLabel (self)
 釋放資源。
 

公開屬性

 gpLabel
 
 gpTextType
 
 gpMexiCodeBarcodeType
 
 gpPdf417BarcodeType
 
 gpDataMatrixBarcodeType
 
 gpAztecBarcodeType
 
 gpQRBarcodeType
 
 gpRfidWriteType
 
 gpLineType
 
 gpBoxType
 
 gpBarcode1DType
 
 gpPrinterResolution
 
 gpRuler
 
 gpCellRect
 
 gpCellSquare
 
 ObjectsPtr
 
 ObjRulerPtr
 
 ObjStartPtr
 
 ObjEndPtr
 
 ObjCellSquarePtr
 
 ObjCellRectPtr
 
 ObjTextItemPtr
 
 giPrintLanguageTyp
 

建構子與解構子說明文件

◆ __init__()

LabelMakerSDK.LabelMakerSDK.__init__ ( self)

函式成員說明文件

◆ CloseLabel()

LabelMakerSDK.LabelMakerSDK.CloseLabel ( self)

釋放資源。

傳回值
None
程式碼
CloseLabel();

◆ CreateAztecBarcodes()

LabelMakerSDK.LabelMakerSDK.CreateAztecBarcodes ( self,
start_x,
start_y,
content,
scale,
xdim,
CodeType,
iFixedErrCorrection,
iLayers,
rotation )

在標籤中創建 aztec 條碼。

參數
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]content: 條碼內容
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]xdim: 設定 x 座標的單元格大小
[in]CodeType: 設置代碼類型(例如 AztecCodeTypeEnum::Compact)
[in]iFixedErrCorrection: 設置固定錯誤更正(例如 AztecCodeTypeEnum::FixedErrCorrection)
[in]iLayers: 設置層數
[in]rotation: 設定旋轉角度 (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted)
傳回值
None
程式碼
CreateAztecBarcodes(0.25, 2.25, "Mr. AirTraveler, seat A, flight 200", ScaleEnum.Inch, 0.025, AztecCodeTypeEnum.Compact, NON_USED, 4, RotateEnum.None)

◆ CreateBarcode1D()

LabelMakerSDK.LabelMakerSDK.CreateBarcode1D ( self,
start_x,
start_y,
content,
scale,
narrowBar,
wideBar,
Height,
BcdTyp,
PrintHumanReadable,
rotation,
PdfLocTop )

在標籤中創建一維條碼。

參數
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]content: 條碼內容
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]narrowBar: 窄條寬度
[in]wideBar: 寬條寬度
[in]Height: 設定高度
[in]BcdTyp: 設置條碼類型(例如 BarcodeTypeEnum_1D::Code_128)
[in]PrintHumanReadable: 設定列印人眼可讀的標誌
[in]rotation: 設定旋轉角度 (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted)
[in]PdfLocTop: 設一個標誌將人類可讀的資料列印在條碼的上方 (預設值為下方)
傳回值
None
程式碼
CreateBarcode1D(0.5, 1.0 + 1.5 + 1 / 4 + 1.2, "Code 128", ScaleEnum.Inch, 0.015, 0.015 * 4.1, 1.2, BarcodeTypeEnum_1D.Code_128,
True, RotateEnum.None, False)

◆ CreateBoxs()

LabelMakerSDK.LabelMakerSDK.CreateBoxs ( self,
start_x,
start_y,
end_x,
end_y,
lineThickness,
scale )

在標籤中創建框

參數
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]end_x: X 座標的終點
[in]end_y: Y 座標的終點
[in]lineThickness: 設置線條粗細
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
傳回值
None
程式碼
CreateBoxs(0.5, 1.25, 3.5, 2.25, 1/16, ScaleEnum.Inch)

◆ CreateDataMatrixBarcodes()

LabelMakerSDK.LabelMakerSDK.CreateDataMatrixBarcodes ( self,
start_x,
start_y,
content,
scale,
xdim,
Rotation,
UseRectangle,
MatrixMultiLine,
CtrlChar1,
CtrlChar2,
row,
col )

在標籤中創建 data matrix 條碼。

參數
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]content: 條碼內容
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]xdim: 設定 x 座標的單元格大小
[in]Rotation: 設定旋轉角度 (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted)
[in]UseRectangle: 設置標誌以使用矩形
[in]MatrixMultiLine: 設置多行字串
[in]rotationCtrlChar1: 設置 CtrlChar1
[in]rotationCtrlChar2: 設置 CtrlChar2
[in]row: 設定行數以限制條碼的高度
[in]col: 設定列數以限制條碼的寬度
傳回值
None
程式碼
CreateDataMatrixBarcodes(2.25, 0.25, "Line 1 DataMatrix", ScaleEnum.Inch, NON_USED, RotateEnum.None, False, "Line 2 content/r/nLine 3 content", 0x0D, 0x0A, 0, 0)

◆ CreateLabel()

LabelMakerSDK.LabelMakerSDK.CreateLabel ( self,
iPrintLanguageTyp,
LabelName,
dotsPerUnit,
unit )

建立標籤。

參數
[in]iPrintLanguageTyp: 設定 TSPL 或 PGL
[in]LabelName: 設定標籤名
[in]dotsPerUnit: 設定 DPI (203/300/600)
[in]unit: 單位設定 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
傳回值
None
程式碼
CreateLabel(TSPL, "SimpleLabel", 300, ScaleEnum.Inch)

◆ CreateLines()

LabelMakerSDK.LabelMakerSDK.CreateLines ( self,
start_x,
start_y,
end_x,
end_y,
lineThickness,
scale )

在標籤中創建線條

參數
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]end_x: X 座標的終點
[in]end_y: Y 座標的終點
[in]lineThickness: 設置線條粗細
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
傳回值
None
程式碼
CreateLines(2.5, 1/16, 2.5, 1.0, 1/32, ScaleEnum.Inch)

◆ CreateMaxicodeBarcodes()

LabelMakerSDK.LabelMakerSDK.CreateMaxicodeBarcodes ( self,
iMaxicodeTyp,
mode,
postalCode,
countryCode,
serviceClass,
remainingMsg,
year,
primaryMsg,
start_x,
start_y,
scale,
ZipperPattern,
rotation )

在標籤中創建 Maxicode 條碼。

參數
[in]iMaxicodeTyp: 選擇 MaxiCode 類型(例如 _MaxicodeMsgStructured)
[in]mode: 設置 maxicode(例如 MaxicodeModeEnum::MODE_2)
[in]postalCode: 設置郵遞區編碼字串
[in]countryCode: 設置國家/地區代碼字串
[in]serviceClass: 設置服務類字串
[in]remainingMsg: 設置剩餘的消息字串
[in]year: 設置年份字串
[in]primaryMsg: 設置主消息字串
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]ZipperPattern: 是否為 zipper pattern 設置標誌
[in]rotation: 設定旋轉角度 (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted)
傳回值
None
程式碼
CreateMaxicodeBarcodes(_MaxicodeMsgStructured, MaxicodeModeEnum.MODE_2, "902557317", "800", "200", "Maxicode Carrier Standard", "", "", 0.5, 0.5, ScaleEnum.Inch, False, RotateEnum.None)

◆ CreatePdf417Bcodes()

LabelMakerSDK.LabelMakerSDK.CreatePdf417Bcodes ( self,
start_x,
start_y,
content,
scale,
xdim,
ydim,
ErrorCorrection,
row,
col,
rotation )

在標籤中創建 PDF417 條碼。

參數
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]content: 條碼內容
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]xdim: 設定 x 座標的單元格大小
[in]ydim: 設定 y 座標的單元格大小
單元格大小可以視為 PDF417 條碼行中最窄條形元素的寬度和高度。
改變最小元素的尺寸會影響條碼的整體寬度和高度。
[in]ErrorCorrection: 設置錯誤更正級別(例如 Pdf417ErrCorrectionEnum::LEVEL_5)
[in]row: 設定行數以限制條碼的高度
[in]col: 設定列數以限制條碼的寬度
[in]rotation: 設定旋轉角度 (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted)
傳回值
None
程式碼
CreatePdf417Bcodes(0.25, 2.0, someShortText, ScaleEnum.Inch, 0.015, 0.05, Pdf417ErrCorrectionEnum.LEVEL_5, NON_USED, NON_USED, RotateEnum.None)

◆ CreateQRBarcodes()

LabelMakerSDK.LabelMakerSDK.CreateQRBarcodes ( self,
start_x,
start_y,
content,
scale,
xdim,
Mask,
dataManuallyEncoded,
errEnum,
modelEnum,
rotation )

在標籤中創建 QR 條碼。

參數
[in]start_x: x 座標的起始點
[in]start_y: Y 座標的起始點
[in]content: 條碼內容
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]xdim: 設定 x 座標的單元格大小
[in]Mask: 設置遮罩(例如 QRCodeMaskEnum::Mask_4)
[in]dataManuallyEncoded: 設置手動編碼數據
[in]errEnu: 設置錯誤更正枚舉(例如 QRCodeErrorCorrectionEnum::EC_15)
[in]modelEnum: 設置模型枚舉(例如 QRCodeModelEnum::MODEL_1)
[in]rotation: 設定旋轉角度 (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted)
傳回值
None
程式碼
CreateQRBarcodes(1.75, 3.75, "", ScaleEnum.Inch, 0.025, QRCodeMaskEnum.Mask_4, dataManuallyEncoded,
QRCodeErrorCorrectionEnum.NON_USED, QRCodeModelEnum.NON_USED, RotateEnum.None)

◆ CreateRfidEncode()

LabelMakerSDK.LabelMakerSDK.CreateRfidEncode ( self,
a32BitField,
a16BitField,
a6CharAsciiString,
MemBlock,
iOffsetFromStart,
_10BytesUserData,
_4BytesHexUserData,
PasswordEnum,
Password )

在標籤中創建 RFID。

參數
[in]a32BitField: 設置 RFID 32 位字段
[in]a16BitField: 設置 RFID 16 位字段
[in]a6CharAsciiString: 設置 RFID 6 個字符的 ASCII 字串
[in]MemBlock: 設置記憶體區塊(例如 RfidMemBlockEnum::EPC)
[in]iOffsetFromStart: 設置從起始點的偏移量
[in]_10BytesUserData: 設置 RFID 10 字節字串
[in]_4BytesHexUserData: 設置 RFID 4 字節字串
[in]PasswordEnum: 設置密碼枚舉(例如 RfidPasswordTypeEnum::Lock)
[in]Password: 設置密碼字串
傳回值
None
程式碼
CreateRfidEncode(a32BitField, a16BitField, a6CharAsciiString, RfidMemBlockEnum.User, 2, "MyUserData", "0ABCDE0F", RfidPasswordTypeEnum.None, "")
這是此函數的引用函數圖:

◆ CreateTexts()

LabelMakerSDK.LabelMakerSDK.CreateTexts ( self,
x_start,
y_start,
fontsize_x,
fontsize_y,
data,
scale,
FontSizeUnit,
FontStyle,
Alignment,
fontName,
rotation )

建立文字標籤。

參數
[in]x_start: x 座標的起始點
[in]y_start: Y 座標的起始點
[in]fontsize_x: x 座標的字體大小
[in]fontsize_y: Y 座標的字體大小
[in]data: 文字內容
[in]scale: 設置比例 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]FontSizeUnit: 設定字體大小單位 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]FontStyle: 設定字體樣式 (FontSizeUnitsEnum::Ruler/FontSizeUnitsEnum::Points/FontSizeUnitsEnum::Percent)
[in]Alignment: 設定文字對齊方式 (ScaleEnum::Dot/ScaleEnum::MM/ScaleEnum::Inch)
[in]fontName: 設定字體名稱
[in]rotation: 設定旋轉角度 (RotateEnum::None/RotateEnum::ClockWise/RotateEnum::CounterClockWise/RotateEnum::Inverted)
傳回值
None
程式碼
CreateTexts(2.0, 1.25 + 7 / 16, 3 / 16, 7 / 16, "MY MAGIC", ScaleEnum.Inch, FontSizeUnitsEnum.Ruler,
(FontStyleEnum)NON_USED, AlignEnum.Center, "93952.sf", RotateEnum.None)

◆ LabelToString()

LabelMakerSDK.LabelMakerSDK.LabelToString ( self,
str )

使用 TSPL 或 PGL 創建標籤。

參數
[out]str: TSPL 或 PGL 字串
傳回值
None
程式碼
LabelToString(LabelString);
    \~Chinese @brief        使用 TSPL 或 PGL 创建标签。
    \~Chinese @param[out]   str : TSPL 或 PGL 字符串
    \~Chinese @return           None
    \~Chinese @par 程序代码
    \~Chinese @code
    LabelToString(LabelString);
    @endcode

◆ Picture()

LabelMakerSDK.LabelMakerSDK.Picture ( self,
x,
y,
strFileName )

建立圖像標籤。

參數
[in]x: x 座標的起始點
[in]y: y 座標的起始點
[in]strFileName: 檔案路徑或檔案名稱
傳回值
None
程式碼
Picture(100, 200, "BmpWindowsFont.bmp") # TSC
Picture(5, 1, "BmpWindowsFont") # PTX

◆ ToHexString()

LabelMakerSDK.LabelMakerSDK.ToHexString ( self,
input_str )
呼叫此函數的函數列表:

◆ WindowsFont()

LabelMakerSDK.LabelMakerSDK.WindowsFont ( self,
fontheight,
rotation,
fontstyle,
fontunderline,
szFaceName,
content,
brand,
szFilePath,
commTyp,
ipAddress,
port,
macAddress,
ComPort,
BaudRate )

在標籤中創建 Windows 文字圖像檔。

參數
[in]fontheight: 設定字體高度, 單位:像素
[in]rotation: 旋轉標籤 90/180/270 度
[in]fontstyle: 設定字體粗體 (fontstyle >= 2) /斜體 (fontstyle % 2 == 1)
[in]fontunderline: 設定字體底線
[in]szFaceName: 設定字體樣式
[in]content: 設定文字內容
[in]brand: 設定印表機品牌, BRAND.TSC.value 或 BRAND.PTX.value
[in]szFilePath: 設定圖像檔路徑或名稱
[in]commTyp: 設定印表機傳輸介面, 例:COMM_TYP::USB_COMM
[in]ipAddress: 設定 IP 位址
[in]port: 設定印表機埠號
[in]macAddress: 設定藍芽 MAC 位址
[in]ComPort: 設定通信埠名稱
[in]BaudRate: 設定通信埠鮑率, 設定範圍:9600 bps ~ 115200 bps
傳回值
None
程式碼
WindowsFont(30, 0, 0, 0, "arial.ttf", "Test Windows Font", BRAND.TSC.value, "BmpWindowsFont.bmp", COMM_TYP.USB_COMM.value, None, 0, 0, "", 0)
WindowsFont(20, 0, 0, 0, "msjh.ttc", "測試繁體中文功能", BRAND.PTX.value, "BmpWindowsFont", COMM_TYP.TCP_COMM.value, "192.168.101.61", 9100, 0, "", 0)

資料成員說明文件

◆ giPrintLanguageTyp

LabelMakerSDK.LabelMakerSDK.giPrintLanguageTyp

◆ gpAztecBarcodeType

LabelMakerSDK.LabelMakerSDK.gpAztecBarcodeType

◆ gpBarcode1DType

LabelMakerSDK.LabelMakerSDK.gpBarcode1DType

◆ gpBoxType

LabelMakerSDK.LabelMakerSDK.gpBoxType

◆ gpCellRect

LabelMakerSDK.LabelMakerSDK.gpCellRect

◆ gpCellSquare

LabelMakerSDK.LabelMakerSDK.gpCellSquare

◆ gpDataMatrixBarcodeType

LabelMakerSDK.LabelMakerSDK.gpDataMatrixBarcodeType

◆ gpLabel

LabelMakerSDK.LabelMakerSDK.gpLabel

◆ gpLineType

LabelMakerSDK.LabelMakerSDK.gpLineType

◆ gpMexiCodeBarcodeType

LabelMakerSDK.LabelMakerSDK.gpMexiCodeBarcodeType

◆ gpPdf417BarcodeType

LabelMakerSDK.LabelMakerSDK.gpPdf417BarcodeType

◆ gpPrinterResolution

LabelMakerSDK.LabelMakerSDK.gpPrinterResolution

◆ gpQRBarcodeType

LabelMakerSDK.LabelMakerSDK.gpQRBarcodeType

◆ gpRfidWriteType

LabelMakerSDK.LabelMakerSDK.gpRfidWriteType

◆ gpRuler

LabelMakerSDK.LabelMakerSDK.gpRuler

◆ gpTextType

LabelMakerSDK.LabelMakerSDK.gpTextType

◆ ObjCellRectPtr

LabelMakerSDK.LabelMakerSDK.ObjCellRectPtr

◆ ObjCellSquarePtr

LabelMakerSDK.LabelMakerSDK.ObjCellSquarePtr

◆ ObjectsPtr

LabelMakerSDK.LabelMakerSDK.ObjectsPtr

◆ ObjEndPtr

LabelMakerSDK.LabelMakerSDK.ObjEndPtr

◆ ObjRulerPtr

LabelMakerSDK.LabelMakerSDK.ObjRulerPtr

◆ ObjStartPtr

LabelMakerSDK.LabelMakerSDK.ObjStartPtr

◆ ObjTextItemPtr

LabelMakerSDK.LabelMakerSDK.ObjTextItemPtr