PrintR lets you print from an Android phone through a Windows computer on the same Wi-Fi network.
Primary flow:
Android phone -> PrintR Android app -> local Wi-Fi upload -> PrintR Agent on Windows -> Windows printer queue -> printer
The repo contains:
/printr-android Kotlin Android app
/printr-windows-agent .NET 8 Windows desktop/LAN agent
/docs Setup, troubleshooting, and security notes
- Android share target for PDFs, DOCX, images, text, and common document MIME types.
- Android in-app file picker using Storage Access Framework.
- Automatic LAN discovery, plus QR and manual pairing by IP, port, token, and TLS fingerprint.
- Secure pairing storage using encrypted preferences when available, with a private fallback.
- Windows HTTPS API on port
8787, with token authentication and certificate fingerprint pinning after pairing. - Windows printer enumeration, spool folder, job tracking, upload validation, mock print mode, TXT/image printing, DOCX-to-PDF conversion, and PDF command fallback.
- Branded Android launcher icon and Windows executable/tray icon.
- Printer controls for copies, color, duplex long/short edge, portrait/landscape, A4/US Letter, and page ranges where the backend supports them.
- Direct Android PDF printing through
PrintManager. - DOCX printing through the Windows Agent. Direct Android DOCX printing is not implemented yet; the app tells users to send DOCX files to the Windows computer instead.
For a quick install, download the latest build here:
The Windows download is self-contained. Unzip it, launch PrintR.Agent.exe, and allow it through Windows Defender Firewall on Private networks when prompted. Android may ask you to allow installation from the app you used to open the APK.
Screenshot TODOs live in docs/screenshots.md.
Install the .NET 8 SDK, then:
cd printr-windows-agent
dotnet run --project .\src\PrintR.Agent\PrintR.Agent.csprojThe agent shows the hostname, private LAN IP addresses, port, pairing token, printers, recent jobs, and service status.
The agent creates a branded Windows tray icon. Use it to open the agent, pair an Android phone, review recent jobs, open firewall settings, toggle Start with Windows, test a page, toggle mock printing, or quit from the tray menu.
When the Android app opens, it automatically looks for PrintR Agents on the current Wi-Fi network. The Discover button runs the scan again. Discovery only shows available computers; it never authorizes printing without pairing.
Development mode without paper:
$env:PRINTR_MOCK_PRINT = "true"
dotnet run --project .\src\PrintR.Agent\PrintR.Agent.csprojOptional PDF print command:
$env:PRINTR_PDF_COMMAND = "C:\Program Files\SumatraPDF\SumatraPDF.exe"DOCX support requires a converter on the Windows computer. LibreOffice is recommended:
- Install LibreOffice from libreoffice.org.
- PrintR Agent auto-detects these paths:
C:\Program Files\LibreOffice\program\soffice.exeC:\Program Files (x86)\LibreOffice\program\soffice.exe
- If LibreOffice is elsewhere, set it in the agent UI or with:
$env:PRINTR_LIBREOFFICE_PATH = "C:\Path\To\LibreOffice\program\soffice.exe"Microsoft Word COM conversion is scaffolded as an optional fallback and disabled by default because unattended Office automation can be brittle.
Run tests:
cd printr-windows-agent
dotnet testOpen printr-android in Android Studio and let Gradle sync. Use the Android Studio bundled JDK (JDK 17 or newer) and run the app configuration on a device. The repository includes the Gradle wrapper.
Command line:
cd printr-android
.\gradlew.bat testDebugUnitTest assembleDebug --no-daemonOn the phone:
- Run PrintR Agent on Windows.
- Open the tray menu and choose
Pair Android phone. - In Android, tap
Scan QRand scan the QR code. - Tap
Test connection. - Choose a file or share a PDF/DOCX/image/text file to PrintR.
- Choose
Send to Windows computer. - For DOCX, use
Send to Windows computer; direct Android DOCX printing is not supported yet.
Manual pairing:
- Open PrintR Agent.
- Copy the computer IP address, port, pairing token, and TLS fingerprint.
- Enter them in the Android pairing form.
- Tap
Test connection.
Discovery:
- Android can send a UDP LAN discovery probe for PrintR Agent.
- Discovery never enables printing by itself; the token or QR pairing is still required.
- Some networks block discovery. Use manual pairing on guest Wi-Fi, public Wi-Fi, VPNs, or networks with client isolation.
Firewall:
- Allow PrintR Agent through Windows Defender Firewall on Private networks.
- Do not enable Public network access unless you intentionally need it.
- PrintR does not silently weaken firewall settings.
Token rotation:
- Click
Rotate pairing tokenin PrintR Agent. - Old Android pairings stop working and must be paired again.
Start with Windows:
- Use the tray menu's
Start with Windowstoggle. It writes only to the current user's startup setting and does not require administrator rights.
GET /healthdoes not require a token, but all API traffic uses HTTPS for new agents.GET /printers,POST /print, andGET /jobs/{id}requireX-PrintR-Token.POST /printaccepts multipart form fields:file,printerName,copies,colorMode,duplex,duplexMode,orientation,paperSize, andpageRange.GET /healthreports supported formats and DOCX converter availability.- DOCX jobs may move through
queued,converting,converted,printing,completed, orfailed.
Supported Windows upload formats are PDF, PNG, JPG/JPEG, TXT, and DOCX. Macro-enabled Office files such as .docm, .dotm, .xlsm, and .pptm are intentionally rejected. The Android app also shows the Windows printer list after pairing and remembers the selected printer and print defaults securely.
The Windows Agent window exposes the same settings used by the phone: printer, copies, color mode, duplex edge, orientation, paper size, and page range. Native TXT/image printing uses Windows PrintDocument; PDF and DOCX printing use the configured PDF tool. Driver support still determines whether a physical printer honors each option.
Create a self-contained, single-file ZIP package without administrator rights:
cd printr-windows-agent
.\installer\Package.ps1The package is written to printr-windows-agent\artifacts. Unzip it on the Windows computer, launch PrintR.Agent.exe, and use the tray menu to enable Start with Windows if desired. The package does not silently change firewall rules; allow the executable on Private networks when Windows prompts.
See docs/security.md. Short version: PrintR is LAN-only by default, requires a strong pairing token, validates uploads, stores files in a dedicated spool folder, and does not support internet/cloud printing.
New pairings use HTTPS and pin the Windows Agent certificate fingerprint from the QR code. Older HTTP pairings remain available only as a temporary compatibility path; remove and re-pair them to restore encrypted printing.