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 Margins as Properties

To set the margin as a property, use the PDFExport component and the margin property.

    <PDFExport margin={{ top: 20, left: 100, right: 30, bottom: 40 }} >
        <DataToExport />
    <PDFExport margin="2cm" >
        <DataToExport />

Setting Margins as Child Components

To set the margin as a child component, use the PDFExport and PDFMargin components.

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

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

Setting Margins as Arguments

To set the margin as an argument, use the savePDF method and the margin option.

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

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