Pdf Tools
Overview
A non-visible component to work with pdfs.
Blocks
Methods
Initialize
Initializes the pdf generator
loading block...
| Input Params | Type | Description |
|---|---|---|
| orientation | String | Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l"). |
| page format | String | The 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 Params | Type | Description |
|---|---|---|
| text | List | List of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call. |
| x | Number | Coordinate against left edge of the page. |
| y | Number | Coordinate against upper edge of the page. |
Draw line
Draw a line on the current page.
loading block...
| Input Params | Type | Description |
|---|---|---|
| x1 | Number | 1st coordinate against left edge of the page. |
| y1 | Number | 1st coordinate against upper edge of the page. |
| x2 | Number | 2nd coordinate against left edge of the page. |
| y2 | Number | 2nd coordinate against upper edge of the page. |
Add page
Adds (and transfers the focus to) new page to the PDF document.
loading block...
| Input Params | Type | Description |
|---|---|---|
| format | String | The 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 |
| orientation | String | Orientation 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 Params | Type | Description |
|---|---|---|
| page | Number | Switch the active page to the page number specified. |
Delete page
Deletes a page from the PDF.
loading block...
| Input Params | Type | Description |
|---|---|---|
| page | Number | The page number that is to be deleted. |
Save
Saves as PDF document.
loading block...
| Input Params | Type | Description |
|---|---|---|
| name | String | The filename including extension. |