Exemple #1
0
        public void StreamConvert(IList <string> filePathes, string outPath)
        {
            var textImport = import as IWordLibraryTextImport;

            if (textImport == null)
            {
                throw new Exception("流转换,只有文本类型的才支持。");
            }
            StreamWriter stream = FileOperationHelper.GetWriteFileStream(outPath, export.Encoding);

            foreach (string filePath in filePathes)
            {
                var wlStream = new WordLibraryStream(import, export, filePath, textImport.Encoding, stream);
                wlStream.ConvertWordLibrary(w => IsKeep(w));
            }

            stream.Close();
        }