convertDocx
Converts a stored .docx file to PDF format and saves it to the file upload location.
Syntax
function convertDocx(sourceRealName: string, destinationName: string): string
| Parameter | Description |
|---|---|
sourceRealName
|
Unique internal ID of the .docx file (real name). |
destinationName
|
File name of the saved .pdf file. |
Return Value
Returns a string containing the saved PDF's real name.
Examples
In this example:
- We convert the Contract_e5f638f6-ae58-4336-8ae9-c8f680f7a393.docx file to a file called PDFcontract.pdf.
- We save the real name of the new PDF file in a variable called message.
- We display the message variable on screen. For details on how to display messages, see setMessage.
message = convertDocx('Contract_e5f638f6-ae58-4336-8ae9-c8f680f7a393.docx', 'PDFcontract');
setMessage(message);