Aspose

OpenXML SDK 2.0 vs Aspose for server side word 2007 document generation in .NET

 ̄綄美尐妖づ 提交于 2019-12-12 10:35:28
问题 I am going to start a Server side Office automation project in .Net. Below are the key activities that are planned: Create a word document Use a existing word document template having cover page, header, footer, TOC Save file Embed files and resize : HTML, Image, Word, Excel TOC generation and formatting Doc formatting: Page break, Section break, Orientation, Orientation at section break, Continuous page numbering Replace embedded "variables" with use defined contents. I am more inclined

Html file to Aspose slide conversion

橙三吉。 提交于 2019-12-12 06:39:37
问题 I am converting html file to aspose slides ini c#, if i use table the table is being extracted, but along with that, thehere is duplication of data..And when i am using other tags like the data is being extracted, ut the css stylings are not retained 回答1: I have observed your requirements and regret to share that at present the support for importing HTML table inside Aspose.Slides for .NET is unavailable. We have already logged an issue as new feature request with ID SLIDESNET-37059 in our

使用Aspose.words对word文本域Field处理

↘锁芯ラ 提交于 2019-12-12 04:06:45
处理word作用域,将域指定替换为对应值,然后移除掉域。使用域而不使用标签是因为域可以方便用户使用和维护。相对可视化。 上代码: Document doc = new Document("Test2.docx"); DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc); foreach (Field field in doc.Range.Fields) { var k = field.GetFieldCode(); if (field.GetFieldCode().Contains("文字")) { builder.MoveToField(field, true); builder.Write("你好!"); field.Remove(); } if (field.GetFieldCode().Contains("表格")) { builder.MoveToField(field, true); builder.StartTable(); builder.InsertCell(); builder.CellFormat.Borders.LineStyle = LineStyle.Single; builder.CellFormat.Borders.Color = Color.Black; builder

Read Last line from First column using Aspose.Words v13.1.0

允我心安 提交于 2019-12-12 01:46:09
问题 I have a word document with two column layout. How to read last line from first column and read first line from second column in a word document.If first column last line text is in specific format, then move one line down which would automaticaly moves the text to next column(second). Please let me know how to achieve this in .net using Aspose.Words V13.1.0 回答1: First you need to download offline samples pack from this link to use the following code example. Then extract the archive and from

How create three TOC with diffrent styles in docx by java?

不打扰是莪最后的温柔 提交于 2019-12-11 15:14:50
问题 How can I create three or more TOC in docx file that one of them is for Headings level 1, 2, 3 and others are for another styles which are created by program? For example, I create a style for table title and I want to create a TOC for paragraphs with this style. And I want these TOCs to be in special paragraphs not at the end of the file. Which one is better to do this, Apache-poi? docx4j ? Aspose? I write my other code with apache-poi. 回答1: Using Aspose.Words for Java, you can use

你知道将DOC格式序列化为字节数组最简单方法吗?来看看Aspose.Words API如何处理

情到浓时终转凉″ 提交于 2019-12-11 11:40:41
Aspose.Words for .Net 是一种高级Word文档处理API,用于执行各种文档管理和操作任务。API支持生成,修改,转换,呈现和打印文档,而无需在跨平台应用程序中直接使用Microsoft Word。 Aspose.Words API提供了将Microsoft Word文档从DOC或DOCX格式序列化为字节数组的最简单方法。将文档存储到数据库中和/或从数据库中检索时,将Word文档转换为字节数组很有帮助。 另外! .NET版Aspose Words转换升级,支持将PDF转换为PDF 1.7标准! 近日,Aspose Words For .NET更新到了v19.12版,在Windows10上使用SystemFontSource时,支持用户安装的字体,OLE对象数据公开给公共API等等9大新功能。(下载地址可在评论区查看) .NET的Aspose.Words可用于转换Document对象,以获取表示任何.NET应用程序中Document的字节数组。以下代码段演示了DOC文件到字节数组的转换。 // Load the document from disk.Document doc = new Document("Sample.doc");// Create a new memory stream.MemoryStream outStream = new

Aspose.Word MailMerge set font in paragraph

Deadly 提交于 2019-12-11 10:19:16
问题 In FieldMergingCallback.FieldMerging and I set font to all Runs in Node => public void FieldMerging(FieldMergingArgs args) { if (args.FieldValue.ToString().Length > 100) { var node = args.Field.Start.ParentNode.ParentNode; if (node is Shape) { var runlist = node.GetChildNodes(NodeType.Run, true); foreach (Run run in runlist) { run.Font.Size = 6; } } } } But in result pdf is: Why is the font smaller than the third word? 回答1: Before performing mail merge, you can use the following code to apply

Questions on localization/globalization of Ctype & .ToString

与世无争的帅哥 提交于 2019-12-11 10:10:01
问题 A few questions I need answered to help debug an issue I'm having with globalization/localization that's leaving me rather stumped. 1) How exactly does CType work if I convert a string into a double when it comes to globalization/localization? From my research, and asking other developers in the office, I think CType should use whatever culture settings you have on your computer. So for example CType("1.23", Double) would work fine for a US culture computer. But it would mess up by converting

Aspose cell exception:om.ctc.wstx.sr.ValidatingStreamReader cannot be cast to com.ctc.wstx.sr.ValidatingStreamReader

早过忘川 提交于 2019-12-11 02:14:30
问题 I am using Aspose.Cells (trial version) to parse a .xls (Excel) file for Java. But when I try to load the file, it throws the exception given below: SEVERE: java.lang.IllegalStateException: XML Stream Exception: XMLStreamException: com.ctc.wstx.sr.ValidatingStreamReader cannot be cast to com.ctc.wstx.sr.ValidatingStreamReader Here is my code Workbook workbook = new Workbook(); try { workbook.open(path+fileName); } catch (Exception e) { e.printStackTrace(); } Worksheet worksheet = workbook

com.aspose 生成pdf在linux生成PDF乱码解决(window环境正常)

為{幸葍}努か 提交于 2019-12-10 14:51:39
linux 环境下日志查看在GBK环境下,中文正常显示,web应用通过浏览器看到的jsp均不乱码,只有aspose生成的pdf,查看时中文全部显示不出来,其解决方案如下: 1. 通过增加jdk的字体库信息解决 cd $JAVA_HOME/jre/lib/fonts mkdir fallback,cd fallback, cp msyh.ttf ./ #此处的msyh.ttf是字体文件,可以从Windows平台拷贝过来(c:/Windows/Fonts/msyh.ttf),也可以用其他字体文件,只要支持中文即可。 mkfontdir #生成字体查询文件 mkfontscale #生成scale文件 #重启weblogic后依然乱码(之前解决sqldeveloper时生效,但现在不生效) 2.通过操作系统层面解决 cd /usr/share/fonts/ #进入字体库文件夹 mkdir fonttmp #创建自己使用的字体库文件夹 cd fonttmp #进行字体库 cp *.ttc,cp *.ttf #copy windows下的字体文件 (ttc和ttf)或支持中文的字体文件(ttc和ttf)到此文件夹下 mkfontdir #生成字体查询文件 mkfontscale #生成scale文件 fc-cache #扫描字体目录并生成字体信息的缓存 #重启welogic后问题解决