image printing fix
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
using Inspectron.Epson.PrintServer.Printers.Utils;
|
||||
using Inspectron.Epson.PrintServer.Printers.Utils;
|
||||
using Inspectron.Epson.PrintServer.Printers.Utils.FinalRecipe;
|
||||
using Inspectron.Epson.PrintServer.PrintServices;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using FinalReceipt = Inspectron.Epson.PrintServer.Printers.Utils.FinalRecipe.FinalReceipt;
|
||||
|
||||
namespace Inspectron.Epson.PrintServer.Printers;
|
||||
@@ -22,9 +23,14 @@ public class TM_T30IIITranslated:IPrinter
|
||||
|
||||
public async Task PrintImageAsync(string path)
|
||||
{
|
||||
await _printer.FeedLinesAsync(1);
|
||||
await _printer.SetAbsolutePrintPosition(100);
|
||||
await _printer.LoadImageAsync(Path.Combine("logos", path), 384);
|
||||
await _printer.LoadImageAsync(path, 384);
|
||||
await Task.Delay(100);
|
||||
if (_printer is HtmlPrinter)
|
||||
{
|
||||
await _printer.PrintLoadedImage();
|
||||
}
|
||||
await _printer.FeedLinesAsync(1);
|
||||
await _printer.SetAbsolutePrintPosition(0);
|
||||
}
|
||||
@@ -49,7 +55,6 @@ public class TM_T30IIITranslated:IPrinter
|
||||
}
|
||||
var converter = new ReceiptConverter(lineWidth: 48, bigFontLineWidth: 24);
|
||||
var printCommands = converter.ConvertToPrintCommands(receipt);
|
||||
await _printer.FeedLinesAsync(1);
|
||||
await _printer.SetCustomLineSpacing(22);
|
||||
|
||||
foreach (var command in printCommands)
|
||||
|
||||
Reference in New Issue
Block a user