Scan Me
Web App for Frappe and ERPNext to Use QR and Barcode
- Author: Tusharp21
- Repository: https://github.com/Tusharp21/scan_me
- GitHub stars: 17
- Forks: 18
- License: MIT
- Category: Developer Tools
- Maintenance: Actively Maintained
- Frappe versions: develop
Install Scan Me
bench get-app https://github.com/Tusharp21/scan_me
Add the Frappe Gems badge to your README
Maintain Scan Me? Paste this into your README:
[](https://frappegems.com/gems/apps/Tusharp21/scan_me)
About Scan Me
Scan Me
A Frappe app that turns any allowlisted document into a verifiable, signable PDF — with a Chromium-based PDF pipeline, QR-backed verification, optional content hashing, and PAdES digital signatures recognised by Adobe Acrobat.
Features
- Verified QR per signed document (UUIDv4 + optional SHA-256 content hash + signatory metadata).
- Public verify page at
/verify_document/with a camera scanner that returns valid / tampered / invalid for any QR. - Chromium PDF pipeline (Playwright) with full modern CSS support.
- Live-preview print dialog with iframe that regenerates on every option change.
- Multi-copy PDF (1–5 copies) with
ORIGINAL/DUPLICATE/ custom labels. - Per-page header/footer modes: all pages / first only / last only / first+last / none.
- Dialog-driven QR insertion in any of four corners.
- Acrobat-style signature block rendered as an Acrobat Sign-style card.
- PAdES digital signatures via PyHanko, Adobe-compatible.
- Lockable audit trail with optional absolute lock on Verified QR records.
- Jinja helpers:
qr,barcode,qr_link,qr_img,qr_link_img,verify_qr,verify_qr_img. - Bundled Sales Invoice Scan Me print format.
Installation
bench get-app scan_me
bench install-app scan_me
Playwright's Chromium browser is downloaded automatically by the after_install hook so PDF generation works immediately.
Fallback — manual Chromium install
If the auto-download fails, run this once on the server:
./env/bin/python -m playwright install chromium
Python dependencies
- qrcode
- python-barcode
- playwright
- pypdf
- pyHanko
- cryptography
All install automatically via bench install-app.
Configuration
Open Scan Me Settings in the desk:
- Under Doctype, add the DocTypes you want to expose for QR signing. Tick
enablefor each; ticksignature_requiredif users must draw a signature before generating the QR. - Under Verification & Signing, configure:
- Allow Multiple Signers — N-party signing.
- Embed Content Hash in QR — tamper detection on doc edits.
- Lock Verified QR After Insert — absolute lock, no override.
- Use Stored User Signature Only — reads from a User custom field named
user_signature/signature/signature_image. - Apply Cryptographic PDF Signature (PAdES) — run every generated PDF through PyHanko.
- Under Print Dialog Features, toggle which sections of the print dialog your users see.
PAdES configuration
The first time PAdES signing runs, Scan Me auto-generates a 5-year self-signed PKCS#12 at sites//private/files/scan_me/signing.pfx and stores its password in site_config.json under scan_me_signing_password.
To upgrade to a CA-issued certificate:
- Obtain a PKCS#12 bundle from a trusted CA.
- Replace
sites//private/files/scan_me/signing.pfxwith the new file. - Update
scan_me_signing_passwordinsite_config.jsonto the bundle's password.
Usage
Sign a document
- Open a doc of an allowlisted DocType.
- Click Generate Verified QR in the form's menu.
- Draw a signature if prompted. A Verified QR record is created.
Generate a PDF
- Menu → Print → select a print format.
- Click the Generate PDF button in the toolbar.
- Configure copies, header/footer, QR, signature block, PAdES signing.
- Download PDF.
Verify a QR
- Open the verify page on a phone or laptop with a camera.
- Scan the QR on the printed/PDF document.
- Page shows valid (green), tampered (red, hash mismatch), or invalid (UUID unknown).
License
MIT — see license.txt.
Related Developer Tools apps for Frappe & ERPNext
- Frappe — Low code web framework for real world applications, in Python and Javascript
- Frappe Docker — Docker environment for developing, deploying, and running Frappe applications (ERPNext and custom apps) in production and development
- Builder — Craft beautiful websites effortlessly with an intuitive visual builder and publish them instantly
- Bench — CLI to manage Multi-tenant deployments for Frappe apps
- Frappe Ui — A set of components and utilities for rapid UI development
- Press — Full service cloud hosting for the Frappe stack - powers Frappe Cloud
- Gameplan — Open Source Discussions Platform for Remote Teams
- Doppio — A Frappe app (CLI) to magically setup single page applications and Vue/React powered desk pages on your custom Frappe apps.