out of paper detection

This commit is contained in:
EugeneTes
2026-02-18 13:18:19 +01:00
parent 59d7bd750a
commit 966121ece8
3 changed files with 16 additions and 2 deletions

View File

@@ -4,5 +4,7 @@ public enum PrintErrorType
{
None,
ConversionError,
Offline,
OutOfPaper,
Other
}

View File

@@ -86,6 +86,11 @@ public class PrinterQueue
_logger.LogWarning("Job failed due to conversion error, not re-queuing");
await _statusReporter.ReportStatusAsync(job, PrintJobStatus.Failed);
}
else if (result.ErrorType == PrintErrorType.Offline)
{
_logger.LogWarning("Printer is offline, job failed");
await _statusReporter.ReportStatusAsync(job, PrintJobStatus.Failed);
}
else
{
// Re-queue with retry logic