New to Kendo UI for Vue? Start a free 30-day trial

Represents the props of the GridPdfExport component (more information and examples in the documentation on PDF export).

Definition

Package:@progress/kendo-vue-pdf

Properties

author?

string

Sets the author (metadata) of the PDF document.

Example:
vue
<PDFExport :author="'Jane Smith'" />

string | boolean

Sets whether to skip real hyperlinks in the exported PDF file. You can also set a CSS selector. The PDF file then skips all links that match it.

Example:
vue
<PDFExport :avoid-links="true" />

creator?

string

Sets the creator of the PDF document.

Default:

"Kendo UI PDF Generator"

Example:
vue
<PDFExport :creator="'Sales Portal'" />

date?

Date

Sets the date when you create the PDF document. Defaults to new Date().

Example:
vue
<PDFExport :date="new Date(2024, 0, 1)" />

fileName?

string

Specifies the name of the exported PDF file.

Default:

"export.pdf"

Example:
vue
<PDFExport :file-name="'invoice.pdf'" />

Sets a CSS selector for the elements that start a new page.

Example:
vue
<PDFExport :force-page-break="'.page-break'" />

When set to true, sends the content to proxyURL even if the browser can save files locally.

Example:
vue
<PDFExport :force-proxy="true" :proxyURL="'/api/pdf-proxy'" />

Sets the resolution of the images in the exported PDF document. By default, the PDF document uses the full resolution of the images.

Example:
vue
<PDFExport :image-resolution="150" />

Sets a CSS selector for the elements that must stay on one page.

Example:
vue
<PDFExport :keep-together="'.invoice-row'" />

keywords?

string

Sets the keywords (metadata) of the PDF document.

Example:
vue
<PDFExport :keywords="'invoice, sales, 2024'" />

landscape?

boolean

Sets whether the page uses a landscape orientation. By default, the page uses a portrait orientation.

Default:

false

Example:
vue
<PDFExport :landscape="true" />

margin?

string | number | PageMargin

Specifies the margins of the page.

The supported units are:

  • "mm"
  • "cm"
  • "in"
  • "pt" (default).

The PDFExport treats numbers as points ("pt").

Example:
vue
<PDFExport :margin="'2cm'" />

Sets a Vue component that the PDFExport uses as a template and inserts into each page of the PDF document. The component receives the number of the current page (pageNum) and the total number of pages (totalPages) as props.

Example:
vue
<PDFExport :page-template="PageTemplate" />

paperSize?

PaperSize

Specifies the paper size of the PDF document. Defaults to "auto", which means that the content sets the paper size. The size of the content in pixels matches the size of the output in points (1 pixel = 1/72 inch).

When you set it, the PDFExport splits the content across multiple pages. This enables the repeatHeaders and scale options, and lets you set a template.

The supported values are:

  • A predefined size. The supported paper sizes are: A0-A10, B0-B10, C0-C10,

Executive, Folio, Legal, Letter, Tabloid.

  • An array of two numbers that set the width and height in points (1pt = 1/72in).
  • An array of two strings that set the width and height in units.

The supported units are "mm", "cm", "in", and "pt".

Example:
vue
<PDFExport :paper-size="'A4'" />

producer?

string

Sets the producer (metadata) of the PDF document.

Example:
vue
<PDFExport :producer="'Finance Reports'" />

proxyData?

{ [key: string]: string }

Sets a key/value dictionary of form values that the PDFExport sends to the proxy. You can use it to send anti-forgery tokens and other metadata.

Example:
vue
<PDFExport :proxy-data="{ token: csrfToken }" />

Sets a name or keyword that shows where to display the document that the proxy returns. To display the document in a new window or iframe, set the "Content-Disposition" header of the proxy to inline; filename="<fileName.pdf>".

Default:

"_self"

Example:
vue
<PDFExport :proxy-target="'_blank'" />

proxyURL?

string

Sets the URL of the server-side proxy that streams the file to the end user. You need a proxy if the browser cannot save files locally— for example, Internet Explorer 9 and Safari. You have to implement the server-side proxy.

In the request body, the proxy receives a POST request with the following parameters:

  • "contentType"—The MIME type of the file.
  • "base64"—The base-64 encoded file content.
  • "fileName"—The file name that the caller requests.

The proxy returns the decoded file with the "Content-Disposition" header set to attachment; filename="<fileName.pdf>".

Example:
vue
<PDFExport :proxyURL="'/api/pdf-proxy'" />

Specifies whether the PDFExport repeats the <thead> elements of the tables on each page.

Example:
vue
<PDFExport :paper-size="'A4'" :repeat-headers="true" />

scale?

number

Sets a scale factor. The text size on the screen can be too big for printing. Use this option to scale down the output in the PDF document.

Default:

1

Example:
vue
<PDFExport :paper-size="'A4'" :scale="0.6" />

subject?

string

Sets the subject (metadata) of the PDF document.

Example:
vue
<PDFExport :subject="'Quarterly sales report'" />

title?

string

Sets the title (metadata) of the PDF document.

Example:
vue
<PDFExport :title="'Q1 Sales'" />