pdfPageToImage
Converts a page from a stored PDF file to a .jpg image and saves it to the file upload location.
Syntax
function pdfPageToImage(sourceRealName: string, pageNo: int): string
| Parameter | Description |
|---|---|
sourceRealName
|
Unique internal ID of the PDF file (real name). |
pageNo
|
Page number in the PDF file you wish to save as image. |
Return Value
Returns a string containing the saved JPG's real name.
Examples
In this example:
- We convert the 1st page of the Contract_f4340f5d-d639-4769-9a8e-5db40328d449.pdf file to to .jpg format.
- We save the real name of the image file in a variable called message.
- We display the message variable on screen. For details on how to display messages, see setMessage.
message = pdfPageToImage('Contract_f4340f5d-d639-4769-9a8e-5db40328d449.pdf', 1);
setMessage(message);