Hierarchy

  • Converter

Methods

toPdf

  • Convert a file to .pdf.

    The method doesn’t change the source file whose ID is passed in the fileId parameter. It creates a temporary file with a watermark. Converting to . pdf is available for files of the following formats: .xls, .xlsx, .doc, .docx. Example:

    // Get the ID of the file  that will be converted into .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.