diff --git a/Inspectron.Epson/HtmlPrinter.cs b/Inspectron.Epson/HtmlPrinter.cs
index 7b28de8..9662888 100644
--- a/Inspectron.Epson/HtmlPrinter.cs
+++ b/Inspectron.Epson/HtmlPrinter.cs
@@ -566,6 +566,8 @@ public class HtmlPrinter : IEpsonPrinter
// Get relative path for HTML
var htmlDir = Path.GetDirectoryName(_outputPath) ?? ".";
+ if(htmlDir=="")
+ htmlDir=".";
var relativeImagePath = Path.GetRelativePath(htmlDir, imagePath).Replace('\\', '/');
// Add to HTML content
diff --git a/Inspectron.Epson/PrintServer/PrintServices/EpsonPrintService.cs b/Inspectron.Epson/PrintServer/PrintServices/EpsonPrintService.cs
index b99c65a..dc9f83d 100644
--- a/Inspectron.Epson/PrintServer/PrintServices/EpsonPrintService.cs
+++ b/Inspectron.Epson/PrintServer/PrintServices/EpsonPrintService.cs
@@ -56,6 +56,9 @@ public class EpsonPrintService: IPrintService
{
// Download logo image
var logoFileName = Path.GetFileName(new Uri(job.Document.LogoUrl).LocalPath);
+ var ext = Path.GetExtension(logoFileName).ToLowerInvariant();
+ var encodedName = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(logoFileName));
+ logoFileName = $"{encodedName}{ext}";
var logoCachePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logos");
// Ensure logos cache directory exists
diff --git a/Inspectron.Epson/PrintServer/Printers/TM-T30IIITranslated.cs b/Inspectron.Epson/PrintServer/Printers/TM-T30IIITranslated.cs
index aa3bd73..63e3e7f 100644
--- a/Inspectron.Epson/PrintServer/Printers/TM-T30IIITranslated.cs
+++ b/Inspectron.Epson/PrintServer/Printers/TM-T30IIITranslated.cs
@@ -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)