Office/Pdf格式转换,Net5环境下Aspose最新版21.8全系列,去水印等

2021/9/3 22:07:20

本文主要是介绍Office/Pdf格式转换,Net5环境下Aspose最新版21.8全系列,去水印等,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

var byteKey = Convert.FromBase64String("xxxxxx");
 
            //注册,实现去水印            
            new Aspose.Pdf.License().SetLicense(new MemoryStream(byteKey));
            new Aspose.Cells.License().SetLicense(new MemoryStream(byteKey));
            new Aspose.Words.License().SetLicense(new MemoryStream(byteKey));
            new Aspose.Slides.License().SetLicense(new MemoryStream(byteKey));
            string wordFile = "wordFile.docx";
            string excelFile = "excelFile.xlsx";
            string pptFile = "pptFile.pptx";
            string pdfFile = "pdfFile.pdf";
            Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();
            workbook.Worksheets.Add();
            workbook.Worksheets[0].Cells[1, 1].Value = "excelTest";
            workbook.Save(excelFile);
            workbook.Save(wordFile, Aspose.Cells.SaveFormat.Docx);
            workbook.Save(pptFile, Aspose.Cells.SaveFormat.Pptx);
            workbook.Save(pdfFile, Aspose.Cells.SaveFormat.Pdf);
            Console.WriteLine("保存成功!");

  

 

 

 

示例代码不包含key,下面有获取key方法

office所有版本2003-2022,Pdf所有版本均支持。

pdf

 

 

 

 

 

 

 

 

 

 

加微信25489181,获取key

 

​​

 



这篇关于Office/Pdf格式转换,Net5环境下Aspose最新版21.8全系列,去水印等的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程