# PDFViewer.createExporter()

```ts
createExporter(config?: ExportConfig): PDFExporter
```

A [PDFExporter](https://kernstra.com/docs/web-sdk/api/pdfexporter) wired to this viewer's form values and signatures. Its defaults are the viewer's `export` option; `config` overrides them. Obtain the exporter here rather than with `new PDFExporter(document)`: it carries what the viewer holds and reports `exportStarted` / `exportCompleted` on the viewer, and an export of the whole document clears [hasUnsavedChanges](https://kernstra.com/docs/web-sdk/api/pdfviewer/hasunsavedchanges) the moment the bytes leave the viewer — whether your upload of them succeeds is yours to track (see [Saving as the user works](https://kernstra.com/docs/web-sdk/guides/replace)).

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `config?` | `ExportConfig` | Overrides the viewer's [export](https://kernstra.com/docs/web-sdk/config/export) option for this exporter. |

Returns `PDFExporter`

Throws:

- `INVALID_STATE` after `destroy()`.

```ts
const exporter = viewer.createExporter();
await exporter.download('report.pdf');
```

Part of [PDFViewer](https://kernstra.com/docs/web-sdk/api/pdfviewer) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfviewer/createexporter
