bim-pdf

install bim-cli · windows · per-user · no admin
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'iwr -useb https://bimcli.com/install.ps1?src=site -OutFile $env:TEMP\bim-install.ps1; powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\bim-install.ps1'

Work with PDFs your way — split a combined sheet export into individual files, shrink a set before sending to a client, extract element data for a takeoff, or embed structured data for archiving. If you've ever gotten garbled text or wrong element IDs from a PDF tool on a Revit export, it's because most tools don't understand how Revit encodes its output. bim-pdf does.

PDF analysis and manipulation for AEC workflows. Zero dependencies — handles Revit's specific PDF encoding natively.

Revit PDF specifics

Revit exports PDFs with Adobe PDF Library 18.0.5 (PDF 1.6). Every visible element is wrapped in a BMC/BDC tagged content block encoding its ElementId. Text uses Type0 Identity-H encoding — standard extractors return garbage. bim pdf marked and bim pdf text handle both correctly.

Verbs

VerbWhat it does
bim pdf info FILEMetadata, page count, PDF version, XMP namespaces and the embedded attachments.
bim pdf from-html
  • [--file FILE]
  • [--url URL]
  • --out FILE
  • [--browser FILE]
  • [--paper PAPER]
  • [--landscape]
  • [--timeout TIMEOUT]
  • [--wait-for WAIT-FOR]
Render a local HTML file or HTTP(S) URL to a vector PDF using headless Chromium's print engine
bim pdf text FILE
  • [--page N]
  • [--pages PAGES]
  • [--lines]
Text extraction; decodes via ToUnicode CMap. Use --page for one page, --pages for a range, or omit both to process every page in one call. Default output: per-word tokens with x/y/fontSize coordinates. With --lines: assemble tokens into reading-order text lines per page (group by Y, sort by X) -- equivalent to pdftotext -layout / pdfplumber extract_text().
bim pdf extract [FILE]
  • [--files FILES]
  • [--dir FILE]
  • [--recursive]
  • [--field FIELD]
  • [--all]
  • [--page N]
Extract named field values from PDF reading-order lines using regex capture groups. Each --field is NAME=REGEX where the first capture group is the value. Supply exactly one of: --file for a single PDF, --files for a JSON string or array of paths, or --dir to collect all PDFs in a directory (add --recursive to walk subdirectories). Default output: one summary per file with first match per field. With --all: every per-line match.
bim pdf table FILE
  • [--page N]
  • [--pages PAGES]
Extract row/column-structured text from each page. Use --page for one page, --pages for a range, or omit both to process every page in one call. Detects column boundaries from run X positions and returns [{page, rows:[{cells:[...]}]}]. Useful for holdings tables, statement grids, and tabular data without bespoke parsing.
bim pdf search [FILE] PATTERN
  • [--files FILES]
  • [--dir FILE]
  • [--recursive]
  • [--literal]
  • [--page N]
  • [--pages PAGES]
  • [--context N]
  • [--with-runs]
  • [--with-line]
  • [--max N]
  • [--font FONT]
  • [--min-size MIN-SIZE]
  • [--max-size MAX-SIZE]
Search text in PDFs using a regexp pattern; returns matches with bboxes. One PDF: search <file> <pattern>. Several: --files <a> --files <b> <pattern>. A folder: --dir <dir> <pattern> (add --recursive). With --files or --dir the only bare argument is the pattern.
bim pdf optimize FILE
  • [--out FILE]
  • [--dry-run]
Optimize PDF size and structure
bim pdf render FILE
  • [--out-dir FILE]
  • [--page N]
  • [--format FORMAT]
  • [--dpi N]
  • [--bbox BBOX]
  • [--out FILE]
Render pages to images using pdfium (bundled, no Ghostscript required). Falls back to Ghostscript if pdfium renderer is unavailable. Output files are named page-<n> with 1-based n; the result includes a pages array in the same order as files. PDFium supports PNG output only. --bbox crops a single page region and requires --page.
bim pdf enrich FILE SIDECAR
  • [--tag-pattern TAG-PATTERN]
  • [--id-field ID-FIELD]
Join `marked` output with a sidecar JSON lookup table
bim pdf package
  • --file FILE
  • --metadata METADATA
  • [--out FILE]
  • [--no-marks]
  • [--dry-run]
Embed metadata files as PDF/A-3 attachments — produces a PDF–BIM Package
bim pdf viewer FILE
  • [--port N]
  • [--colors FILE]
  • [--agent-color AGENT-COLOR]
  • [--require-data]
Local browser viewer for PDF–BIM packages; writes startup response then blocks
bim pdf report
  • [--template TEMPLATE]
  • [--data FILE]
  • [--flood-map FILE]
  • [--school-map FILE]
  • [--parcel-map FILE]
  • --out FILE
  • [--timeout TIMEOUT]
Generate a graphical PDF site assessment report
bim pdf doctorDriver health check
bim pdf versionDriver version

page

VerbWhat it does
bim pdf page list FILE
  • [--detail]
Per-page dimensions and OCG layer list. Default: fast path using pdfium for MediaBox/Rotation only. Use --detail for custom page-dict entries and layer visibility (slower on large vector sets).
bim pdf page merge FILES
  • --out FILE
  • [--no-bookmarks]
Merge multiple PDFs into one; inserts a top-level bookmark for each source file by default; falls back to Ghostscript if pdfcpu cannot parse an input
bim pdf page split FILE
  • [--out-dir FILE]
  • [--span N]
  • [--by-bookmark]
Split a PDF into individual pages or spans; --by-bookmark splits at top-level bookmark boundaries (ignores --span)
bim pdf page collect FILE
  • --pages PAGES
  • [--out FILE]
Extract specific pages into a new PDF
bim pdf page rotate FILE
  • --degrees N
  • [--pages PAGES]
  • [--out FILE]
  • [--dry-run]
