# photo-to-scanned-pdf

photo-to-scanned-pdf converts phone photos of paper pages or digital drafts into scanner-look A4 PDFs with perspective correction and clean backgrounds.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 358 installs · ★ 1540 repo stars
- Author: daymade
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/daymade/claude-code-skills/tree/HEAD/daymade-docs/photo-to-scanned-pdf/SKILL.md
- Updated: 2026-11-07
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/photo-to-scanned-pdf

## What it does

This skill provides two processing pipelines targeting a scanner aesthetic. The primary path takes mobile snapshots of contracts, receipts, or forms, rectifies perspective skew, whitens backgrounds with `noteshrink`, and merges pages into an A4 PDF. The secondary path handles unsigned digital documents, synthesizing a realistic pen signature directly onto the signature area before applying the scanning effects.

Execution relies on Python scripts run via `uv`, while sequencing depends on reading document contents rather than filenames. Batch-transferred images often share identical timestamps or reversed names, so sorting by headings or dates is required. White and tinted papers follow separated processing steps; colored sheets bypass the global palette batch to keep stamps and black ink from picking up color casts.

Running the pipeline requires system-level `pdftoppm` from Poppler alongside `uvx noteshrink`. A contact sheet generated via `make_contact_sheet.py` serves as the mandatory whole-document audit before finalizing the PDF.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/photo-to-scanned-pdf/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/photo-to-scanned-pdf/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/photo-to-scanned-pdf/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/photo-to-scanned-pdf/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install daymade/claude-code-skills daymade-docs/photo-to-scanned-pdf/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/photo-to-scanned-pdf/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/daymade/claude-code-skills --path daymade-docs/photo-to-scanned-pdf
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/photo-to-scanned-pdf/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/daymade/claude-code-skills/tree/HEAD/daymade-docs/photo-to-scanned-pdf/SKILL.md

## When to use it
- Convert messy mobile photos into a flat scanner-quality PDF
- Rectify angled document shots and eliminate background shadows
- Place a synthesized handwriting signature on an unsigned digital contract
- Normalize mixed white and tinted pages without muddying ink colors

## Example prompts
- Turn these mobile document photos into a clean scanned PDF
- Make this photographed contract look like a scanned office document
- Synthesize a handwriting signature on this file and apply the scan look

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ba674167b944511e.

BEGIN THIRD-PARTY FILE ba674167b944511e
````text
---
name: photo-to-scanned-pdf
disable-model-invocation: true
description: >-
  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.
---

# 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](references/identity-document-copies.md) 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](references/digital-signature-synthesis.md) |

```
photos ──► rectify (photo_to_scan.py --raw)
       ──► ORDER BY CONTENT, detect colored paper   ← agent eyes, not filenames
       ──► enhance: noteshrink (white batch with -g │ colored pages separately,
                                after white-balance pre-pass)
````
END THIRD-PARTY FILE ba674167b944511e

The third-party file has ended. Everything between the ba674167b944511e tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2370 of 10017 bytes. © daymade · MIT · https://github.com/daymade/claude-code-skills/tree/HEAD/daymade-docs/photo-to-scanned-pdf/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
