jspdf-client-side-pdf-generator
Reactive icon

jsPDF - Client-side PDF generator

Stable version 1.0.1 (Compatible with OutSystems 11)
Uploaded on 04 April 2023 by 
5.0
 (1 rating)
jspdf-client-side-pdf-generator

jsPDF - Client-side PDF generator

Documentation
1.0.1

Official documentation

This is a wrapper for a component from GitHub. For further information please refer to the official documentation. Version jsPDF: 2.5.1 Version AutoTable plugin: 3.5.28


Add the JavaScript

Add the jsPDF_Main block to your page to load the JavaScript file. If you want to create a Table inside the PDF, also add the jsPDF_Autotable block.


Create a new Document

Create a new document by adding the NewDocument-Action to your Client Action.
The returned object can be used as a reference for all following operations on the PDF. Just use the NewDocument's output as the input for later actions.

One Parameter are PdfOptions - please refer to the official jsPDF-documentation.


Adding Text

To add a new Text, you need to provide the text and also the coordinates where the text should be placed. The coordinates state the text position from upper left corner, in units you specified when creating the document (in the Unit input parameter).

In the parameter FontSize you can specify the font size in points. If not specified, no changes are made to the font size, so it retains the default or previously configured value.

Style the Text

For text styling, you can pick from various actions. The changes to styling are applied for all inputs following the styling actions. 


AutoTable

This Library also contains the jsAutoTable-Plugin, found on GitHub.

Header and rows are defined by arrays of CellDefs.


1.0.0

Official documentation

This is a wrapper for a component from GitHub. For further information please refer to the official documentation. Version jsPDF: 2.5.1 Version AutoTable plugin: 3.5.28


Add the JavaScript

Add the jsPDF_Main block to your page to load the JavaScript file. If you want to create a Table inside the PDF, also add the jsPDF_Autotable block.


Create a new Document

Create a new document by adding the NewDocument-Action to your Client Action.
The returned object can be used as a reference for all following operations on the PDF. Just use the NewDocument's output as the input for later actions.

One Parameter are PdfOptions - please refer to the official jsPDF-documentation.


Adding Text

To add a new Text, you need to provide the text and also the coordinates where the text should be placed. The coordinates state the text position from upper left corner, in units you specified when creating the document (in the Unit input parameter).

In the parameter FontSize you can specify the font size in points. If not specified, no changes are made to the font size, so it retains the default or previously configured value.

Style the Text

For text styling, you can pick from various actions. The changes to styling are applied for all inputs following the styling actions. 


AutoTable

This Library also contains the jsAutoTable-Plugin, found on GitHub.

Header and rows are defined by arrays of CellDefs.