CreatePdfTemplateDto

Properties

NameType
namestring
typestring
rendererstring
pageSizestring
pageWidthPtnumber
pageHeightPtnumber
marginMargin
headerHeightPtnumber
footerHeightPtnumber
headerMarginMargin
footerMarginMargin
defaultsCreatePdfTemplateDtoDefaults

Example

import type { CreatePdfTemplateDto } from '@pdf-generator/client'

// TODO: Update the object below with actual values
const example = {
  "name": Invoice Template,
  "type": simple,
  "renderer": itext,
  "pageSize": A4,
  "pageWidthPt": 595,
  "pageHeightPt": 842,
  "margin": null,
  "headerHeightPt": 50,
  "footerHeightPt": 50,
  "headerMargin": null,
  "footerMargin": null,
  "defaults": null,
} satisfies CreatePdfTemplateDto

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 CreatePdfTemplateDto
console.log(exampleParsed)

[Back to top] [Back to API list] [Back to Model list] [Back to README]