Printing, PDF, verify & share
Preview clinic letterhead output, print browser copies, download signed PDFs, scan QR verification and share expiring links with optional OTP.
Who can do this: Practitioners use clinical.document.read, clinical.document.share and rx.read; owners/admins use branding.manage; receptionists/accountants use billing.read for bill print.
Where: clinical print (/app/clinical-documents/:id/print), letterhead (/app/settings/brand-profiles), public verify (/verify/:token), bill print (/app/billing/:billId/print), Rx print (/app/prescriptions/:prescriptionId/print).

Before you start
- Sign the clinical document if you need Download PDF or Share.
- Allow browser pop-ups for printing.
- Add the patient's mobile number before using OTP-protected links.
- Set up Letterhead & Branding before printing official output.
Preview and print a clinical document
- Open a document and click Print.
Result:
/app/clinical-documents/:id/printopens. - Choose Print language: English, ?????? or default. Result: Preview reloads in that language when content is available.
- Review Document preview (read-only). Result: Server-rendered HTML appears in a sandboxed preview.
- Click Print.
Result: The browser print dialog opens and
PRINTis recorded in the access log.
tip
Use browser print if the PDF is still being prepared or failed.
Download PDF
- Open the print page for a signed Final document. Result: PDF status is checked.
- If you see PDF is being prepared?, wait and try again. Result: The render job will mark the PDF ready.
- Click Download PDF when enabled.
Result: A short-lived URL opens or the PDF file downloads, and
EXPORTis logged.
Create and revoke a share link
- Click Share. Result: Share document opens.
- Choose Link valid for 1, 3, 7, 14 or 30 days. Result: Expiry is stored with the link.
- Tick Require a one-time code sent to the patient's mobile when needed. Result: The public page requires OTP. Restricted documents are OTP-gated by the server.
- Click Create link.
Result: Link created. Copy it or send it on WhatsApp. appears and
SHAREis logged. - Click Copy link or Send on WhatsApp. Result: The message contains only facility name and link.
- Click Revoke on an active link. Result: The link stops working immediately.
caution
Share links are for signed documents only. Do not paste clinical content directly into WhatsApp.
Patient opens a shared link
- The patient opens
/api/share/:token. Result: A no-cache landing page shows facility name, document number, expiry and OTP requirement. - If OTP is required, the patient requests and enters the 6-digit code. Result: A 10-minute proof is created.
- The patient views the document or PDF.
Result: Public
VIEWorEXPORTaccess is logged.
Verify a printed document
- Scan the QR code on printed output.
Result:
/verify/:tokenopens. - Read Document verification. Result: It shows document number, title, facility, signed date, content fingerprint and status.
- Check the status: Valid, Valid ? amended version, Replaced by a newer version or Voided (entered in error). Result: Authenticity is confirmed without revealing patient data.
Set letterhead and QR
- Open Letterhead & Branding. Result: Default and branch profiles are listed.
- Click New profile. Result: Profile form sections open.
- Fill Letterhead, Contact & registrations, Look & paper, Logo, signature & seal and Footer. Result: Printed output uses those settings.
- Turn on Print the verification QR code. Result: Signed document output includes a QR when available.
- Click Save. Result: Brand profile saved. appears.

Print prescriptions and bills
- Open
/app/prescriptions/:prescriptionId/print. Result: The Rx print view opens. - Use the print action. Result: Browser prints the prescription.
- Open
/app/billing/:billId/print. Result: Bill print, payment and send actions load. - If unpaid, record payment first. Result: The bill refreshes and can be printed or sent.

Troubleshooting
| Problem / message | What it means | What to do |
|---|---|---|
| ?Your browser blocked the print window. Allow pop-ups for this site and try again.? | Browser blocked print. | Allow pop-ups and retry. |
PDF_NOT_READY / ?The PDF is not ready yet? | PDF render is pending. | Use Print or retry later. |
PDF_UNAVAILABLE / ?A PDF is only available for the current signed version; print the document instead? | Not the current signed final. | Open current final or print. |
DOCUMENT_NOT_SHAREABLE / ?Only signed documents can be shared.? | Draft or unsupported status. | Sign first. |
PATIENT_PHONE_MISSING / ?The patient has no mobile number on file for the OTP check? | OTP needs a mobile. | Add mobile or do not require OTP if allowed. |
SHARE_UNAVAILABLE / ?Sharing is not configured on this server.? | Public sharing config is missing. | Ask admin to configure sharing. |
FORBIDDEN / ?You do not have permission to share documents.? | Missing clinical.document.share. | Update role permissions. |
| ?This verification code is invalid, has expired or the document is no longer available.? | QR token invalid or unavailable. | Reprint from the current signed document. |
INVALID_OTP / ?The code is incorrect or has expired.? | OTP failed. | Request and enter a fresh code. |