Exemplo n.º 1
0
        private static string GetFilepathAfterConvertSpirePdf(string filepath, Spire.Pdf.FileFormat fileFormat)
        {
            PdfDocument pdfDocument = new PdfDocument();

            pdfDocument.LoadFromFile(filepath);
            if (fileFormat == Spire.Pdf.FileFormat.HTML)
            {
                filepath = FolderWork.CreateForlderForHTML(filepath);
                filepath = $"{filepath}\\html\\{formatWord}.{fileFormat.ToString().ToLower()}";
            }
            else
            {
                filepath = $"{filepath}_{formatWord}.{fileFormat.ToString().ToLower()}";
            }
            pdfDocument.SaveToFile(filepath, fileFormat);
            return(filepath);
        }
Exemplo n.º 2
0
        //Подумать над названием
        private static string GetFilepathAfterConvertSpireDoc(string filepath, Spire.Doc.FileFormat fileFormat)
        {
            Document document = new Document();

            document.LoadFromFile(filepath);

            if (fileFormat == Spire.Doc.FileFormat.Html)
            {
                filepath = FolderWork.CreateForlderForHTML(filepath);
                filepath = $"{filepath}\\{formatWord}.{fileFormat.ToString().ToLower()}";
            }
            else
            {
                filepath = $"{filepath}_{formatWord}.{fileFormat.ToString().ToLower()}";
            }
            document.SaveToFile(filepath, fileFormat);
            return(filepath);
        }