我们可以通过Openxml实现的目标 [英] What we can achieve with Openxml

查看:74
本文介绍了我们可以通过Openxml实现的目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我是Openxml的新手,我的项目需要学习OpenXML,因为我们将在项目中广泛使用。但我是全新的Open XML。



任何人都可以对OpenXML有所了解在.net应用程序中使用OpenXML可以实现的一切。



先谢谢。

解决方案

首先关于OpenXML SDK,你可以用它来操作(创建,读取,写入,修改)使用OXML(Office Open XML)文件,即DOCX,XLSX和PPTX。



请注意,OpenXML SDK只允许您处理OOXML文件,没有别的它使用与OOXML规范紧密结合的API来实现这一点。因此,为了正确使用它,您需要熟悉OOXML规范。



现在关于转换为PDF,如上所述,OpenXML SDK无法操作以任何方式使用PDF文件,因此您需要将其与另一个能够使用PDF操作的库一起使用(如iTextSharp,PDFsharp等)。

但请注意,这实际上并非如此一个简单而简单的任务,简化事情的主要挑战是将流程布局中的文档(流文档类型文件,如DOCX,HTML,RTF等)转换为固定布局(固定文档类型文件,如PDF,XPS等)这将需要分页并计算流程布局,然后渲染它作为固定布局。


syedkhaleel写道:



我正在浏览openxml文档以了解它的好处......

好主意。


参见:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2 [ ^ ],

http://support.microsoft.com/kb/257757/en-us [ ^ ]。



这是使用Office互操作之间最明显的区别;我个人不会推荐。另请参阅此CodeProject文章: http://www.codeproject.com/文章/ 371203 / Creating-basic-Excel-workbook-with-Open-XML [ ^ ]。



仍然,你没有解释你想要什么实现,但是,为了以防万一,你可以快速查看我过去的答案;对不起,我不知道它们与你的目的有多相关,我不知道:在C#.net中,如何从目录中打开.docx文件并在浏览器中显示? [ ^ ]。



-SA


syedkhaleel问:



我正在浏览openxml文档以了解它的好处......

这是一组引用PDF库的你可以使用: http://csharp-source.net/open-source/pdf-libraries



特别是,您可以试试这个: https://pdfapi.codeplex.com



-SA

Hi All,

I am new to Openxml and my project demands to learn OpenXML as we are going to use extensively in the project.but i am completely new to OpenXML.

Can anybody give an idea about OpenXML what are all the things can be achieved using OpenXML in .net application.

Thanks in Advance.

解决方案

First regarding the OpenXML SDK, what you can do with it is manipulate (create, read, write, modify, etc.) with OOXML (Office Open XML) files which are DOCX, XLSX and PPTX.

Note that OpenXML SDK enables you to process only OOXML files, nothing else, and it does this with an API which is tightly coupled with the OOXML specification. So in order to properly work with it you'll need to familiarize yourself with the OOXML specification.

Now regarding the conversion to PDF, as mentioned above OpenXML SDK cannot manipulate with PDF files in any way thus you'll need to use it together with another library that is able to manipulate with PDF (like iTextSharp, PDFsharp, etc.).
However note that this is really not a simple nor straightforward task, to simplify things the main challenge is to convert a document which is in a flow layout (the flow document type file like DOCX, HTML, RTF, etc.) into a fixed layout (the fixed document type file like PDF, XPS, etc.) and this will require paginating and calculating the flow layout and then rendering it as a fixed layout.


syedkhaleel wrote:


I am going through the openxml documentation to understand the benefits of it…

Good idea.

See also:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[^],
http://support.microsoft.com/kb/257757/en-us[^].

This is the most distinct difference between using Office interop; which I personally would not recommend. See also this CodeProject article: http://www.codeproject.com/Articles/371203/Creating-basic-Excel-workbook-with-Open-XML[^].

Still, you did not explain what you want to achieve, but, just in case, you can quickly view my past answers; sorry, I have no idea how relevant they are to your purpose, unknown to me: In C#.net, how do I open .docx files from a directory and display it in the browser?[^].

—SA


syedkhaleel asked:


I am going through the openxml documentation to understand the benefits of it…

This is a set of referenced to PDF libraries you can use: http://csharp-source.net/open-source/pdf-libraries.

In particular, you can try this one: https://pdfapi.codeplex.com.

—SA


这篇关于我们可以通过Openxml实现的目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