# PdfExportOptions (@salmonui/export/pdf)

> The PdfExportOptions interface of @salmonui/export/pdf.

Canonical: https://salmonui.dev/docs/reference/export/pdf/PdfExportOptions

```ts
import type { PdfExportOptions } from '@salmonui/export/pdf';
```

Entry index: https://salmonui.dev/docs/reference/export/pdf (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/export/pdf.md).

## Reference

Kind: interface

```ts
interface PdfExportOptions<Row> extends ExportOptions<Row>, PdfOptions {
}
```

Members (23):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `pages` | `pages?: "all" \| "current";` | optional, inherited | `all` (default): every page of the current query. `current`: the current page as shown. |
| `includeHiddenColumns` | `includeHiddenColumns?: boolean;` | optional, inherited | Include hidden columns. Default false. |
| `rows` | `rows?: readonly Row[];` | optional, inherited | Rows to export instead of the grid rows (for example the selected rows), with the grid's columns. |
| `columns` | `columns?: readonly ExportColumnOption[];` | optional, inherited | Export-only columns, in order. |
| `fileName` | `fileName?: string;` | optional, inherited | Download name; the format extension is added when missing. Default `export`. |
| `hierarchy` | `hierarchy?: "all" \| "expanded" \| "none";` | optional, inherited | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `tree` | `tree?: "all" \| "expanded";` | optional, inherited | Tree mode rows: `expanded` (default) exports the visible rows in pre-order; `all` exports every kept row regardless of expansion (XLSX `outlineCollapsed` then keeps the collapsed state). |
| `styles` | `styles?: ExportStyles;` | optional, inherited |  |
| `sliceMs` | `sliceMs?: number;` | optional, inherited | Time slice in ms before the writer yields to the event loop. Default 25. |
| `yield` | `yield?: YieldFn;` | optional, inherited | Awaited between slices. Default: a macrotask. |
| `pageSize` | `pageSize?: readonly [number, number] \| PdfPageSize;` | optional, inherited | Default `a4`, or `[width, height]` in points. |
| `orientation` | `orientation?: "landscape" \| "portrait";` | optional, inherited | Default `portrait`. |
| `margin` | `margin?: number;` | optional, inherited | Page margin in points. Default 36. |
| `fontSize` | `fontSize?: number;` | optional, inherited | Body font size in points. Default 8. |
| `columnOverflow` | `columnOverflow?: "fit" \| "paginate";` | optional, inherited | `fit` (default) scales columns to the page width; `paginate` continues them on extra page sets. |
| `header` | `header?: string;` | optional, inherited | Page header text; `{page}` and `{pages}` are replaced. |
| `footer` | `footer?: string;` | optional, inherited | Page footer text; default `{page} / {pages}`. Empty string for none. |
| `includeHeaders` | `includeHeaders?: boolean;` | optional, inherited | Header rows. Default true. |
| `title` | `title?: string;` | optional, inherited | Document title (`/Title`). |
| `compress` | `compress?: boolean;` | optional, inherited | Deflate content streams (when the platform has `CompressionStream`). Default true. |
| `font` | `font?: PdfFont \| PdfFontData;` | optional, inherited | TrueType font bytes (`.ttf`, or the first font of a `.ttc`) to embed for all text, required for characters outside WinAnsi (CJK, Cyrillic, Greek, Hebrew, Arabic). Only the used glyphs are embedded. `bold` defaults to a synthetic bold of `regular`. No font is bundled. |
| `mergeRepeatedValues` | `mergeRepeatedValues?: boolean;` | optional, inherited | Merge repeated values in consecutive data rows, as XLSX. Default false. |
| `appendImages` | `appendImages?: readonly ExportImage[];` | optional, inherited | Pages after the table, one PNG or JPEG image each (`width` / `height` in CSS px), scaled down to fit the page body and centered: a chart image beside the table in one PDF. An image that cannot be embedded adds no page. |
