標籤:ppt blog exists ppa creat sts 檔案夾 context direct
//excel轉換 Workbook workbook = new Workbook(HttpContext.Current.Server.MapPath(docpath + "/" + newFileName + sExtension));//找到轉換檔 string newFilePath = docpath + "NewFile/"; string newuploadPath = HttpContext.Current.Server.MapPath(newFilePath);//找到轉換後檔案所存放的路徑 string newfileName = newFileName + ".pdf"; string err = ""; if (!Directory.Exists(newuploadPath))//沒有此檔案夾直接建立 { Directory.CreateDirectory(newuploadPath); } workbook.Save(HttpContext.Current.Server.MapPath(newFilePath + newfileName), Aspose.Cells.SaveFormat.Pdf);//轉換中 //word轉換 Aspose.Words.Document doc = new Aspose.Words.Document(HttpContext.Current.Server.MapPath(docpath + "/" + newFileName + sExtension)); string newFilePath = docpath + "NewFile/"; string newuploadPath = HttpContext.Current.Server.MapPath(newFilePath); string newfileName = newFileName + ".pdf"; string err = ""; if (!Directory.Exists(newuploadPath)) { Directory.CreateDirectory(newuploadPath); } doc.Save(HttpContext.Current.Server.MapPath(newFilePath + newfileName), Aspose.Words.SaveFormat.Pdf); //ppt轉換 Presentation pres = new Presentation(HttpContext.Current.Server.MapPath(docpath + "/" + newFileName + sExtension)); string newFilePath = docpath + "NewFile/"; string newuploadPath = HttpContext.Current.Server.MapPath(newFilePath); string newfileName = newFileName + ".pdf"; string err = ""; if (!Directory.Exists(newuploadPath)) { Directory.CreateDirectory(newuploadPath); } pres.Save(HttpContext.Current.Server.MapPath(newFilePath + newfileName), Aspose.Slides.Export.SaveFormat.Pdf);
Offic轉換pdf 之asposeDLL外掛程式