File Handling

Function Description
setDownload Downloads a file from the file upload location.
downloadFile Returns the contents of a stored file encoded using the Base64 scheme.
uploadFile Saves a Base64 encoded file to the the file upload location.
getBase64Encoded Returns the contents of a stored file encoded using the Base64 scheme.
server.mime.fromBase64String Returns the MIME type of a string encoded using the Base64 scheme.
getFileBlob Returns a pointer to a stored file.
getPDFDocumentFromBase64 Uploads the content of a file encoded using the Base64 scheme to the upload folder using a specified file name.
getFileContent Returns the content of a stored file in a UTF-8 encoded array.
getPageCount Returns the number of pages of a stored PDF file.
addToArchive Creates a .zip archive with the specified files and saves it in the upload folder.
convertDocx Converts a stored .docx file to PDF format and saves it to the upload folder.
convertImage Converts a stored image file to PDF format and saves it to the upload folder.
pdfPageToImage Converts a page from a stored PDF file to a .jpg image and saves it to the upload folder.
convertPDFPageToImage Converts a page from a stored PDF file to a .jpg image and saves it to the upload folder.
insertImageOnFile Inserts an image in a PDF and saves the resulting file to the upload folder using a specified file name.
writeText Inserts text boxes in a PDF file and uploads the resulting document in the upload folder.
extractDocument Extracts a page range from a stored PDF file and saves it to a new PDF file in the upload folder.
callReport Calls a document report based on the report ID.
callReportByName Calls a document report based on the report name.
getReport Calls a document report and returns the ID of the resulting file that was saved in the upload folder.
getMergedReport Concatenates multiple files and returns the ID of the resulting file (saved in the upload folder).
flattenPDF Flattens a stored PDF file and saves it to the upload folder.
optimizePDF Reduces the size of a PDF file and returns its content using the Base64 encoding.
encryptPDF Password protects a stored PDF file and saves it to the upload folder.
convertToPdfType Converts a PDF file to the PDF/A-1a or PDF/A-1b standard and saves it in the upload folder.
replaceTokens Replaces all occurrences of a specified text string from a stored PDF file and saves the resulting PDF file in the upload folder.
mergeDocuments Concatenates multiple PDF files into a single one and saves it to the upload folder.
listFilesFromFolder Returns the file names for all the files stored in a known folder.
moveFileToFolder Moves a file to a known folder.
recycleFile Saves a copy of an orphan file in the $RecycleBin subfolder of the default upload folder.
getDeletedFiles Returns orphan files information (files that have no entity link due to entity changes or removal).
getTextFileReader Stores the content of a file in a WorkflowTextFileReader object which can be read as a string, either line-by-line or all-at-once.
getTabularDataFromFile Imports tabular data from a plain text (.csv) or Excel (.xlsx) file stored in the file upload location.