Click here to Skip to main content
14,735,239 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Comments
   
Yes, I have an idea: you have to read documentation. You are not asking about anything certain. Read the documentation, perhaps then you will get some real questions. Besides, Open XML is just the standard. Perhaps you mean Microsoft Open XML SDK? Isn't it obvious what can be achieved with it? Anyway, if you explained what you are trying to achieve and what have you tried so far, and what are your problems, we would have something to answer about.
—SA
[no name] 8-Dec-15 1:53am
   
i am going through the openxml documentation to understand the benefits of it..
Snesh Prajapati 8-Dec-15 1:44am
   
+1 @Sergey
   
I added some very general answer. I don't know how relevant it will be, as the inquirer did not explain anything, did not even specify platform and language. Well, just in case...
—SA
[no name] 8-Dec-15 5:45am
   
Is there any way we can convert docx to pdf using openxml
Snesh Prajapati 8-Dec-15 2:24am
   
Thanks. I hope that will be helpful for inquirer.
Philippe Mori 8-Dec-15 12:28pm
   
Mainly OpenXML allows to read and write Office files. It is relatively low level but you can create complex files with graphics and more. As for file conversion, I don't know. After all, the purpose of that component is to work with Office files.

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.
   
v2
Comments
   
Sure, a 5.
—SA
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
   
Comments
[no name] 8-Dec-15 5:45am
   
is there any way we can convert docx to pdf using openxml.?
   
This is another question. Please see Solution 2.
—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
   
Comments
Mario Z 9-Dec-15 1:10am
   
That library is not an open source, actually it's just a marketing trick.
Among other the library has some heavy limitations on the document's size.
You can think of it as a demo library for their "real" (commercial) library.
   
Which of the libraries do you mean?
—SA
Mario Z 9-Dec-15 1:54am
   
Only the one you emphasised ("In particular, you can try this one: https://pdfapi.codeplex.com.").
   
I don't remember why I "emphasized" it (probably just because I copied it from a different past answer), but I must admit I did not try it. There are others, such as very popular iTextSharp. Would you recommend me to remove pdfapi.codeplex.com reference?
—SA
Mario Z 9-Dec-15 2:29am
   
No need, you also provided a link which lists iTextSharp and SharpPDF so I believe anyone will be able to find a usable library.
   
Sure, but what you say about pdfAPI is too sad; it's better not to recommend it.
Thank you very much for your help.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900