PrintBridge Core is a lightweight, high-performance Print Server built with .NET 10. It provides a modern Web Dashboard and a robust REST API to enable seamless printing from any device (Desktop, Mobile, or IoT) across your network.
- 🚀 Lightweight & Fast: Minimal resource footprint, optimized for background execution.
- 📄 PDF Printing: Silent printing using a dedicated lightweight engine (SumatraPDF).
- 🖼️ Image Support: Print JPEG, PNG, and BMP directly to any system printer.
- 📝 Text & RAW: Supports plain text and RAW/ZPL printing for label printers.
- 🔒 Secure: Token-based authentication (
X-Print-Token) to prevent unauthorized access. - 🌐 Web Dashboard: UI for managing settings, generating tokens, and viewing print history.
- 📺 Live History: Track every print job with status, client IP, and error logs using SQLite.
- 📡 Network Ready: Easily accessible across your local network.
- Backend: ASP.NET Core (.NET 10)
- Database: SQLite (Lightweight history & settings tracking)
- Frontend: Vanilla HTML5, CSS3, and JavaScript (No heavy frameworks)
- Printing Engine: Native Winspool & SumatraPDF for PDFs.
- .NET 10 SDK
- A Windows environment (for printer driver access).
- Clone the repository:
git clone https://github.com/your-username/PrintBridge-Core.git cd PrintBridge-Core - Crucial: Copy
SumatraPDF.exeto the application's runtime directory (e.g.,PrinterServer.Api/bin/Debug/net10.0/or the folder where the.exeresides). Without this file, PDF printing will not work.
To enable access from other devices on the network:
dotnet run --project PrinterServer.Api --urls "http://0.0.0.0:5166"The API is fully documented and can be interacted with using the following endpoints:
POST /print- Submit a print job (Content-Type:application/jsonormultipart/form-data).- Supports:
pdf,image,text,raw.
- Supports:
GET /printers- List all installed printers on the server.GET /settings- Retrieve current server/printer settings.POST /settings- Update global printing settings.
GET /history- Access the print audit trail.- Query Params:
status,printer,from,to,limit.
- Query Params:
GET /token- Retrieve token status and local access settings.POST /token/generate- Generate a new secure API token.POST /token/disable- Toggle token-free access for local network devices.
curl -X GET http://localhost:5166/printers -H "X-Print-Token: YOUR_TOKEN"POST /print
{
"type": "pdf",
"printer": "Canon MF272",
"base64File": "JVBERi0xLjQKJ..."
}The dashboard is available at the root URL (e.g., http://localhost:5166).
- Dashboard: View stats and available printers.
- History: Audit trail of all print jobs.
- Token Manager: Securely manage API access.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.