Files
Print_server/Inspectron.Epson/PrintServer/Printers/TM-T30III.cs
2026-01-13 09:06:47 +01:00

47 lines
1.2 KiB
C#

using Inspectron.Epson.PrintServer.PrintServices;
using System.Net.NetworkInformation;
using System.Reflection;
namespace Inspectron.Epson.PrintServer.Printers;
public class TM_T30III:IPrinter
{
private readonly EpsonPrinter _printer;
public TM_T30III(EpsonPrinter printer)
{
_printer = printer;
}
public async Task InitAsync()
{
await _printer.InitAsync();
}
public async Task PrintImageAsync(string path)
{
await _printer.SetAbsolutePrintPosition(100);
await _printer.LoadImageAsync(Path.Combine("logos", path), 384);
await Task.Delay(100);
//await _printer.PrintLoadedImage();
await _printer.FeedLinesAsync(1);
await _printer.SetAbsolutePrintPosition(0);
}
public async Task SetFontSizeAsync(int fontSize)
{
await _printer.SetFontSizeAsync(fontSize, fontSize);
}
public async Task PrintTextAsync(string text)
{
await _printer.PrintTextAsync(text);
await _printer.FeedLinesAsync(5);
var status = await _printer.GetPrinterStatusAsync();
}
public async Task Cut()
{
await _printer.CutAsync();
}
}