Remote Printing
Thoth's printing architecture is designed to work securely without requiring complex firewall rules or VPNs.
Architecture: The Polling Pattern
The Printing Client is a lightweight Java application that runs on-premise.
- Outbound Connection: The client connects outbound to the Thoth server. No ports need to be opened on your local network.
- Heartbeat: Every 30 seconds, the client sends a heartbeat to Thoth, reporting its status and the list of available local printers.
- Polling: Every 5 seconds, the client polls Thoth for
PENDINGprint jobs assigned to it. - Execution: When a job is found, the client downloads the rendered document (usually PDF), sends it to the local printer using the Java Print API, and reports the result (Success/Failure) back to the server.
Setting Up a Printing Client
1. Register the Client in Thoth
- Navigate to Printing Clients.
- Click Add.
- Enter a Name and Description.
- Assign it to a Group.
- Click Save.
- Important: Note the Client Key and Client Secret.
2. Download the Client Bundle
- In the Printing Client detail page, go to the Downloads tab.
- Select your target OS (Windows, Linux, macOS).
- Decide if you want to Include JRE (highly recommended if you don't want to manage Java versions on the host).
- Click Download.
3. Installation
Unzip the downloaded bundle on your local machine.
Windows
Run thoth-client.exe or use the provided script to install it as a Windows Service.
Linux
Run the thoth-client binary. It is recommended to set it up as a systemd service:
[Unit]
Description=Thoth Printing Client
After=network.target
[Service]
Type=simple
ExecStart=/opt/thoth-client/thoth-client
Restart=always
User=thoth
[Install]
WantedBy=multi-user.target
Managing Printers (Services)
Once the client is running and connected:
- Go to the Services tab in the Printing Client detail page.
- You will see a list of all printers detected on the remote machine.
- You can Enable/Disable specific printers to control which ones are available for use in Thoth.
Monitoring Job Queues
The Job Queue tab shows every request sent to this specific client. You can track the progress of jobs (Pending, In Progress, Completed, Failed) and view error messages if a job fails (e.g., "Out of paper", "Printer offline").