Pascal Demets pascal
  • Mouscron, Belgium
  • Joined on 2024-08-09

QDM.LinePrinter (1.0.0)

Published 2026-05-16 15:31:01 +02:00 by pascal

Installation

dotnet nuget add source --name pascal --username your_username --password your_token https://gitea.2mets.be/api/packages/pascal/nuget/index.json
dotnet add package --source pascal --version 1.0.0 QDM.LinePrinter

About this package

Line printer

LinePrinter

LinePrinter Opens the parallel port (LPT1) as if it were a file and then writes raw bytes directly to the printer. If the write succeeds, it returns true; otherwise false.

What this is typically used for

  • Legacy dot‑matrix printers
  • ESC/POS receipt printers
  • Industrial devices connected via parallel port
  • Sending raw printer commands (not GDI printing)

Features

  • Input validation : Prevents null or empty buffers.
  • Proper disposal : Both the handle and the stream are wrapped in using blocks.
  • Specific exception handling : Catches only the exceptions that matter for port access. Catches only the exceptions that matter for port access.
  • No unnecessary read access : Only FileAccess.Write is used.
  • No silent failures :The method returns false only for real port‑access problems.
Details
NuGet
2026-05-16 15:31:01 +02:00
1
Pascal Demets
5.3 KiB
Assets (2)
Versions (1) View all
1.0.0 2026-05-16