赞
踩
本文主要讲xlsx、docx、pptx格式转换为PDF格式
同时附带示例源码下载地址
//EXcel转换为PDF //string path = AppDomain.CurrentDomain.BaseDirectory; string path = Environment.CurrentDirectory; //Workbook workbook = new Workbook(path + @"\..\..\excel格式.xlsx"); //workbook.Save(path + @"长列名xlsm文件_2.pdf", SaveFormat.Pdf); //workbook.Save(path + @"..\..\..\excel格式_2.pdf", new PdfSaveOptions() { AllColumnsInOnePagePerSheet = true }); //Word转换为PDF //Document document = new Document(path + @"\..\..\myword.docx"); //document.Save(path + @"..\..\..\myword_2.pdf", Aspose.Words.SaveFormat.Pdf); //ppt转换为PDF Presentation ppt = new Presentation(path + @"\..\..\myppt-plus.pptx"); ppt.Save(path + @"..\..\..\myppt-plus_2.pdf", Aspose.Slides.Export.SaveFormat.Pdf); Console.WriteLine("应该是转换完毕了吧"+path); Console.ReadLine();
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。