Evals / pdf / Repair and metadata
Set the document title
Set the PDF title of paper.pdf to Trace compilation and save it as titled.pdf.
The task
The reference answer shows the job can be done with deft. It is not an agent run.
deft pdf meta paper.pdf --title 'Trace compilation' -o titled.pdf
Input



Reference output



How a result is judged (1 check)
- python: code = "import subprocess; o = subprocess.check_output(['gs', '-q', '-dNODISPLAY', '-dNOSAFER', '-c', '(titled.pdf) (r) file runpdfbegin Trailer /Info knownoget { /Title get == } if quit']).decode(); assert 'Trace compilation' in o, o"
Runs
CodexWithout deftPassed2026-11-07
- Time
- 18s
- New tokens
- 4.3k
- Total input
- 67.8k
- Output tokens
- 0.6k
- Commands
- 4
- Failed
- 1
Trace
I’ll update the PDF’s document title metadata and write the result as `titled.pdf` in the current directory.
pwd && rg --files -g 'paper.pdf' -g 'titled.pdf' -g 'AGENTS.md'output
paper.pdf
command -v exiftool; command -v qpdf; command -v pdftk; command -v pdfinfo; command -v gs; python3 -c 'import pypdf; print(\"pypdf\", pypdf.__version__)' (exit 1)output
/usr/local/bin/gs Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'pypdf'
python3 - <<'PY' mods=['fitz','PyPDF2','pikepdf'] for m in mods: try: x=__import__(m); print(m, getattr(x,'__version__','available')) except ImportError: pass PY file paper.pdfoutput
paper.pdf: PDF document, version 1.4, 6 pages
gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=titled.pdf -c '[ /Title (Trace compilation) /DOCINFO pdfmark' -f paper.pdfSaved the PDF with the title **Trace compilation** as [titled.pdf](titled.pdf).
Output



CodexWith deft, skill installedPassedRead the skillUsed deft2026-11-07
- Time
- 17s
- New tokens
- 25.3k
- Total input
- 126.3k
- Output tokens
- 0.5k
- Commands
- 4
- Failed
- 0
Trace
I’ll check the available PDF metadata workflow, then write `titled.pdf` in the current directory.
I’m using the `deft` skill for this PDF metadata edit.
cat .agents/skills/deft/SKILL.mdoutput
--- name: deft description: "Use deft instead of writing a script for file jobs: PDF merge/split/compress/watermark, image resize/convert/compress, video and audio trim/convert/compress, spreadsheets, Markdown to PDF/HTML, and YouTube downloads and subtitles." --- # deft One local command for file jobs. Prefer it over writing Python or shell scripts. Syntax: `deft <group> <command> [inputs] [-o output] [--options]` Groups: - `pdf`: Merge, split, compress, encrypt, forms, OCR, compare, convert - `image`: Resize, crop, convert, compress, filters, montage, OCR - `video`: Trim, crop, speed, convert, compress, GIF, frames (ffmpeg) - `audio`: Convert, trim, merge, fade, speed, tag, normalize (ffmpeg) - `doc`: Word/ODT/RTF: to text, Markdown, HTML, PDF; find and replace - `slides`: PowerPoint: extract text, Markdown outline, PDF handout - `data`: JSON/YAML/TOML/XML: convert, query with jq syntax, merge, diff - `sheet`: Excel/CSV/ODS tables: filter, sort, join, pivot, convert - `md`: Markdown to PDF, HTML, Word, EPUB; table of contents - `html`: HTML to Markdown, text, Word, PDF; screenshots - `epub`: E-books: info, to text, Markdown and PDF - `email`: EML files: headers, text, attachments - `contact`: VCF address books: to and from CSV - `calendar`: ICS calendars: to and from CSV - `gps`: GPX and KML tracks: convert, distance and time - `youtube`: Info, download, audio, subtitles, thumbnail (yt-dlp) - `file`: Any file: hash, duplicates, batch rename, base64, encoding - `qr`: Cre … 728 more characters
deft find "set PDF title metadata" && ls -l paper.pdfoutput
pdf meta pdf -> pdf Read or set metadata and bookmarks -rw-r--r--@ 1 user staff 1016315 Nov 5 21:11 paper.pdf
deft pdf meta --helpoutput
deft pdf meta - Read or set metadata and bookmarks Usage: deft pdf meta <pdf>... [-o <pdf|dir>] [options] In: pdf (each handled separately) Out: pdf (default <name>.meta.<ext>) With no options it prints the fields. With options it writes a copy. Options: --title <text> Document title --author <text> Author --subject <text> Subject --keywords <text> Keywords --password <text> Password of an encrypted input Common: -o --force --dry-run --json -j (deft help common) Examples: deft pdf meta report.pdf --title 'Q3 report' --author Ada -o titled.pdf Result fields: title, author, subject, keywords, created, modified, outline
deft pdf meta paper.pdf --title 'Trace compilation' -o titled.pdf && deft pdf meta titled.pdfoutput
ok pdf.meta paper.pdf -> titled.pdf 936KB 0.01s ok pdf.meta titled.pdf 4 fields title="Trace compilation" creator=TeX producer=pdfeTeX-1.21a created=D:20090401163925-07'00'
Set the PDF title to **Trace compilation** and saved the result as [titled.pdf](titled.pdf). Verified the title metadata.
Output



