Export web profile
export_web_profileExport a responsive PNG set and one plain SVG for web deployment. Configure widths or scales to produce multiple sizes in a sandbox-checked output directory.
Instructions
Export a web-oriented asset set: a responsive PNG set plus one plain SVG.
When to use: producing a web-ready asset bundle. For a print PDF use export_print_profile; for
a square icon set use create_icon_set; for a single export use export_document.
Key params: PNG widths resolve as — explicit widths (each a PNG); else density scales
applied to width_px (e.g. [1,2,3] -> 1x/2x/3x); else width_px. Every PNG is pixel-capped
before Inkscape runs and distinct on disk; responsive entries report their scale. out_dir
writes the set into a caller-chosen dir so a dist/ tree assembles with no
Bash cp — a relative out_dir anchors to the workspace ROOT and is sandbox-checked
(out-of-workspace rejected "path rejected: outside workspace"); name_prefix tags each file.
Return shape: ProfileExportResult — profile, applied_settings, and ordered artifacts
(ascending width, then one plain SVG last); each carries a workspace_relative_path plus
content-truth fields (PNG: opaque_px/all_blank).
Example: export_web_profile(doc_id, scales=[1, 2, 3], out_dir="dist/web")
Risk class: low (export to a sandbox-checked dir; no original overwrite).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| scales | No | ||
| widths | No | ||
| out_dir | No | ||
| width_px | No | ||
| name_prefix | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| profile | Yes | ||
| artifacts | Yes | ||
| applied_settings | Yes |