Pdf

A Stateless Functional Component.

The Export to PDF tool component.

To modify the default PDF export options, see the following example:

import { Editor, EditorTools } from '@progress/kendo-react-editor';
const { Bold, Italic, Pdf } = EditorTools;

const PdfTool = (props: EditorTools.PdfProps) => (
    <Pdf
        {...props}
        // https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/PDFExportProps/
        savePdfOptions={{
            fileName: 'editor-export.pdf',
            paperSize: 'A5',
            margin: '1cm'
        }}
    />
);

class App extends React.Component<any, any> {
    render() {
        return (
            <Editor
                tools={[[ Bold, Italic, PdfTool ]]}
                contentStyle={{ height: 100 }}
                defaultContent="<p>text</p>"
            />
        );
    }
}

props

PdfProps intersected with { children?: ReactNode; }

The props of the Pdf component.

In this article

Not finding the help you need?