Hierarchy
- Converter
Methods
toPdf
-
Convert a file to .pdf.
The method does not change the source file whose ID is passed in the
fileId
parameter. Instead, it creates a temporary file. Converting to .pdf is available for files of the following formats:- .xls, .xlsx, . xlt, .xltx,
- .doc, .docx, .dot, .dotx,
- .rtf
Use example:// Get ID of the file to be converted to .pdf const fileId = Context.data.fileToConvert.id; // Convert the file to .pdf const tmpFile = await System.converter.toPdf(fileId);
Parameters
-
fileId: string
ID of the file converted to .pdf.
Returns Promise<FileItemRef>
The instance of FileItemRef referencing a temporary file in the .pdf format.
Object for converting documents