illustrator_export_document
Export the active Illustrator document to PNG or JPG for raster deliverables, with optional scale, artboard clipping, and inline image feedback.
Instructions
Export the active document to PNG or JPG. Native SVG and PDF are refused.
CONTRACT: readOnly=False, destructive=True, idempotent=False, openWorld=True
WHEN TO USE:
Generating raster output (PNG, JPG) with optional scale factor
Native SVG is disabled: live export changed the source file association
Getting visual feedback by setting return_image=True (PNG/JPG only)
NOT for looking at your work in progress. Exporting writes a file to disk and overwrites whatever was there. To see the artwork, call illustrator_observe: it returns the image inline together with a numbered map of items, their handles and their bounds, with no file to create, locate and open. Export when you want a deliverable
EXAMPLES: PNG at twice the size: {"params": {"file_path": "C:/out/fig.png", "format": "png", "scale": 2.0}} PDF refusal; use a separate working copy with Illustrator PDF save: {"params": {"file_path": "C:/out/fig.pdf", "format": "pdf"}} SVG refusal after source-association failure; use a separate working copy: {"params": {"file_path": "C:/out/fig.svg", "format": "svg"}} PNG of the artboard, returned inline as well: {"params": {"file_path": "C:/out/fig.png", "return_image": true, "artboard_only": true}} Refuse rather than overwrite an existing file: {"params": {"file_path": "C:/out/fig.png", "format": "png", "overwrite": "fail"}} Keep the old file and write beside it: {"params": {"file_path": "C:/out/fig.png", "overwrite": "version"}}
NOTES:
artboard_only=True clips export to artboard; a pre-check warns if nothing is on it
Native PDF is temporarily disabled because saveAs changes source state
Native SVG is temporarily disabled after a measured source-association failure
return_image returns base64 image bytes as ImageContent for visual verification
An existing file is resolved before dispatch per
overwrite, so Illustrator is never asked to confirm a replacement. Its Replace Files prompt is modal and would hang the host until a person clicked itoverwrite='replace' retains a unique sibling backup until completion
Unknown completion retains the backup; use illustrator_job_status with finalize_export=true on the returned jobId after completion is established
Backup ownership is in-memory; after server restart use manual recovery
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |