Shrink a Revit PDF sheet set

Revit-exported PDF sheet sets are often much larger than they need to be — the same fonts and images are embedded separately per sheet. bim-cli de-duplicates them without re-rendering, reducing file size significantly before you send to a client or upload to a portal.

Revit-exported PDFs often embed duplicate resources — fonts, images, XObjects — shared across sheets. bim-cli de-duplicates them in one command without re-rendering.

Prompt

Copy this into your AI coding tool:

paste into your AI coding tool
I have a large Revit-exported PDF drawing set that needs to be smaller for delivery. Use bim-cli to inspect and optimize it.

Step 1 — install bim-cli if not already installed: powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://bimcli.com/install.ps1 | iex"

Step 2 — refresh PATH: pwsh: $env:Path += ";$env:LOCALAPPDATA\bim-cli"

Step 3 — inspect the PDF to see current size and page count: bim pdf info drawings.pdf

Step 4 — optimize to reduce file size: bim pdf optimize drawings.pdf

The optimized file is written to %TEMP%\bim-cli\out\drawings-out.pdf. Check result.inputBytes vs result.outputBytes to confirm the reduction.

The commands

inspect — check size and page count before optimizing
bim pdf info drawings.pdf
{"ok":true,"result":{"file":"drawings.pdf","sizeBytes":98304000,"pages":142,"pdfVersion":"1.6"}}
optimize — de-duplicate shared resources, write to drawings-out.pdf
bim pdf optimize drawings.pdf
{"ok":true,"result":{"inputBytes":98304000,"outputBytes":62914560,"path":"drawings-out.pdf"}}

bim pdf optimize runs pdfcpu's de-duplication pass on shared resources (fonts, XObjects, images) across pages. It does not re-render; image quality is unchanged. The output is always a new file written to %TEMP%\bim-cli\out\ — the original is preserved.

What the test harness checks

This scenario is verified end-to-end by the bim-cli test harness:

bim scenario run tests/scenarios/pdf-shrink-batch.yaml --strict

Scenario source: tests/scenarios/pdf-shrink-batch.yaml

Why this exists

Revit-exported sheet sets frequently balloon to 100 MB+ for a 100-sheet project. The root cause is that Revit's PDF engine embeds font and image resources per-page rather than sharing them across pages. A single optimize pass typically removes 20–40% of the file size for sheet sets with repeated title-block elements. Previously this required a paid GUI application — bim-cli does it offline in one command.