Getting Started with KendoReact PDF Processing

The KendoReact PDF Processing enables you to export single- and multi-page content in PDF and provides options such as embedding images, exporting hidden content, setting the margins of the document and styling the output.

To export pages and page sections to PDF files, use either:

To export content to PDF with the PDFExport component:

  1. Place the content inside it.
  2. Call the save method of the component to save the generated file.

To export content to PDF with the savePDF method:

  1. Call the method.
  2. Pass the content as its argument.

The KendoReact PDF Processing feature is part of the KendoReact library of React UI components. It is distributed through NPM under the kendo-react-pdf package.

Basic Usage

The following example demonstrates the PDF Processing export components in action.

Example
View Source
Edit In Stackblitz  
Change Theme:

Functionality and Features

Refer to the Drawing library documentation for more information on:

Installation

  1. Download and install the package. Use Node.js v5.0.0 or later.

    npm install --save @progress/kendo-react-pdf @progress/kendo-drawing @progress/kendo-licensing
  2. Once installed, import the package module.

     // ES2015 module syntax
     import { PDFExport, savePDF } from '@progress/kendo-react-pdf';
    // CommonJS format
    const { PDFExport, savePDF } = require('@progress/kendo-react-pdf');
  3. Follow the instructions on the KendoReact My License page to activate your license. You can skip this step if your application already contains a KendoReact license file.

Dependencies

The PDF package requires the following peer dependencies to be installed by your application:

  • react 16.8.2*
  • react-dom
  • @progress/kendo-licensing
  • @progress/kendo-drawing