convertImage
Converts a stored image file to PDF format and saves it to the file upload location.
Syntax
Copy
function convertImage(sourceRealName: string): string
| Parameter | Description |
|---|---|
sourceRealName
|
Unique internal ID of the image file (real name). |
Return Value
Returns a string containing the saved PDF's real name.
Examples
In this example:
- Convert the
ID_d9bf2c95-ab7d-4acc-befb-4b5d448f09f6.pngfile to PDF format. - Display a notification or alert message at the bottom of the screen after the transaction completes using setMessage.
message = convertImage('ID_d9bf2c95-ab7d-4acc-befb-4b5d448f09f6.png');
setMessage(message);
The name of the generated pdf file is in the following form: ID_d9bf2c95-ab7d-4acc-befb-4b5d448f09f6_ce7a2b4a-9988-4794-a6eb-9c07c9b5c836.pdf