Rotate pages by 90, 180, or 270 degrees
bim pdf page crop FILE
  • --box BOX
  • [--out FILE]
  • [--dry-run]
Crop pages to a bounding box; negative coords supported (Revit PDFs use a centered origin — use -- to separate flags from negative values, e.g. page crop -- --box -785,-123,-348,195 in.pdf)

marked-content

VerbWhat it does
bim pdf marked-content list FILE
  • [--page N]
  • [--pages PAGES]
  • [--tag TAG]
Extract BMC/BDC tagged content blocks with geometry bounds. Use --page for one page, --pages for a range, or omit both to process every page in one call.

annot

VerbWhat it does
bim pdf annot list FILE
  • [--page N]
List all annotations
bim pdf annot remove FILE
  • [--page N]
  • [--type TYPE]
  • [--out FILE]
  • [--dry-run]
Remove annotations
bim pdf annot bake FILE
  • --scene FILE
  • [--out FILE]
  • [--dry-run]
Write /Annot dicts + Named Destinations from a scene JSON into a new PDF
bim pdf annot review FILE
  • --review FILE
  • [--out FILE]
  • [--dry-run]
Write a markup review into the PDF as standard annotations that Acrobat and Bluebeam open: each markup, its reply thread and its accepted/rejected state, plus any attached files. A bim-pdf package stays valid.
bim pdf annot export-xfdf SCENE
  • [--out FILE]
Export scene annotations to XFDF (importable in Bluebeam / Acrobat)

attach

VerbWhat it does
bim pdf attach list FILEList embedded attachments. The same names already appear in info under attachments; for PDF-BIM packages this returns the same set as bim.list.
bim pdf attach extract FILE
  • [--out FILE]
  • [--out-dir FILE]
Extract the embedded attachments into a folder (--out).
bim pdf attach add FILE ATTACHMENT
  • [--out FILE]
  • [--dry-run]
Embed a file as an attachment; uses --out because exactly one PDF is written
bim pdf attach remove FILE
  • --name NAME
  • [--out FILE]
  • [--dry-run]
Remove an attachment by name

bookmark

VerbWhat it does
bim pdf bookmark list FILEList all bookmarks
bim pdf bookmark export FILE
  • [--out FILE]
Export bookmarks to JSON
bim pdf bookmark import FILE BOOKMARKS-JSON
  • [--out FILE]
  • [--dry-run]
Import bookmarks from JSON

form

VerbWhat it does
bim pdf form field list FILEList all form fields
bim pdf form fill FILE DATA-JSON
  • [--out FILE]
  • [--dry-run]
Fill form fields from a JSON data file
bim pdf form flatten FILE
  • [--out FILE]
  • [--dry-run]
Flatten form fields (make non-editable)

security

VerbWhat it does
bim pdf security encrypt FILE
  • [--user-password USER-PASSWORD]
  • [--owner-password OWNER-PASSWORD]
  • [--out FILE]
  • [--dry-run]
Encrypt with user and owner passwords
bim pdf security decrypt FILE
  • [--password PASSWORD]
  • [--out FILE]
  • [--dry-run]
Remove encryption

stamp

VerbWhat it does
bim pdf stamp add FILE
  • [--text TEXT]
  • [--image FILE]
  • [--font FONT]
  • [--points N]
  • [--scale SCALE]
  • [--color COLOR]
  • [--opacity OPACITY]
  • [--rotation ROTATION]
  • [--page N]
  • [--position POSITION]
  • [--x X]
  • [--y Y]
  • [--width WIDTH]
  • [--height HEIGHT]
  • [--out FILE]
  • [--dry-run]
Add a text or image watermark; supply either --text or --image, not both
bim pdf stamp remove FILE
  • [--page N]
  • [--out FILE]
  • [--dry-run]
Remove watermarks/stamps from every page, or from one page with --page

scene

VerbWhat it does
bim pdf scene save FILE
  • [--out FILE]
Save a minimal empty scene file for a PDF (use session.save in viewer for live sessions)

bim

VerbWhat it does
bim pdf bim validate FILEValidate a bim-pdf package: its structure, plus view references that point to a view placed on more than one sheet or that could not be resolved.
bim pdf bim pack
  • --file FILE
  • --sidecar SIDECAR
  • [--out FILE]
  • [--dry-run]
Embed sidecar JSON files into a PDF as PDF/A-3 attachments — produces a PDF-BIM package
bim pdf bim list FILEList all sidecar files embedded in a PDF-BIM package. For PDF-BIM packages this is the same set returned by attach.list and by info.attachments.
bim pdf bim extract FILE
  • --name NAME
  • [--out FILE]
Extract a named sidecar from a PDF-BIM package and return its JSON content
bim pdf bim titleblock extract FILEExtract title block fields (sheet number, name, project, date, scale, revision) from a PDF-BIM package
bim pdf bim room-schedule extract FILEExtract room elements (class=room) from a PDF-BIM package as a structured room schedule

set

VerbWhat it does
bim pdf set extract FILEExtract a drawing-set intermediate representation (set-IR) from an issued PDF drawing set: sheets, sheet index, callouts, and detail targets. Output is JSON-only.
bim pdf set check FILERun referential-integrity checks over a drawing-set PDF: index completeness, callout resolution, and titleblock consistency. Outputs typed JSON findings with severity (error|warning) and a summary count.

For agent use: /pdf/llms.txt

Guides

revit driver → all workflows → install bim-cli →
install bim-cli · windows · per-user · no admin
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'iwr -useb https://bimcli.com/install.ps1?src=site -OutFile $env:TEMP\bim-install.ps1; powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\bim-install.ps1'

Then ask your assistant to run bim describe --json. See what the installer does.