RFC: opt-in drawing PDF views, located labels, and Markdown reports
CAD-exported PDFs can convert successfully while losing vector geometry and spatial context. This RFC proposes an opt-in drawing-aware mode as a separate contribution from #2667 / #2668. The default PDF behavior and rejection policy remain unchanged. Maintainer acceptance of core versus plugin ownership and the API/report shape is still open; a draft implementation will be offered for concrete review.
Proposed behavior:
- Located native labels and textual annotations, including AutoCAD SHX text; orthogonal text rotation and page boundaries retained.
- Full-page raster views, including vector drawings without embedded images. External PNG assets by default; explicit inline-data-URI opt-in.
- An English Markdown report identifying visual-only/unresolved content and extraction limitations. No semantic dimensions, scale, units, constraints, or lossless/completeness claims.
- Core API returns Markdown, PNG assets, and the Markdown report without file writes. CLI writes new
drawing.md,drawing.report.md, anddrawing.assets/destinations with collision/symlink safeguards. Optional MCP mode returns inline views and the report without filesystem writes.
Design measurements came first: at 200 DPI, the complete 23-page AutoCAD export produced 75,335,775 PNG bytes / 100,447,732 base64 bytes. The dense Revit page produced 3,696,835 / 4,929,116 bytes. This makes inline images a poor default. Page views are capped at an 8192-pixel longest edge. Large drawings can require substantial memory; the local corpus evaluation had a cumulative process high-water mark of about 1.3 GB. Neither relative image links nor base64 text automatically give an LLM visual input.
Related: #1398 proposes bounding-box JSON/OCR output; #2055 extracts embedded raster images. This proposal targets rendered vector drawing pages plus native/SHX labels and an honest Markdown limitations report, not semantic CAD reconstruction or dimension extraction. Third-party PDFs/assets are not included in the contribution.
Source samples: AutoCAD LT, Revit. Core versus plugin placement and report/asset representation are open for discussion.