PdfTemplate
Properties
| Name | Type |
|---|---|
id | number |
createdAt | Date |
updatedAt | Date |
userProperties | Array<PdfTemplateUserProperties> |
variables | Array<TemplateVariable> |
belongingVariables | Array<Array<string>> |
name | string |
type | string |
renderer | string |
rendererOptions | object |
pageSize | string |
pageWidthPt | number |
pageHeightPt | number |
margin | Margin |
hasHeader | boolean |
hasBody | boolean |
hasFooter | boolean |
headerHeightPt | number |
footerHeightPt | number |
headerMargin | Margin |
footerMargin | Margin |
organization | Organization |
Example
import type { PdfTemplate } from '@pdf-generator/client'
// TODO: Update the object below with actual values
const example = {
"id": null,
"createdAt": null,
"updatedAt": null,
"userProperties": null,
"variables": null,
"belongingVariables": null,
"name": null,
"type": null,
"renderer": null,
"rendererOptions": null,
"pageSize": null,
"pageWidthPt": null,
"pageHeightPt": null,
"margin": null,
"hasHeader": null,
"hasBody": null,
"hasFooter": null,
"headerHeightPt": null,
"footerHeightPt": null,
"headerMargin": null,
"footerMargin": null,
"organization": null,
} satisfies PdfTemplate
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as PdfTemplate
console.log(exampleParsed)
[Back to top] [Back to API list] [Back to Model list] [Back to README]