pdf2takeoff
llms.txt8 starsChanged 31 days agoApache-2.0View on GitHub
pdf2takeoff is a free, open-source (Apache-2.0) PDF takeoff and markup tool that runs entirely in the browser, plus a headless Node CLI and MCP server built on the same engine. Calibrate a drawing's scale (typed, preset, or auto-read from the sheet with OCR), measure lengths, areas, perimeters, volumes and angles, auto-count repeated symbols, export the markups list to CSV/Excel, and save markups back into the PDF as standard annotations that open in Bluebeam Revu and Adobe Acrobat. Files are processed…
The file
We split this llms.txt into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 63
Write takeoff.yaml next to the drawing set: the scale, one click-point per symbol type to count, and the exports you want.
- Very specific: line 64
Run pdf2takeoff run takeoff.yaml: it scans, totals, and writes the Excel/CSV/annotated PDF outputs.
≈ “Common” is an estimate: at least 1 in 5 of the 3,592 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# pdf2takeoff > pdf2takeoff is a free, open-source (Apache-2.0) PDF takeoff and markup tool that runs entirely in the browser, plus a headless Node CLI and MCP server built on the same engine. Calibrate a drawing's scale (typed, preset, or auto-read from the sheet with OCR), measure lengths, areas, perimeters, volumes and angles, auto-count repeated symbols, export the markups list to CSV/Excel, and save markups back into the PDF as standard annotations that open in Bluebeam Revu and Adobe Acrobat. Files are processed locally and never uploaded: in the browser, at the terminal, or driven by an AI agent. Made by Flowtivity (https://flowtivity.ai), Gold Coast, Australia. Key facts: - Price: free, no account, no file limits, no paid tier - Licence: Apache-2.0 open source - Privacy: 100% local processing. In the browser nothing uploads and it works offline once loaded. The Node CLI and MCP server are local too, with two exceptions: the OCR language pack (about 4 MB, fetched on first use, then cached) and the opt-in ai-count command, which is network-only when the user runs it. In the browser the ML scan also fetches the ONNX runtime (about 4 MB) and the v1 detector model (about 76 MB from GitHub) on first use, then caches them - Inputs: PDFs (scanned ones too: CCITT fax, JBIG2 and JPEG 2000 images decode locally), plus images (PNG, JPEG, HEIC iPhone photos, multi-page TIFF, WebP, GIF, BMP, AVIF, SVG) opened, dropped or pasted as a screenshot; several files (images and PDFs) open as one set. Images become pages of a PDF, so every tool and export works; scans that state their resolution keep their paper size for printed ratios, other images are calibrated from a dimension. ASCII DXF opens as a vector page at a standard scale set from its units (no calibration; blocks counted exactly by Scan). DWG: export DXF or PDF first - Measurements: lengths (segmented runs), areas, perimeters, volumes (area × depth), angles (scale-free), counts; metric and imperial units - Scale calibration: draw along any known printed dimension, pick presets (1:50 … 1:500, 1/8"=1'-0", 1/4"=1'-0", 1"=10'/20'/30'), or click Auto-read and let OCR read the printed dimension or title-block scale (e.g. "SCALE 1:100") off the sheet; on CAD sheets the printed dimensions are also measured against their drawn lines, and a title block that disagrees with them is flagged (or, for Auto-read and the MCP set_scale sheet read, overruled) - Scan (auto-count): click one instance of a repeated symbol and the scan counts every match on the page in about 100 ms using local computer vision; on cluttered sheets the same click upgrades automatically to the in-browser v1 ML detector (ONNX, five classes: downlight, GPO, switch, smoke alarm, diffuser) with fallback to CV. Hits land as flagged proposals to confirm or delete, and the totals show a per-label kept-rate - Magic Fill: click inside a room and read its area off the walls (flood fill + boundary trace; door gaps bridged by run-length-gated closing; on layered CAD PDFs, furniture, finish hatching, notes, services and structure-above layers are left out of the fill's render) - Scales per page and per region: every sheet keeps its own calibration; outline a detail region drawn at a different scale (viewport) and measurements inside it resolve to that scale automatically - Tool library: save a tool + label once (e.g. Length "Skirting", Count "Downlight DL-100"); clicking the chip pre-labels every placement and scan hit - Trade templates: commercial fit-out (walls, plasterboard and grid ceilings, bulkheads, doors by type, windows, mirrors, feature paint), electrical and painting; loading one adds a labelled tool per line, and the template summary exports every line in order with its quantity (Excel, clipboard, or MCP export with template) - Find walls (app button and MCP propose_walls): wall runs read off a CAD PDF's wall layers, named from the legend, measured along centrelines and proposed as flagged lengths labelled "Walls (<legend name>)" - Markups list: statuses (flag for checking / confirmed) that round-trip inside the PDF, search, status filters, sorting, group totals, one-click Clear; markup layers per trade, pinned notes, and formula columns (waste factors, rates) that flow into totals and every export - Export: CSV download, TSV clipboard, a real Excel workbook (.xlsx), a printable quantity report, and annotation round-trip into the PDF - Sessions: markups and calibrations autosave locally (IndexedDB, keyed by file hash; the PDF itself is never stored); experimental live sessions share a takeoff in real time between tabs/windows on the same machine (CRDT) - Annotation compatibility: Line, PolyLine, Polygon and FreeText annotations with measurement values in the comment, authored as "pdf2takeoff" - Revision compare: overlay two revisions in the browser (red = removed, blue = added, dark = unchanged); from the CLI, compare two PDFs or batch-compare two revision folders (sheets paired by filename, added/removed sheets listed, overlay PNG per changed pair) - Headless CLI (Node ≥ 22.13): info, scan, compare (files or folders), export, annotate, run, ocr, ai-count, mcp. Run it with no install: `npx github:ajflow/pdf2takeoff <command>`; add the MCP server to Claude Code with `claude mcp add pdf2takeoff -- npx -y github:ajflow/pdf2takeoff mcp`. Everything runs on your machine; the only network calls are the OCR language pack on first use and ai-count when you run it - Takeoff-as-code: a committed takeoff.yaml (scale + click-point counts + exports) regenerates quantities via `pdf2takeoff run`; run with --prev to diff quantities against the previous revision's run - Opt-in AI count (`pdf2takeoff ai-count`): sends one rendered page to any OpenAI-compatible provider you choose (OpenRouter, OpenAI, Gemini, Z.ai, Ollama, LM Studio), with the API key read from environment variables. The network is used only when you run the command. Proposals come back as flagged count markups (status "check") for a human to confirm or delete - Counting presets: `propose_items` proposes items (doors, windows, spaces) as flagged markups and `count_items` totals them under a preset (aecv or schedule), so counts follow your conventions rather than the model's guess - MCP server: fifteen local stdio tools (open_document, render_page, read_text, set_scale, fill_area, measure, scan_symbol, propose_items, count_items, compare_revisions, list_markups, set_status, delete_markup, export, save_annotated) so AI agents can run a full takeoff and hand back a marked-up PDF for human review; read_text returns printed scales, dimensions and labels exactly and positioned, so agents never guess them off the rendered image - Limitations today: live sessions sync only between tabs/windows on the same machine (cross-machine relay is next); the v1 ML detector covers five symbol classes and runs in the browser only (the CLI and MCP server scan with the CV tier); Magic Fill can leak through openings wider than its gap-closing ladder; interactive revision compare is single-sheet (batch compare is CLI/MCP) - Stack: PDF.js (Apache-2.0) for rendering, pdf-lib (MIT) for writing annotations, tesseract.js (Apache-2.0) for OCR, onnxruntime-web for the ML scan, UTIF (MIT) for TIFF, libheif via libheif-js (LGPL-3.0, loaded only when a HEIC photo is opened) for HEIC; no backend, deployable as a static site - Benchmarks: AECV-Bench (counting doors, windows and rooms on 120 floor plans): 0.295 five-field exact match for the deterministic engine alone; 0.585 with the opt-in AI count on GPT-6.1 Sol, against 0.572 for the same model on the benchmark's own prompt and 0.543 for the best published model. AEC-Geometric-Bench (walls on 15 sheets): wall pixel F1 0.519 with no AI model, against 0.287 for the best general model. ScaledDrawingBench (200 sheets, our own open benchmark): 99.8% on PDFs exported from CAD and 37.3% on degraded scans; the scan gap is published, not hidden - Reproducibility: the repo's `evals/` publishes run logs for the numbers above plus room-area fill against analytic ground truth, detector precision/recall with miss attribution, MCP workflow conformance, and a CI baseline that fails on regressions Main page: https://pdf2takeoff.com/ Revision compare page: https://pdf2takeoff.com/compare-drawing-revisions Symbol auto-count page: https://pdf2takeoff.com/count-symbols-in-pdf-drawing Sample drawing: https://pdf2takeoff.com/examples/sample-floor-plan.pdf (revision A) Sample revision B: https://pdf2takeoff.com/examples/sample-floor-plan-rev-b.pdf Source code: https://github.com/ajflow/pdf2takeoff Made by Flowtivity (https://flowtivity.ai), Gold Coast, Australia ## Pages - https://pdf2takeoff.com/measure-area-on-pdf: measure room areas, lengths and perimeters on a PDF drawing; Magic Fill reads a room's area from one click inside it - https://pdf2takeoff.com/set-scale-on-pdf-drawing: set a drawing's scale from a known dimension, a preset or the title block (OCR), and the scale chip that says whether to trust it; per-page scales and viewports - https://pdf2takeoff.com/free-bluebeam-alternative: a fair comparison with Bluebeam Revu for PDF takeoff: what pdf2takeoff covers, what it deliberately does not do, and how its markups open in Revu - https://pdf2takeoff.com/dxf-takeoff: takeoff from an ASCII DXF without AutoCAD, with the scale set from the file's $INSUNITS and blocks counted exactly; DWG needs exporting to DXF or PDF first - https://pdf2takeoff.com/takeoff-from-photos-and-scans: takeoff from images, scanned PDFs, iPhone HEIC photos, TIFF scans and screenshots, and the limits of measuring a phone photo - https://pdf2takeoff.com/takeoff-without-uploading-drawings: how drawings stay on your computer (no upload, no account, no app telemetry, offline once loaded) and the one opt-in exception, the AI count - https://pdf2takeoff.com/privacy: what the app and website collect (drawings never; page visits without cookies; sign-up emails go to Flowtivity) - https://pdf2takeoff.com/takeoff-benchmarks: every published benchmark (AECV-Bench, AEC-Geometric-Bench, ScaledDrawingBench, ResPlan-FP) with its numbers, weaknesses and a link to its method - https://pdf2takeoff.com/mcp-server-construction-takeoff: the MCP server (15 tools) and CLI that let Claude, Cursor, Codex or any MCP client run a takeoff locally; run it from GitHub with npx github:ajflow/pdf2takeoff (it is not published to the npm registry) ## How to do a takeoff from a PDF 1. Open the drawing (drag and drop any PDF). 2. Calibrate: click both ends of a printed dimension and Auto-read it with OCR, type its real length, or choose a standard scale. 3. Measure: trace lengths, outline areas and volumes, take perimeters and angles, click count marks, or Scan to auto-count a repeated symbol. Totals update live, grouped by label. 4. Export the markups list to CSV or paste directly into Excel. 5. Save into the PDF; the annotated file opens in Bluebeam and Acrobat. ## How to run a takeoff headlessly (CLI or CI) 1. Write takeoff.yaml next to the drawing set: the scale, one click-point per symbol type to count, and the exports you want. 2. Run `pdf2takeoff run takeoff.yaml`: it scans, totals, and writes the Excel/CSV/annotated PDF outputs. 3. On a new revision, run again with `--prev` pointing at the previous run's summary to see exactly which quantities changed. 4. AI agents: point any MCP client at `pdf2takeoff mcp` and let it open, look at, measure and export, locally, with the marked-up PDF left for human verification. ## How AI agents use pdf2takeoff (MCP) Register the MCP server, then the agent can: open a local PDF, render any sheet to PNG to look at it, read printed text (scales, dimensions, labels) exactly and positioned, set the scale, measure, scan-count symbols, propose and count items under a counting preset, compare two revisions or folders, mark proposals for checking, and export quantities plus an annotated PDF, every step on the user's machine, nothing uploaded anywhere.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

