PDFCREATE
Creates a pdf file with a selection of app pages.
Syntax
PDFCREATE(page)
page - the name of the page which should be added to the pdf file, or a json text containing a list of pages to be exported - Value type: text (optional, default value: current page name)
Possible value types:
text - the name of the page which should be downloaded as pdf file
json - see below under "Remarks"
The function returns the name under which the pdf file is stored on the nedyx server. This name can then be used with the DOWNLOADFILE or SENDEMAIL functions to download the file to the local computer or send it by e-mail.
You can find more information about nedyx file management in the File management chapter.
Remarks
If page is specified as a json text, it must follow this syntax: [ [pageTitle1, widgetName1, actiontype1, actiondata1 ], [pageTitle2, widgetName2, actiontype2, actiondata2 ], [pageTitle3] ] with
pageTitle - the technical name of the page which should be added to the pdf file.
widgetName - the name of the widget (without “#”). The widget must be on the page pageTitle, so that is can be executed in the browser page.
actionType - the type of action which should be executed on the page before it is added to the pdf. Possible values are: “click” and “switch”.
actionData - for actionType “switch”, the position or the value of the new setting can be specified. If this parameter is a number, it specifies the new position of the menu, if it is a text, it specifies the new selected value of the menu.
The parameters widgetName, actionType and actionData are optional. If specified, these actions are performed before the page is added to the pdf file.
Examples
Example 1
A click on the "PDFExport" button creates a pdf file containing the current page. This is then downloaded to the local computer using the DOWNLOADFILE function and then deleted using the DELETEFILE function.
Example 2
A click on the "SendEmail" button creates a PDF file that contains the "SalesDashboard" page twice. On the first page, the menu widget with the name "Region" is switched to "USA", on the second page to "Germany". The generated pdf file is then sent as an email attachment by calling the SENDEMAIL function and deleted using the DELETEFILE function.
Last updated