PrintToVeraeTimeStamp/docs/ios-shortcut/README.md
Cursor Agent a7e42e6034
Return the stamped PDF to the device that sent it.
POST /api/stamp runs the print pipeline and responds with the certificate, or a zip of the original, the certificate, and the receipt. The receipts page links an iPhone shortcut, and mDNS advertises _verae._tcp without a second IPP name.

Co-authored-by: George Lambert <marchon@gmail.com>
2026-10-05 01:07:27 +00:00

2.5 KiB
Raw Blame History

Verae Timestamp iPhone shortcut

Build this in the Shortcuts app. It shows up in the Share sheet, sends the PDF or photo to the Verae printer on your Wi-Fi, and saves the stamped certificate. A signed .shortcut file is not included: Apple only accepts shortcuts signed on a Mac or iPhone, and this tree is built on Linux.

Open the receipts page on a computer (http://<printer>:631/receipts, or 8632 if CUPS is using 631). The QR code opens http://<printer>:<port>/ios-shortcut on the phone, which repeats these steps and shows the stamp address for this machine.

Build it

  1. Open Shortcuts and tap +. Name the shortcut Verae Timestamp.
  2. Tap the shortcut’s (i) or settings and turn on Show in Share Sheet.
  3. Under share sheet types, leave PDFs and Images selected. You can clear the other types.
  4. Add Get Contents of URL.
    • URL: http://<printer>:<port>/api/stamp
      If the receipts page has a PIN, use http://<printer>:<port>/api/stamp?access=YOURPIN.
    • Method: POST.
    • Request Body: File.
    • File: Shortcut Input.
    • Add a header X-Filename if you want the job title to be the file name. The server also accepts Content-Disposition: attachment; filename="Contract.pdf". PDF and JPEG are recognized from the file bytes, so a photo from the share sheet works.
  5. Add Quick Look and pass the contents of the URL. That is the stamped certificate PDF.
  6. Add Save File. Leave Ask Where to Save on and pick iCloud Drive or On My iPhone when it asks.
  7. Show the receipt id:
    • Add Get Dictionary Value.
    • Dictionary: the Headers of the Get Contents of URL result.
    • Key: X-Verae-Receipt-Id.
    • Add Show Result (or Show Notification) with that value.
    • X-Verae-SHA256 is the document hash. X-Verae-Receipt-JSON is the URL of the .verae.json summary on the printer.

To get a zip instead, change the URL to end in ?format=zip (use &access= if you already have ?access=). Save File then receives original.pdf, certificate.pdf, and receipt.json.

Use it

In Files or Photos, open a PDF or picture, tap Share, and choose Verae Timestamp. If it is missing, tap More and enable it.

The printer records the request as a job, lists it on the receipts page, and emails the stamped PDF when Email stamped PDFs is on. The shortcut does not wait for the email. The PDF in the shortcut result is the certificate.

The stamp address is only for Private and Domain networks, same as the printer. A wrong or missing PIN returns 401 and no PDF.