ftos.files.pdf.optimize

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

Reduces the size of a PDF file and returns its content using the Base64 encoding.

The function can process either the path to a PDF file saved on the server or the actual file content encoded using the Base64 scheme.

The resulting optimized PDF is based on a number of modifications, such as:

This is a business logic method for business service components.

Syntax

Copy
function ftos.files.pdf.optimize(source: string): string;
 
Parameter Description
source Either:
  • The Base64 string representation of a PDF file.
  • The name of a PDF file saved in the file upload location.

Return Value

Returns a string value that contains the optimized file encoded using the Base64 scheme.

Examples