PdfTemplate

Properties

NameType
idnumber
createdAtDate
updatedAtDate
userPropertiesArray<PdfTemplateUserProperties>
variablesArray<TemplateVariable>
belongingVariablesArray<Array<string>>
namestring
typestring
rendererstring
rendererOptionsobject
pageSizestring
pageWidthPtnumber
pageHeightPtnumber
marginMargin
hasHeaderboolean
hasBodyboolean
hasFooterboolean
headerHeightPtnumber
footerHeightPtnumber
headerMarginMargin
footerMarginMargin
organizationOrganization

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]