Getting Started with the Kendo UI for Angular PDF Export
The PDF Export component enables you to export pages and page sections to PDF files.
To export content to PDF:
- Place the content in the
<kendo-pdf-export>
component. - Call the
saveAs
method to save the generated file.
The PDF component is a streamlined solution for exporting and handling content in PDF. To export content in PDF, you can also use the PDF output capabilities of the Drawing library which provides a more flexible but harder to use low-level API.
Basic Usage
The following example demonstrates the PDF Export component in action.
Installation
Either use the quick setup (Angular CLI) or manually add the package.
Quick Setup with Angular CLI
Angular CLI supports the addition of packages through the ng add
command which executes in one step the set of otherwise individually needed commands.
ng add @progress/kendo-angular-pdf-export
Manual Setup
Download and install the package.
npm install --save @progress/kendo-angular-pdf-export @progress/kendo-angular-common @progress/kendo-drawing @progress/kendo-licensing
Once installed, import the PDFExportModule in your application root or feature module.
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { PDFExportModule } from '@progress/kendo-angular-pdf-export'; import { AppComponent } from './app.component'; @NgModule({ bootstrap: [AppComponent], declarations: [AppComponent], imports: [BrowserModule, PDFExportModule] }) export class AppModule { }
Follow the instructions on the Kendo UI for Angular My License page to activate your license. You can skip this step if your application already contains a Kendo UI license file.
Dependencies
The PDF Export package requires the following peer dependencies to be installed by your application:
- @angular/common
- @angular/core
- @progress/kendo-angular-common
- @progress/kendo-drawing
- @progress/kendo-licensing
- rxjs
Functionality and Features
- Embedding fonts
- Embedding images
- Disabling hyperlinks
- Scaling the exported content
- Rendering repeated table headers
- Rendering multi-page content
- Hiding extra content
- Styling the exported content
Refer to the Drawing library documentation for more information on: