# Export Options

The Kendo UI for Angular Map supports exporting to PDF, image, or SVG through the [Drawing API](https://www.telerik.com/kendo-angular-ui-develop/components/drawing).

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/map/export-options/source.txt)

## Exporting to PDF, Image, or SVG

To export the Kendo UI for Angular Map component to PDF, image, or SVG, you can use the `Drawing API` to render the Map component as a drawing Group. The following steps outline how to achieve this:

1. Access the native HTML element of the Map component by using a template reference variable in your template:

   ```html
   <kendo-map #map></kendo-map>
   <button kendoButton (click)="exportToPDF(map)">Export Map to PDF</button>
   ```

2. Use the Drawing API's [`drawDOM`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/drawdom) function to render the element as a drawing [`Group`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/group). For PDF export, you can also provide [PDFOptions](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/pdf/pdfoptions) such as [`paperSize`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/pdf/pdfoptions#papersize) and [`margin`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/pdf/pdfoptions#margin):

   ```ts
   public exportToPDF(map: MapComponent): void {
     // Access the native HTML element of the Map component
     const mapElement: HTMLElement = map['element'].nativeElement;

     // Render the element as a drawing Group using drawDOM
     drawDOM(mapElement, {
       paperSize: 'A4',
       margin: '2cm' as PageMargin,
     })
       // Export the Group to PDF
       .then((group: Group) => exportPDF(group))
       // Save the exported PDF file
       .then((dataUri) => saveAs(dataUri, 'map-details.pdf'));
   }
   ```

3. Export the drawing Group to your preferred format by passing it to [`exportPDF`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/pdf/exportpdf), [`exportImage`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/exportimage), or [`exportSVG`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/exportsvg), and then save the exported file using [`saveAs`](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api/pdf/saveas) with your desired file name and extension.

That's it! You can now export the Kendo UI for Angular Map component to PDF, image, or SVG using the `Drawing API`.

## Suggested Links

* [API Reference of the Map](https://www.telerik.com/kendo-angular-ui-develop/components/map/api)
* [API Reference of the Drawing](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/api)
* [Drawing Exporting to PDF](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/pdf-output)
* [Drawing Exporting to Image](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/export-images)
* [Drawing Exporting to SVG](https://www.telerik.com/kendo-angular-ui-develop/components/drawing/export-svg)
