action pdfgeneratorapi_create_template { label: "Create template" description: "Creates a new template. If template configuration is not specified in the request body then an empty template is created. Template is placed to the workspace specified in authentication params. Template configuration must be sent in the request body." provider: pdfgeneratorapi method: POST path: "/templates" encoding: json input: { type: "object" description: "Template configuration" required: ["name"] properties: { isDraft: { type: "boolean" description: "Indicates if the template is a draft or published." } layout: { type: "object" description: "Defines template layout (e.g page format, margins)." properties: { emptyLabels: { type: "integer" description: "Defines how many pages or labels should be empty" } format: { type: "string" description: "Defines template page size" enum: ["A4", "letter", "custom"] } height: { type: "number" description: "Page height in units" } margins: { type: "object" description: "Page margins in units" properties: { bottom: { type: "number" } left: { type: "number" } right: { type: "number" } top: { type: "number" } } } orientation: { type: "string" description: "Page orientation" enum: ["portrait", "landscape"] } repeatLayout: { type: "object" description: "Defines page size if layout is repeated on the page e.g sheet labels" properties: { format: { type: "string" description: "Defines template page size" enum: ["A4", "letter", "custom"] } height: { type: "number" description: "Page height in units" } width: { type: "number" description: "Page width in units" } } } rotaion: { type: "integer" description: "Page rotation in degrees" enum: [0, 90, 180, 270] } unit: { type: "string" description: "Measure unit" enum: ["cm", "in"] } width: { type: "number" description: "Page width in units" } } } name: { type: "string" description: "Template name" } pages: { type: "array" description: "Defines page or label size, margins and components on page or label" items: { type: "object" properties: { components: { type: "array" items: { type: "object" description: "Template component definition" properties: { cls: { type: "string" description: "Defines component class/type" enum: ["labelComponent", "numberComponent", "textComponent", "imageComponent", "dateComponent", "hlineComponent", "vlineComponent", "tableComponent", "compositeComponent", "barcodeComponent", "qrcodeComponent", "chartComponent", "rectangleComponent", "headerComponent", "footerComponent", "checkboxComponent", "radioComponent"] } dataIndex: { type: "string" description: "Defines data field for Table and Container components which are used to iterate over list of items" } height: { type: "number" description: "Height in units" } id: { type: "string" description: "Component id" } left: { type: "number" description: "Position from the page left in units" } top: { type: "number" description: "Position from the page top in units" } value: { type: "string" description: "Component value" } width: { type: "number" description: "Width in units" } zindex: { type: "integer" description: "Defines the rendering order on page. Components with smaller zindex are rendered before" } } } } height: { type: "number" description: "Page height in units" } margins: { type: "object" properties: { bottom: { type: "number" description: "Page or label margin from bottom" } right: { type: "number" description: "Page or label margin from right" } } } width: { type: "number" description: "Page width in units" } } } } tags: { type: "array" description: "A list of tags assigned to a template" items: { type: "string" } } } } output: { type: "object" additionalProperties: true } }