exportPdf method

Note: STABLE.
This API is reliable and breaking changes are unlikely.

qlik.app.visualization.exportPdf(settings)

Exports a QVisualization instance to PDF.

Version history

Introduced Qlik Sense September 2018

Parameters

settings

Type: Object

PDF export settings.

Properties

Name Type Description
documentSize String | ObjectMetricSize

Page size of the output PDF. Can be an object with custom size or a string with one of the following document formats:

  • A3
  • A4
  • A5
  • A6
  • A7
orientation String

Ignored if documentSize is an object. Can be:

  • portrait
  • landscape

Default is landscape.

aspectRatio Number

Specifies the aspect ratio. Can be:

  • 0: as specified in objectSize
  • 2: fit to page

Default is JPG.

objectSize ObjectPixelSize

Exported object height and width in pixels. Required when aspectRatio: 0.

Returns

A promise of a link to the exported file.

Example

var settings = {
  documentSize: "A4",
  aspectRatio: 2,
  orientation: "landscape"
};

visualization.exportPdf(settings)
.then(function (result) {
  console.log('PDF download link: ', result);
});

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?