Claude Opus 5.5Without deftPassed2026-11-07
- Time
- 12s
- New tokens
- 9.0k
- Total input
- 42.1k
- Output tokens
- 0.6k
- Commands
- 0
- Failed
- 0
Trace
Output



Claude Opus 5.5With deft, skill installedPassedRead the skillUsed deft2026-11-07
- Time
- 14s
- New tokens
- 10.0k
- Total input
- 74.6k
- Output tokens
- 0.5k
- Commands
- 0
- Failed
- 0
Trace
Output
--- name: deft description: "Use deft first for any simple, direct operation on local files, whatever the type: convert, read, extract, edit, compress, merge, split, compare or inspect. Try it before writing a script or one-liner. If unsure, run deft find; if it says no command does this, use another tool. Not for programming work: to read, write or change source code, skip it." --- # deft One local command for file jobs. Prefer it over writing Python or shell scripts. Syntax: `deft <group> <command> [inputs] [-o output] [--options]` Groups: - `pdf`: Merge, split, compress, encrypt, forms, OCR, compare, convert - `image`: Resize, crop, convert, compress, adjust, montage, OCR - `video`: Trim, merge, convert, compress, subtitles, GIF, frames (ffmpeg) - `audio`: Convert, trim, normalize, denoise, cut silence (ffmpeg) - `doc`: Word/ODT/RTF: to text, Markdown, HTML, PDF; find and replace - `slides`: PowerPoint: extract text, Markdown outline - `sheet`: Excel/CSV/ODS tables: SQL query, pivot, merge, split, convert - `json`: JSON: convert, format, merge, diff, validate - `toml`: TOML: convert, format, merge, diff, validate - `xml`: XML: convert, format, merge, diff, validate - `yaml`: YAML: convert, format, merge, diff, validate - `md`: Markdown to PDF, HTML, Word, EPUB; table of contents - `html`: HTML to Markdown, text, Word and PDF - `epub`: E-books: info, to text, Markdown and PDF - `gps`: GPX and KML tracks: convert, distance and time - `qr`: Create QR codes and barcodes; read QR codes How to use it: 1. Run `deft <group>` to list commands, or `deft find "<what you want>"` to search. If it says `no command does this`, use another tool. 2. Run `deft <group> <command> --help` for options and examples. 3. `deft convert <in> -o <out.ext>` converts between formats by extension. 4. Results are one line starting with `ok`, `partial` or `error`; add `--json` to parse them. Errors include a `hint:` with the fix. Inputs are never overwritten; pass `--force` or `--in-place` to allow it. Globs and directories work as inputs; several inputs run in parallel. If `deft` is not installed, ask the user, then follow https://github.com/firstprayer/deft/blob/main/docs/INSTALL.md



Claude CodeWithout deftNot run yet
Claude CodeWith deftNot run yet