proj_export_image
Exports the active schematic or PCB document to PDF without a dialog; focus the target tab first. Raster formats require a configured OutJob.
Instructions
Export the active schematic / PCB document, silent (no dialog).
Only format="pdf" is currently supported as a silent path.
Raster formats (png/jpg/bmp) require a hand-configured OutJob with
a Schematic Print -> Multimedia (Image) container; the Pascal side
rejects them with IMAGE_FORMAT_UNSUPPORTED and points the
caller at proj_run_outjob instead.
The PDF path uses Altium's
WorkspaceManager:Print server process with FileName= - the
same machinery as proj_export_pdf. No OutJob is loaded. The print
runs against Client.CurrentView (the focused document), so
ensure the schematic or PCB you want exported is the active tab
before calling.
The Pascal side deletes any pre-existing file at output_path
before running so the post-run FileExists probe is a true
existence check. Python verifies again here and downgrades a
Pascal "success" to EXPORT_FILE_MISSING if no file landed.
Args:
output_path: Full path for the output file. The directory must
already exist. The extension should be .pdf.
format: Output format. Only "pdf" is silent today
(default). "png", "jpg", "bmp" return an
explicit IMAGE_FORMAT_UNSUPPORTED error.
width: Kept for API compatibility. Unused by the PDF path.
height: Kept for API compatibility. Unused by the PDF path.
Returns:
Dictionary confirming the export with the resolved path,
format, width, height, and the scoped schematic. Sets
file_exists based on a Python-side existence check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| format | No | ||
| height | No | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||