# Configuration of Margins

The PDF Processing package delivers options for setting the margins of the output PDF files.

To set the margin of an output file, you can use any of the following approaches:

* [Setting the margin as a property](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/setting-margin#setting-margins-as-properties)
* [Setting the margin as a child component](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/setting-margin#setting-margins-as-child-components)
* [Setting the margin as an argument](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/setting-margin#setting-margins-as-arguments)

## Setting Margins as Properties

To set the margin as a property, use the [`PDFExport`](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/api/pdfexport) component and the [`margin`](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/api/pdfexportprops#margin) property.

```jsx
<PDFExport margin={{ top: 20, left: 100, right: 30, bottom: 40 }} >
    <DataToExport />
</PDFExport>
```

```jsx
 <PDFExport margin="2cm" >
    <DataToExport />
</PDFExport>
```

## Setting Margins as Child Components

To set the margin as a child component, use the [`PDFExport`](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/api/pdfexport) and [`PDFMargin`](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/api/pdfmarginprops) components.

```jsx
import { PDFExport, PDFMargin } from '@progress/kendo-react-pdf';

<PDFExport>
    <PDFMargin top="50mm" bottom="30mm" />
 </PDFExport>
```

## Setting Margins as Arguments

To set the margin as an argument, use the [`savePDF`](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/api/savepdf) method and the [`margin`](https://www.telerik.com/kendo-react-ui-develop/components/pdfprocessing/api/pdfexportprops#margin) option.

```js
import { savePDF } from '@progress/kendo-react-pdf';

savePDF(domElement, { margin: "2cm" });
```

## Suggested Links

* [API Reference of the Drawing Library](https://www.telerik.com/kendo-react-ui-develop/components/drawing)
* [Export of Drawings in PDF](https://www.telerik.com/kendo-react-ui-develop/components/drawing/pdf-output)
