Block a user
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.jsondotnet add package --source pascal --version 1.0.0 QDM.LinePrinterAbout 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
2026-05-16 15:31:01 +02:00
Assets (2)
Versions (1)
View all
NuGet
1
Pascal Demets
5.3 KiB
qdm.lineprinter.1.0.0.nupkg
4.8 KiB
qdm.lineprinter.nuspec
582 B
1.0.0
2026-05-16