UniPRT SDK  v2.0.0.3
UniPRT.Sdk.LabelMaker.TsplLib.TSPL_Utilities 類別 參考文件

靜態公開方法(Static Public Methods)

static byte[] WindowsFont (string imageName, int fontSize, int rotation, int fontStyle, string fontFamilyName, string content)
 依據傳入參數將指定文字繪製成圖片,包裹在DOWNLOAD指令中。 更多...
 

詳細描述

範例

using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using UniPRT.Sdk.Comm;
using UniPRT.Sdk.LabelMaker.TsplLib; // imports SDK namespace
namespace Snippets
{
class MyLabel
{
public static void MainComm(string[] args)
{
byte[] download = TSPL_Utilities.WindowsFont("TMP", 50, 0, 3, "Arial", "TestString");
Picutre picutre = new Picutre(new Point(0f, 0f), "TMP");
lbl.AddObject(picutre);
string str = lbl.ToString();
Console.WriteLine(str);
//var comm = new TcpConnection("192.168.101.56", 9100);
var comm = new UsbConnection();
comm.Open();
if (comm.Connected)
{
comm.Write(download);
comm.Write(Encoding.UTF8.GetBytes(str));
}
comm.Close();
}
}
}

函式成員說明文件

◆ WindowsFont()

static byte [] UniPRT.Sdk.LabelMaker.TsplLib.TSPL_Utilities.WindowsFont ( string  imageName,
int  fontSize,
int  rotation,
int  fontStyle,
string  fontFamilyName,
string  content 
)
static

依據傳入參數將指定文字繪製成圖片,包裹在DOWNLOAD指令中。

參數
[in]fontSize字型大小 (像素)
[in]rotation文字旋轉角度 (90度/180度/270度/360度)
[in]fontStyle0: 正常 1:粗體 2:斜體 3:粗體+斜體
[in]fontFamilyName字體名稱
[in]content繪製的文字
UniPRT.Sdk.LabelMaker.TsplLib
Definition: Utilities.cs:12
UniPRT.Sdk.LabelMaker.Interfaces
Definition: Coordinate.cs:7
UniPRT.Sdk.LabelMaker
Definition: Coordinate.cs:7
UniPRT
提供對不同通訊介面/端口的支援
Definition: Communication.cs:9
UniPRT.Sdk.LabelMaker.TSPL.Label
Definition: Label.cs:11
UniPRT.Sdk.Comm
Definition: Communication.cs:9
UniPRT.Sdk
Definition: Communication.cs:9
UniPRT.Sdk.LabelMaker.TSPL
Definition: Barcode1D.cs:9