Write the masked (anonymized) drawing PDF
mask_drawingMask sensitive areas in a technical-drawing PDF to create an anonymized, flattened copy where hidden content is destroyed and metadata is removed; optionally generate an expiring share link.
Instructions
Mask the drawing and write the anonymized PDF: blank (or replacement-text / own-logo) boxes over every masked detection, custom term and rectangle; by default every page is then rasterized at 288 dpi so the covered content is destroyed rather than painted over (tamper-proof single-layer PDF) and the document metadata (author, title, producer, XMP) is removed. Optional coverage report page and page selection. share_link additionally uploads the MASKED copy (never the original) and returns an expiring public link (1m, 15m, 1h or 24h). Accepts drawing_id (from analyze_drawing/load_analysis) or pdf_path for a one-shot run (analyses first). When masking is omitted for a drawing masked before in this session — including an identical PDF under another path — the previous masking is reused. Default location: next to the drawing PDF as _masked.pdf (else _masked.pdf); the source PDF is never modified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| masking | No | Masking settings — shared by review_masking and mask_drawing; pass the same object to both so the PDF matches the reviewed masks. Everything is optional; the defaults reproduce the web app. | |
| pdf_path | No | the drawing PDF — analysed first when it is not known yet (one daily credit), or the original PDF for a drawing_id loaded without one | |
| overwrite | No | allow replacing an existing output file | |
| drawing_id | No | from analyze_drawing or load_analysis | |
| share_link | No | also create an expiring public link to the masked copy, valid for 1 minute, 15 minutes, 1 hour or 24 hours | |
| output_path | No | target .pdf path, or a directory (default: next to the drawing PDF, else the working directory) | |
| timeout_seconds | No | with pdf_path: how long to wait for the analysis (default 180) |