The method does not modify the source file whose ID is passed in the fileId parameter, but instead creates a temporary file with a watermark. Watermark overlay is available for files in .xls, .xlsx, .doc, .docx, and .pdf formats.
For more information on using watermarks, see the article
[Document Print Form] (https://elma365.com/ru/help/ecm/print_form.html).
If you need to use functions and variables from the app item,
template the HTML template using Templater.generateText before passing it to Watermarks.applyToFile.
Object for working with watermarks
Hierarchy
Methods
applyToFile
Add a watermark to a file.
The method does not modify the source file whose ID is passed in the
fileIdparameter, but instead creates a temporary file with a watermark.Watermark overlay is available for files in .xls, .xlsx, .doc, .docx, and .pdf formats. For more information on using watermarks, see the article [Document Print Form] (https://elma365.com/ru/help/ecm/print_form.html). If you need to use functions and variables from the app item, template the HTML template using
Templater.generateTextbefore passing it toWatermarks.applyToFile.Parameters
fileId: string
watermarks: Watermark[]
Returns Promise<FileItemRef>
The instance of FileItemRef referencing a temporary file with a watermark.