User Tools

Site Tools


Plugin installed incorrectly. Rename plugin directory 'swiftmail.backup' to 'swiftmail'.
en:software:tim:smartform:pdf_button

This is an old revision of the document!


Table of Contents

FIXME This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)

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.
en/software/tim/smartform/pdf_button.1506608278.txt.gz · Last modified: 2021/07/01 09:54 (external edit)