【实例简介】
【实例截图】
【核心代码】
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace CSHARP_POSTEK_PRINT
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
PrintLab.OpenPort("POSTEK G-2108");//打开打印机端口
PrintLab.PTK_ClearBuffer(); //清空缓冲区
PrintLab.PTK_SetPrintSpeed(4); //设置打印速度
PrintLab.PTK_SetDarkness(10); //设置打印黑度
PrintLab.PTK_SetLabelHeight(600, 16); //设置标签的高度和定位间隙\黑线\穿孔的高度
PrintLab.PTK_SetLabelWidth(800);