platform.parseFile

The 'parseFile' function parses a given file, and returns plain text excluding formatting data if any.
parseFile函数提取文件中的纯文本

  • Prototype: platform.parseFile(sFilePath, sExt);
  • Parameters:
    1. sFilePath: path to the file to be parsed;
      文件路径
    2. sExt: specifies an appropriate extension name that could help determine the document type;
      指定文件后缀以帮助判断文件类型
  • Return Value: the plain text without any formatting data is returned;
  • Example:
    var sTxt=platform.parseFile('d:\\test\1.doc');