Open XML SDK 2.0 inserting PDF to Word - c#

has anyone tried to insert pdf document into word using open xml sdk 2.0 ?
Thank You!

With the SDK there is a tool called DocumentReflector (in folder C:\Program Files\Open XML Format SDK\V2.0\tools). This tool opens an existing OpenXML document and generates the code that will produce this document.
Now you can create a simple document in Word with an embedded PDF and open this document using DocumentReflector. The code generated can then be a base for your document creation process.

Related

Update word to newest format with open xml

I have an application that download docx file from a service.
The problem is that the service creates the docx with the an old format (I think it used the open xml version 2.0).
I don't own the service so I can't change the creation process of the word , but I thought about building a convertor , that will open the downloaded files and recreate them in the newest format using the open xml sdk version 2.5.
I was optimistic when I thought this code will work ( A simple open and save) :
WordprocessingDocument wordprocessingDocument =
WordprocessingDocument.Open(filePath, true);
wordprocessingDocument.MainDocumentPart.Document.Save();
I'm not fimiliar with the open xml sdk , so any help will be appreciated.
You're just opening the doc and saving it with no changes. You need to change the Word version, then save it. This article should provide the info you need: http://blogs.msmvps.com/wordmeister/2013/01/18/openxmlsdk-word-compatibility-mode/

Emending PDF files into OpenXML WordprocessingML

I am strugling with Open XML SDK and embedding pdf files into a docx file.
I do not want to use automation
I am able to create *.bin files from everything except from *.pdf (see this question)
Anyone has experience with this? From what I've gathered you must create a *.bin file in order to embedd any file into Word *.docx document (except images). Is that correct?
If you can't find a pure C# solution, you could consider the commercial product docx4j OLE Helper IKVM'd.
Disclosure: I wrote it.
The reason for pdf not working was in fact in acrobat reader.
When Ive installed older version (or did not have AR installed at all), it started to work.

how to create a pivot table in Excel using Open XML SDK(XLSX)

From my .net web application, I need to generate a pivot table in excel file using Open XML SDK. I tried to use Microsoft.Office.Interop.Excel, but it was giving me error while I run it on IIS. Please help me to do this using Open XML SDK.
there is some info from MS on Pivot with OpenXML:
http://msdn.microsoft.com/en-us/library/gg278324.aspx

How to Edit PDF programatically with Open Office PDF Import Extension

I want to edit the PDF text layer programatically through the Open Office PDF Import Extension.
I know it is possible to edit the PDF file through OPEN OFFICE PDF file extension from the Open Office UI.
Is there any API available for .Net of PDF Import Extension to do it programmatically?
Is there a particular reason for using OpenOffice.org for this? You can manipulate pdf files in the way you want using iTextSharp

Opening Dot File with OpenXML

I need to work on opening a DOT (word document template) file, replace the fillers and save it as Document file.
On opening DOT file I am getting "Document File is Corrupted".
Is it possible to work with DOT file using OpenXML.
UPDATE: I am saving DOT file as XML (manually using "Save as.."). Renaming file back to dot, so it is XML file built on WordML. Still trying to open it through OpenXML giving me the same error.
OpenXML is used in the new formats of Office 2007 (.dotx and .docx).
WordML is a bit older and cannot be used with the OpenXML libraries.
You can load a WordML file as an XmlDocument or load it into a string if you know exactly what data you want to replace.

Categories