ftos.files.pdf.writeTextStamp

IMPORTANT!  
Starting with v24.3.0, this is renamed from writeTextStamp to ftos.files.pdf.writeTextStamp.

Inserts text stamps in a PDF file and uploads the resulting document in the upload folder.

This is a business logic method for business service components.

Syntax

Copy
function ftos.files.pdf.writeTextStamp(sourceRealName : string, outputFileName : string, textList : any, textOptions : IWorkflowPdfTextOptions): string;
 
Parameter Type Description
sourceRealName string Unique internal ID of the source PDF file (real name).
outputFileName string Name of the resulting PDF file where you wish to add the text stamps. The file name must include the .pdf file extension.
textList any Array of JSON objects containing the text stamps coordinates, text contents, and page numbers in the source PDF where they must be inserted.
textOptions IWorkflowPdfTextOptions JSON object containing formatting parameters for the inserted text.

The textList parameter has the following structure:

Copy
[
    {rect:{left: <'box 1 left margin'>, right: <'box 1 right margin'>, bottom: '<box 1 bottom margin>', top: '<box 1 top margin>'}, text:'<dummy text>', page: <source PDF box 1 page no.>, newText:'<box 1 text contents>'});
    {rect:{left: <'box 2 left margin'>, right: <'box 2 right margin'>, bottom: '<box 2 bottom margin>', top: '<box 2 top margin>'}, text:'<dummy text>', page: <source PDF box 2 page no.>, newText:'<box 2 text contents>'});
    ...
]

Return Value

Returns a string containing the saved PDF's real name.

Type Aliases