Aspose

PPT导出为图片

人走茶凉 提交于 2020-02-25 19:47:14
使用Aspose组件导出 Aspose有Aspose.Slides.dll,可以无需安装office,进行读写PPT文件。 Aspose可能通过Aspose.Slides.NET安装 简单的导出图片demo,如下: 1 internal class PptToImagesConverter 2 { 3 private const string ImageExtension = ".png"; 4 public bool ConvertToImages(string pptFile, string exportImagesFolder) 5 { 6 using (Presentation pres = new Presentation(pptFile)) 7 { 8 int desiredX = 1200; 9 int desiredY = 800; 10 11 float scaleX = (float)(1.0 / pres.SlideSize.Size.Width) * desiredX; 12 float scaleY = (float)(1.0 / pres.SlideSize.Size.Height) * desiredY; 13 14 foreach (ISlide sld in pres.Slides) 15 { 16 Bitmap bmp = sld

Aspose.Words 的使用 Aspose.Total_for_.NET

风流意气都作罢 提交于 2020-02-20 20:00:53
最近在做有个业务需要Word做好模版,数据库取出业务数据在写入Word模版里面,然后生成PDF给客户端的业务人员 之前找了半天,没有找到用微软的Microsoft.Office.Interop.Word.WdExportRange 做,在调试的时候,完全没问题,但发布到服务端的时候,各种配置,组件安装的提示,最后都要崩溃了 最后不得已换了Aspose.Words 这个用起来真是爽啊 用法很简单 代码如下 : DataTable ret_val = DataLibrary.cl_DataLibrary.ds_ExecuteReader(sqlText.ToString(), CommandType.Text, new OracleParameter[] { op_SaleDetailNo, op_ShopNo }).Tables[0]; //取出业务数据 if (ret_val.Rows.Count > 0) { Document doc = new Document(Server.MapPath("./printfiles/word模版.docx")); DocumentBuilder builder = new DocumentBuilder(doc); Bookmark bm_SaleName; if (doc.Range.Bookmarks["txt_titleuser"]

Post-back after file download does not work

那年仲夏 提交于 2020-01-25 10:03:49
问题 My page has a pop-up. The button on popup generates and downloads Aspose excel file. (The page also has Ajax settings) Now after file download, my button is disabled and nothing else works on page unless i refresh it manually. Popup on page <div class="modal hide" id="AwaitPracSignoffReportModal"> <div class="modal-header"> <a class="close" data-dismiss="modal">×</a> <h3> <asp:Label runat="server" ID="lblPopupHeading" Text="Awaiting Practice Sign-off Report" /></h3> </div> <!-- Other asp

Aspose的使用

半世苍凉 提交于 2020-01-19 00:49:38
一、Aspose是什么? Aspose.Words是一个商业.NET类库,可以使得应用程序处理大量的文件任务。Aspose.Words支持Doc,Docx,RTF,HTML,OpenDocument,PDF,XPS,EPUB和其他格式。使用Aspose.Words可以在不使用Microsoft.Word的情况下生成、修改、转换和打印文档。在项目中使用 Aspose.Words可以运行在Windows,Linux和Mac OS操作系统上面 虽然aspose的jar包是收费的,但是网上能搜到很多破解版的,去掉了页眉和水印 之类的限制 在项目中的使用就是将html标签转换为了docx文档,然后在写到输出流从浏览器中下载 部分代码: String fileName =new String(getFileName(docId).getBytes("GB2312"), "ISO_8859_1") +".docx"; Document document = null; String filePath = this.getClass().getResource("/").getPath()+"/"+getFileName(docId)+".docx"; XWPFDocument docx = null; try { if (!getLicense()) { return; } document =

Write large text file data into excel

北城以北 提交于 2020-01-13 09:26:31
问题 I am reading a text file separated with some delimiters. Example of my text file content Avc def efg jksjd 1 2 3 5 3 4 6 0 line by line and holding it in memory using hashmap having line numbers as key of integer type and each line of text file as List object Consider, my map would store information like this Integer List 1 [Avc def efg jksjd] I am using Apache POI to write into excel. When writing into excel using Apache POI, I am following this approach, here is my code snippet HSSFWorkbook

开年特献!使用Aspose.Words在.NET中以编程方式将Word格式转换为PDF完整指南

被刻印的时光 ゝ 提交于 2020-01-03 18:18:53
Word到PDF的转换是当今的一种常见做法,特别是当你需要共享文件时,转换成PDF是常做的工作之一。 MS Word提供了将Word文档保存为PDF的内置功能,但是,在某些情况下,可能希望通过编程方式将Word文档转换为PDF,例如在Web应用程序中,或者需要在不安装MS Office的情况下将Word批量转换为PDF。 接下来,我们将学习如何使用Aspose.Words在.NET或.NET Core框架中使用C#以编程方式将Word转换为PDF。如果你还没有用过Aspose.Words可以 点击这里下载最新版 测试。 在本文中,我们将使用Aspose.Words在C#中执行以下Word到PDF的转换: 简单的Word到PDF转换。 将所需的Word文档页面转换为PDF。 使用特定的PDF标准(例如PDF 1.7,PDF / A-1a等)将Word转换为PDF。 使用数字签名将Word转换为PDF。 将Word转换为具有所需JPEG图像质量的PDF。 (本文篇幅略长,建议收藏阅读哟~) ①简单的Word到C#的PDF转换 要将Word文档转换为PDF,必须调用Document.Save()方法并以“ .pdf”扩展名指定输出文件名。下面的代码示例显示了C#中从DOC到PDF的简单转换。 // Load the document from disk. Document doc =

Mysql遇到的问题总结

空扰寡人 提交于 2019-12-27 04:59:29
1、解决导出csv中文乱码问题: 将csv用txt打开,另存为,选择utf8编码即可。 解决导入问题: mysql安装目录下的my.ini,增加如下参数: [client] default-character-set=utf8 [mysqld] default-storage-engine=INNODB character-set-server=utf8 collation-server=utf8_general_ci 重启mysql服务。 2.执行脚本文件命令 psql -d nyc_data -U postgres \i D:/devices_small/devices.sql 3 MySQL This function has none of DETERMINISTIC 解决办法也有两种, 第一种是在创建子程序(存储过程、函数、触发器)时,声明为DETERMINISTIC或NO SQL与READS SQL DATA中的一个, 例如: CREATE DEFINER = CURRENT_USER PROCEDURE `NewProc`() DETERMINISTIC BEGIN #Routine body goes here... END;; 第二种是信任子程序的创建者,禁止创建、修改子程序时对SUPER权限的要求,设置log_bin_trust_routine

Convert PDF to Excel in Java [closed]

為{幸葍}努か 提交于 2019-12-25 18:48:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . How to convert PDF file to Excel using Java. We have generate PDF file using itext. Now we want to convert it to excel. we want sample code to convert pdf to excel. or kindly Suggest API. 回答1: You can convert a PDF document to an Excel workbook with Aspose.PDF API by using below code snippet. Please ensure using

Reading RTF File Containing an OLE Embedded Object

隐身守侯 提交于 2019-12-25 17:18:28
问题 Question : I need to read an RTF File that contains an OLE Object as innerdocument. RTF File = [ Ole object (word document) is embedded into it.] Sample RTF File that contains word as OLE Embedded into it. Reference I have done : OLE as Image in RTF Here they have done a program to extract the image embedded as OLE in RTF. I had extracted the program which is marked as correct answer , but its does not work for me. Using OpenXML SDK. (it cannot be able to open RTF Files.) some other SDK like

Reading RTF File Containing an OLE Embedded Object

依然范特西╮ 提交于 2019-12-25 17:18:22
问题 Question : I need to read an RTF File that contains an OLE Object as innerdocument. RTF File = [ Ole object (word document) is embedded into it.] Sample RTF File that contains word as OLE Embedded into it. Reference I have done : OLE as Image in RTF Here they have done a program to extract the image embedded as OLE in RTF. I had extracted the program which is marked as correct answer , but its does not work for me. Using OpenXML SDK. (it cannot be able to open RTF Files.) some other SDK like