# Generating PDF Output Overview

The Drawing library provides low-level drawing capabilities and can export any scene to a PDF file using the [`exportPDF`](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/api/pdf/exportpdf) function. Use this function when you need a print-ready, portable document—an invoice, a report, a ticket, or a snapshot of a [DOM-drawn](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/draw-dom) layout—generated entirely on the client, without a server-side rendering step.

The following demos illustrate how to export content to PDF using the Drawing library.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/drawing/pdf-output/overview/source.txt)

## Exporting to PDF

To export a scene to a PDF file, use the [exportPDF](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/api/pdf/exportpdf) function provided by the Drawing library. It takes the root [`Group`](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/api/group) of a scene and an optional [`PDFOptions`](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/api/pdf/pdfoptions) object, and returns a promise that resolves with the document as a Base64-encoded Data URI that you can save to disk, open in a new tab, or upload.

The `PDFOptions`object controls the paper size, margins, orientation, multi-page behavior, embedded fonts, and document metadata. For more details refer to the [Configuration Options](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/pdf-output/configuration) documentation.

```javascript
import { exportPDF } from "@progress/kendo-drawing";

exportPDF(group, options)
    .then(dataUri => {
        // Save, upload, or preview the generated PDF.
    });
```

A scene can come from two sources: build it directly from [basic shapes](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/basic-shapes), or capture existing page content with [`drawDOM`](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/api/drawdom), as described in [Drawing DOM Elements](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/draw-dom).

## Suggested Links

* [API Reference of the Drawing Library](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/api)
* [PDF Options by the Drawing Library](https://www.telerik.com/kendo-vue-ui-develop/components/drawing/api/pdf/pdfoptions)
