---
title: "file.export: Export — CAD kit command — Kition"
description: "Exports the drawing as a PDF, SVG or PNG file: model space framed to its extents (a PDF fitted to its page's paper). Answers the file as base64 `data`, without saving the drawing or changing it."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/file.export"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/cad/commands/file.export](https://developer.kition.ai/docs/kits/cad/commands/file.export)

# file.export

**Export.** Exports the drawing as a PDF, SVG or PNG file: model space framed to its extents (a PDF fitted to its page's paper). Answers the file as base64 `data`, without saving the drawing or changing it.

- Kit: CAD 0.1.0 (.dxf); reference: [CAD kit commands](https://developer.kition.ai/docs/kits/cad.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `format` | `"pdf" \| "svg" \| "png"` | no |  |

## Call through cad_run

```text
cad_run {
  "path": "<file>.dxf",
  "steps": [{ "command": "file.export" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `format`. cad_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `bytes` | `number` | no |  |
| `data` | `string` | no |  |
| `format` | `string` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "bytes": {
      "type": "number"
    },
    "data": {
      "type": "string"
    },
    "format": {
      "type": "string"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "format": {
      "enum": [
        "pdf",
        "svg",
        "png"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/cad-darwin-arm64@0.1.0 and the kit itself (cad_commands through @kition/cli@0.1.1, built from KitionAI/kition-cad@1ec542d).
