Agent skill · creative production · daymade
photo-to-scanned-pdf
Two pipelines ending at a scanner-look PDF. (1) Phone photos of paper documents (contracts, stamped certificates, receipts, forms, handwritten notes) → clean scanner-quality PDF: perspective rectification + noteshrink whitening + A4 assembly + mandatory whole-document check. Trigger: "把照片 做成扫描件", "photos to scanned PDF", "make this look scanned", "手机拍的 文档转 PDF", "盖章文件扫描", replacing pages in an existing scanned PDF, any CamScanner-like request. (2) A digital document with no signature yet (rendered docx/PDF, confirmation form, contract draft) → make it look hand-signed and scanned: synthesize a handwriting-style signature, composite it onto the signature line, apply the same scan-look post-processing. Trigger: "帮我做个手写签名", "生成签名盖到这份文件上", "做成签过字的扫描件", "synthesize a signature", any request for a document that needs to look signed without a real photographed signature. Do NOT hand-roll levels/contrast enhancement for scan-look — tried and rejected twice; this skill's pipeline is the proven one.
Why this skill is useful
Adds executable scripts for photo rectification and PDF assembly that automate the creation of scanned-quality documents from photos and digital files.
What it needs
Requires poppler, uv installed locally. About 6k tokens when loaded. Last updated 2026-08-07. 1,320 stars on the source repository.
What this skill does
Photo → Scanned PDF Two related pipelines, same destination look, different starting point: phone photos of paper documents, or a digital document that needs a synthetic signature before it looks signed. The pipelines that work, and the failure modes that ship wrong PDFs if skipped. Which one do you need? The input is... Use --- --- Existing ID/passport photos needed as printable copies Read identity-document copies before processing; bind required sides/pages and the recipient's accepted copy form Phone photos of an already-signed/stamped paper document This file, main pipeline below A digital document (docx/PDF) with no signature yet, and you need to make it look hand-signed references/digital-signature-synthesis.md Division of labor: scripts carry execution; you (the agent) carry the two judgment steps — content-based page ordering, and whole-document verification. Neither can be automated away: filenames lie about order, and per-page spot checks miss wrong-slot bugs. The digital-signature branch shares this same philosophy with its own two judgment calls — see the reference file. Step 0 — Dependencies Scripts are uv run single-file scripts (PEP 723); OpenCV/PIL/img2pdf resolve automatically on first run. Step 1 — Rectify Expected: one pageNN.jpg per photo, each tagged [quad]. A [FULLFRAME-fallback] tag means the paper outline wasn't found (busy background, page cut off) — view that photo and decide: retake, or accept the uncropped frame. The script handles EXIF rotation internally (cv2.imread ignores EXIF; phone photos come rotated — this silently produces sideways pages if you rectify with raw OpenCV). Step 2 — Order by content, detect colored paper (agent judgment) Read every rectified image (batch of ~6 per message) and record two things: 1. Its identity — date, title, page number, whatever distinguishes pages. Batch-exported photos (WeChat, AirDrop) get timestamps of the export moment, often all within one second — filename order is meaningless. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills daymade/photo-to-scanned-pdf