## Export Formats

Yando supports four export formats, accessible from the toolbar on any board:

### PNG (Image)

Exports the board as a PNG image. Smart cropping ensures the image is tightly fitted:

- **Template boards**: Cropped to zone boundaries with padding
- **Non-template boards**: Cropped to the object bounding box with padding
- Hidden sticky notes are excluded from the export

### PDF (Document)

Exports the board as a multi-page PDF document containing:

- A cropped image of the board canvas
- A text summary of all objects organized by zone
- Hidden sticky notes are excluded

### Markdown

Exports board content as a structured markdown file:

- Objects grouped by zone (for template boards)
- Each object includes its text content, type, and zone
- Hidden sticky notes are excluded
- Useful for feeding board content to AI tools

### JSON (Data)

Exports the complete board data as a JSON file:

- Board metadata (title, description, template, canvas dimensions)
- All objects with full properties (position, size, rotation, data)
- Objects grouped by zone
- Can be re-imported to create a new board

## Import from JSON

### Creating a New Board from JSON

1. Go to **Boards** and click **New Board**
2. Upload a JSON file in the import section
3. Preview shows the title, template, and object count
4. Optionally change the title, description, or template
5. Click **Create Board**

The import process:

- Generates fresh UUIDs for the board and all objects (security measure)
- Sets the current user as the owner
- Matches zones by name when using the same template
- Validates the JSON schema, object types, and required fields
- Uses atomic transactions (all-or-nothing)

### Importing to an Existing Board

You can add objects from a JSON file to an existing board:

1. Open the board canvas
2. Click the **Import** button in the toolbar
3. Select a JSON file
4. Objects are added without modifying existing content

This is useful for the LLM workflow:

1. Export your board to JSON
2. Feed the JSON to an LLM for analysis or enhancement
3. Import the LLM's output back to the same board

### JSON Schema

The expected JSON structure:

```json
{
  "board": {
    "title": "My Board",
    "description": "Optional description",
    "template": "Business Model Canvas",
    "canvas_width": 3200,
    "canvas_height": 1800
  },
  "zones": {
    "Zone Name": [
      {
        "type": "sticky_note",
        "x": 100,
        "y": 200,
        "width": 200,
        "height": 150,
        "data": {
          "text": "Note content",
          "color": "#FFEB3B"
        }
      }
    ]
  },
  "unzoned_objects": []
}
```

Object types: `sticky_note`, `text_box`, `shape`

For shapes, the `data` object includes a `shapeType` field: `rectangle`, `circle`, `triangle`, or `line`.

## Export Visibility

Hidden sticky notes (those toggled to hidden on the canvas) are excluded from **all** export formats:

- PNG: Not rendered in the image
- PDF: Not in the image or the text summary
- Markdown: Not included in the text output
- JSON: Hidden notes are still included in JSON exports (they carry a hidden flag)
