天天看點

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("儲存成功!");
      

  

Office/Pdf格式轉換,Net5環境下Aspose最新版21.8全系列,去水印等

示例代碼不包含key,下面有擷取key方法

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

pdf

Office/Pdf格式轉換,Net5環境下Aspose最新版21.8全系列,去水印等
Office/Pdf格式轉換,Net5環境下Aspose最新版21.8全系列,去水印等
Office/Pdf格式轉換,Net5環境下Aspose最新版21.8全系列,去水印等
Office/Pdf格式轉換,Net5環境下Aspose最新版21.8全系列,去水印等

加微信25489181,擷取key

Office/Pdf格式轉換,Net5環境下Aspose最新版21.8全系列,去水印等

​​

Office/Pdf格式轉換,Net5環境下Aspose最新版21.8全系列,去水印等