Sharing your printer
Lend a printer to specific users, or promote it publicly via a short link / QR code
PrintHub supports two sharing modes. "Share by user ID" is best for lending a printer to people you trust; once added, they can submit print jobs to it as if it were their own. "Public short link / QR code" is best for public spaces (desks, club chats, dorm bulletin boards): any signed-in user can scan the code to see the printer's public information and apply to use it. The two modes are independent and can be enabled at the same time.
1. Two sharing modes
From "Settings → Printers" open the row action of the printer you want to share and click the share icon. The dialog is split into two halves: "Share by user ID" on top, the public short link and QR code on the bottom.
- Share by user ID: requires the recipient's PrintHub user ID. Best for one-to-one trusted lending; revoking is immediate.
- Public short link / QR code: each printer has a short_id of at most 5 characters. Any signed-in user who scans the code or visits the link can see the printer's public info (name, location, status, whether approval is required).
- Note: scanning a QR code does NOT automatically grant usage rights. The owner still needs to add the recipient by user ID. The scan page is for information and (future) application only.
2. Share by user ID
In the share dialog, paste the recipient's PrintHub user ID into the "Target user ID" field and click "Add share".
- Ask the recipient to open their profile page; the user ID is shown under the avatar and looks like u_xxxxxxxx;
- Paste the ID into the share dialog;
- Click "Add share". The new record appears in the list immediately;
- The recipient refreshes the printer list on the print page and can submit jobs like with their own printer.
Sharing is instantaneous: once added, the recipient can submit jobs immediately. Revoking instantly stops them and any in-flight jobs are marked "permission revoked".
3. Public short link and QR code
Every printer is assigned a short_id (≤5 chars, [0-9a-z]) at creation. Older printers may not have one yet. The short_id is shown in the QR section of the share dialog.
- QR image: served from the anonymous endpoint /s/qr/{short_id} as a 256x256 PNG.
- Copy link: clicking "Copy link" writes the full URL such as https://printhub.example.com/s/abc12 to the clipboard.
- Scanner experience: after scanning, the user is taken to the public printer info page. Login is required to see the full set of fields.
Print the QR and stick it on your desk, the club wall, or the new-student orientation package. Anyone who scans it can see the printer's location, status, and whether owner approval is required.
4. Printing the share code
In the share dialog, click "Print QR code" to open the "Print share code" dialog.
- Layout: pick 1 / 2 / 3 QR codes per landscape A4 sheet (default 1 per page).
- Preview: the dialog shows a single QR plus the printer name and the "Scan to connect printer" hint.
- When you click "Print", the frontend arranges n QRs on a landscape A4 canvas with the canvas API, then uses @skyprint/image2pdf to turn it into a PDF.
- The PDF is uploaded as a temporary private document (visibility=private), then a print job is submitted to this printer. The printer-agent pulls the PDF and prints it.
The whole pipeline runs in the frontend and does not depend on the browser's print dialog. You can also save the resulting PDF and print it from another device.
5. Revoking access
In the share dialog, find the user in the "Current shares" list, click "Revoke" and confirm in the dialog.
- Revoke is immediate: after the recipient refreshes, the printer disappears from their list.
- Jobs already pushed to the agent but not yet printed are marked as permission-revoked; the agent will not deliver them to the physical printer.
- The public short link / QR code is not affected by revoke: it only shows public info. Whether someone can actually use the printer is governed by the per-user whitelist.
To shut down the public short link entirely, delete the printer from Settings → Printers. After deletion the short_id is also retired.
6. FAQ
If something goes wrong while sharing, check here first.
sharePrinterDocsPage.sections.faq.outro