PDF Buttons

It is possible to implement a button in th smartform, which can convert WOrdtemplates into PDFs via a click on the button. For that the following code has to be put into the smartform and has to be adjusted.

<button type="button" onbuttonclick="generateFileFromTemplate([{handler:'WordTemplateHandler',template:'super/templates/${NOW}.docx',documentPrefix:'Test_Prefix',pdf:true,attach:false,open:true}])">PDF Button</button>

The attribute “onbuttonclick” defines what functions the handler should execute.

handler: Here the WordTemplateHandler is sepcified.

template: Here the path to the WordTemplateHandler is specified.

documentPrefix: Here the prefix, which should be put before the document, can be defined.

pdf : If true is put here, the WordTemplate will be put out in the form of a PDF. (true or false)

attach :Here it can be specified, whether the PDF should be attached to the processinstance or not (true or false)

open :Here it can be specified, whether the PDf should be opened in the brwoser or not.