Skip to main content

Pdf Tools

Overview

A non-visible component to work with pdfs.

Blocks

Methods

Initialize

Initializes the pdf generator

loading block...

Input ParamsTypeDescription
orientationStringOrientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l").
page formatStringThe format of the first page. Valid values are:
1. a0 - a10
2. b0 - b10
3. c0 - c10
4. dl
5. letter
6. government-letter
7. legal
8. junior-legal
9. ledger
10. tabloid
11. credit-card

Add text

Adds text to page. Supports adding multiline text when 'text' argument is an List of text.

loading block...

Input ParamsTypeDescription
textListList of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
xNumberCoordinate against left edge of the page.
yNumberCoordinate against upper edge of the page.

Draw line

Draw a line on the current page.

loading block...

Input ParamsTypeDescription
x1Number1st coordinate against left edge of the page.
y1Number1st coordinate against upper edge of the page.
x2Number2nd coordinate against left edge of the page.
y2Number2nd coordinate against upper edge of the page.

Add page

Adds (and transfers the focus to) new page to the PDF document.

loading block...

Input ParamsTypeDescription
formatStringThe format of the first page. Valid values are:
1. a0 - a10
2. b0 - b10
3. c0 - c10
4. dl
5. letter
6. government-letter
7. legal
8. junior-legal
9. ledger
10. tabloid
11. credit-card
orientationStringOrientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l").

Current page

Switch the active page to the page number specified.

loading block...

Input ParamsTypeDescription
pageNumberSwitch the active page to the page number specified.

Delete page

Deletes a page from the PDF.

loading block...

Input ParamsTypeDescription
pageNumberThe page number that is to be deleted.

Save

Saves as PDF document.

loading block...

Input ParamsTypeDescription
nameStringThe filename including extension.