Initial commit: LAAPC Print Service - Windows service with multi-tray printing, IPC queue management, PDF testing support, and self-installing CLI
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
namespace PrintService.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration for document types
|
||||
/// </summary>
|
||||
public class DocumentConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Name/identifier of the document type
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Printer name to send to
|
||||
/// </summary>
|
||||
public string PrinterName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Sequence of tray numbers to use (1-based, e.g., [3, 4, 1, 2])
|
||||
/// These will be mapped to physical PaperSource indexes
|
||||
/// </summary>
|
||||
public int[] TraySequence { get; set; } = Array.Empty<int>();
|
||||
|
||||
/// <summary>
|
||||
/// Font name to use for rendering
|
||||
/// </summary>
|
||||
public string FontName { get; set; } = "Courier New";
|
||||
|
||||
/// <summary>
|
||||
/// Font size in points
|
||||
/// </summary>
|
||||
public float FontSize { get; set; } = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// Vertical offset adjustment (in pixels)
|
||||
/// </summary>
|
||||
public int VerticalOffset { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Horizontal offset adjustment (in pixels)
|
||||
/// </summary>
|
||||
public int HorizontalOffset { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Text transformation rules (regex patterns to remove/replace)
|
||||
/// </summary>
|
||||
public List<TextTransform> Transformations { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Whether to archive files after printing (true) or delete them (false)
|
||||
/// </summary>
|
||||
public bool ArchiveAfterPrint { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Archive folder path (if ArchiveAfterPrint is true)
|
||||
/// </summary>
|
||||
public string? ArchivePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Output folder for PDF files (when using "Microsoft Print to PDF")
|
||||
/// If specified, PDFs will be saved to this folder automatically
|
||||
/// </summary>
|
||||
public string? OutputPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skip post-processing (archive/delete) to leave files in queue for repeated testing
|
||||
/// Useful for development and testing scenarios
|
||||
/// </summary>
|
||||
public bool SkipPostProcessing { get; set; } = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Text transformation rule
|
||||
/// </summary>
|
||||
public class TextTransform
|
||||
{
|
||||
/// <summary>
|
||||
/// Regex pattern to match
|
||||
/// </summary>
|
||||
public string Pattern { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Replacement text (empty string to remove)
|
||||
/// </summary>
|
||||
public string Replacement { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Description of what this transformation does
|
||||
/// </summary>
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user