Skip to main content

Snapshot a PDF

Point preset AI at a brand-guidelines PDF. The scanner reads the text for declared hex literals ("Cobalt, #1F47FF"), rasterizes each page, and runs vision-per-page to infer everything the text doesn't declare. The result is the same DesignSystemSnapshot shape the other lanes produce, primitives, semantic tokens, type styles, spacing rhythm, ready to refine into your own system.

When to use the PDF lane

The PDF lane is the right starting point when:

  • You're an agency onboarding a client who has a brand-guidelines PDF but no public site or codebase yet.
  • You have a brand book that declares colors, type, and spacing in text alongside the visual examples.
  • You want exact hex values, not vision-inferred approximations, where the document declares them.

If you have a repo, prefer the codebase lane. If you have a live site, prefer the URL lane. The PDF lane is best for the brand-book-handoff case.

Run the snapshot

From your terminal:

preset snapshot --pdf brand-guidelines.pdf

Typical output:

✓ Reading brand-guidelines.pdf and capturing tokens per page...
✓ Snapshot generated in 42,180ms

Coherence score: 71 / 100
Colors:        14 primitives, 6 semantic roles
Typography:    4 type styles
Spacing:       6 distinct values

Flags

FlagDefaultWhat it does
--pdf <path>requiredThe PDF file to snapshot.
--output <file>stdoutWrite the snapshot JSON or narrative to a file instead of stdout.
--format <type>narrativenarrative for a readable summary, json for the full snapshot.
--vision-model <model>gemini-2.5-proVision model for the per-page inference. Same model set as the image lane.
--threshold <n>1Minimum usage count to keep a token.
--color-threshold <n>0.005Cluster distance threshold (0-1).
-v, --verboseoffPrint per-stage timing and observation counts.

What the scanner captures

The PDF lane runs two passes and merges them:

  1. Text mining. The scanner extracts every text run, looks for #RRGGBB and #RGB literals, and walks the immediately-preceding words for a label. A run like "Cobalt, #1F47FF" gives a token named cobalt with exact value #1F47FF, surfaced as pdfDeclaredNames on the snapshot. Declared values are authoritative, they aren't re-inferred from pixels.
  2. Per-page vision. Each page is rasterized at 144 DPI and passed through the image lane's vision-LLM + pixel-histogram pipeline. The model identifies palette, type styles, and spacing rhythm visible on the page. The pixel histogram grounds the LLM's color claims against actual page pixels.

The two passes are merged field-by-field: text-declared tokens win on hex values; vision-inferred tokens fill in everything the text didn't claim.

Page cap

By default, the scanner processes the first 15 pages and stops. A typical brand book is 20-40 pages; the first 15 carry the brand-system content (palette, type, logo). Cover pages and voice/copy pages add no token signal.

Vision-per-page cost

Each page makes one LLM call. On Gemini 2.5 Flash that's ~$0.005 per page; on Gemini 2.5 Pro it's higher (the default favors quality over cost). For a 15-page PDF, expect ~$0.07 on Pro or ~$0.075 total on Flash. The CLI never sends pages to a model you didn't pick.

What it cannot capture

LimitationWhyWorkaround
Scanned/OCR-only PDFsText mining needs real text runs; OCR-on-rendering is unreliableUse a vector-PDF source (export from Figma, Keynote, or InDesign)
Encrypted PDFspdfjs can't read encrypted streamsUnlock the file before snapshotting
Multi-PDF inputsV1 processes one PDF per commandRun twice and merge by hand, or pick the canonical brand book
Component identityThe scanner sees pages, not componentsUse the codebase lane once the system has a codebase
Animations, interactionsA PDF is a static documentUse the URL lane once there's a built product

Accuracy expectations

The PDF lane mixes two signal qualities. Trust them differently:

  1. Text-declared hexes are exact. If the PDF says #1F47FF, the snapshot value is #1F47FF. The label recovered from the surrounding words ("Cobalt", "Primary Blue") is also high-confidence: it's literally what the brand team wrote.
  2. Vision-inferred tokens carry the image lane's caveats. Vision is good at "what palette is on this page" and "what type styles appear"; it's noisier on exact spacing values and unable to capture component identity. Treat vision-inferred values as starting points to confirm, not as ground truth.
  3. Coherence scores apply per-document, not across documents. A 71/100 from one brand book isn't directly comparable to a 71/100 from another. The score reflects internal consistency of what the scanner observed, not absolute design-system maturity.

For most brand-book bootstraps, the PDF lane gives you a workable starter system in ~30-60 seconds for a 15-page document.

How the four lanes compare

CodebaseURLImagePDF
InputRepo directoryhttps://...PNG, JPG, or screenshotbrand.pdf
What it readsAST of components + token sourcesComputed styles of every visible elementPixels via vision LLM + histogramText-declared hexes + per-page vision
Symbolic namesDirect from sourceRecovered from stylesheets (best effort)Inferred from labels in the imageMined from text adjacent to hex literals
Component identityYesNoNoNo
Coherence scoresSource-level (truth)Render-level (observation)Inference-level (estimate)Mixed (text exact, vision estimate)
Best forYour own product, deep auditReference products, agency onboardingBrand decks, moodboards, single screensBrand guidelines, agency client onboarding
Speed~5s for a mid-size repo10-30s per page5-10s per image~30-60s for 15 pages
CostFreeFree locally; Browserless quota on the dashboardLLM tokens (~$0.001 per scan with Gemini Flash)LLM tokens (~$0.005/page on Flash, hard cap at 15 pages)

What's next

Was this page helpful?

Last reviewed by @jschuyler
All systems operationalDocsDevelopersPlatformPricing
PrivacyTerms© 2026 fndd, LLC