docx

Trying to open a docx file from a bytestream - file corruption error

we consistently get a file corrupted error message when opening a docx file from a saved bytestream, evry other file type works just ok Below is code from a sample form that replciate the issue Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Objective is to be able to...

Read Microsoft Word Documents into Plain Text (DOC, DOCX) in Java

I'm looking for something in Java to read in Word documents to process their text.. all I need is there text, nothing fancy. I know about Apache POI, however it doesn't include support for DOCX right now, anything out there? ...

PHP - Opening uploaded DOCX files with the correct MIME TYPE

I have users uploading DOCX files which I make available for download. The issues we have been experiencing is the unknown mime types of DOCX files which causes IE to open these docs as Zip files. It is running on a Windows/IIS server. Because this is a shared host, I cannot change any server settings. I was thinking that I could just...

Convert a docx document to pdf, as a service.

I'm looking for a way to convert docx documents to pdf, on a system which doesn't has office installed. In the end, this is supposed to run as a service. ...

Using MemoryStream to save .docx file C#

I've some trouble to upload file from Memory Stream to database (it's visible in DB as 0x so i guess it doesn't get saved properly). I am not sure whether it's a problem with Stream being created or save to db from stream should be done differently. private void test { byte[] storage = new byte[500000]; using (MemoryStre...

Mail merge from Java

Hi all, Does anyone have any experience with doing mail merge from Java on a word document? I need to support both doc and docx formats. I have heard of Apache POI and docx4j. However, from reading around I'm sure how good the word support is in POI. docx4j only supports docx format as far as I can see. Can any suggest either one o...

Writing a docx file to a BLOB using Java 1.4 inside Oracle 10g

I'm trying to generate a blank docx file using Java, add some text, then write it to a BLOB that I can return to our document processing engine (a custom mess of PL/SQL and Java). I have to use the 1.4 JVM inside Oracle 10g, so no Java 1.5 stuff. I don't have a problem writing the docx to a file on my local machine, but when I try to w...

Why are .docx files being corrupted when downloading from an ASP.NET page?

I have this following code for bringing page attachments to the user: private void GetFile(string package, string filename) { var stream = new MemoryStream(); try { using (ZipFile zip = ZipFile.Read(package)) { zip[filename].Extract(stream); } } catch (System.Exception ex) { ...

Is there any java library (maybe poi?) which allows to merge docx files?

I need to write a java application which can merge docx files. Any suggestions? ...

Problem uploading .docx through html form

I've made a simple form, with the proper enctype for uploading files. When i try to upload a .docx everything works fine in IE 8 and Safari, but in Firefox or IE 7 or 6 i can't even click submit, nothing happens! Could this still be a server issue? It's an apache server. Everything works fine if i choose to upload a .doc file <form enc...

How can I create a simple docx file with Apache POI?

I'm searching for a simple example code or a complete tutorial how to create a docx file with Apache POI and its underlying openxml4j. I tried the following code (with a lot of help from the Content Assist, thanks Eclipse!) but the code does not work correctly. String tmpPathname = aFilename + ".docx"; File tmpFile = new File(tmpPathna...

Hi, I want to create new DOCX file by reading DOCX template (it's content is already replaced)

Up to now code is read the template and replace with new values and finally replace the docx file with new values. Can any one please tell me how to save the replaced docx file in diffrent name?. My code is bellow. using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(document, true)) { string docTe...

In ASP.NET, how do I detect a password in a Word 2003 or 2007 file?

My users like to upload password-protected Word documents into our custom document management system. I'd like to add a validation to check for the password and refuse the upload if it has a password. Automating Word - with COM interop - is out of the question because this is a server side application. ...

How can I use predefined formats in DOCX with POI?

I'm creating a docx generator with POI and would like to use predefined formats. Word includes several formats like Title, Heading 1..10 etc. These formats are predefined in every DOCX you create with Word. I would like to use them in my docx generator. I tried the following but the format was not applied: paragraph = document.createP...

Does docx merging in TortoiseSVN work?

I'm trying to use some scripts that came from TortoiseSVN to do some docx merges, but the script doesn't seem to be working right. Has anybody used this feature in TortoiseSVN? How does it normally work? ...

Parsing an Open XML doc via styled blocks

I'm working with docx docs, and I need to parse a document into sections on the basis of headings styled with the "heading 1" style. So if I had a doc like this (markup is pseudocode): <doc> <title style>Doc Title</title style> <heading1>First Section</heading1> ... <heading2>Second Section</heading2> ... <heading3>Third Section</headin...

Can't open docx files online on Win2003 server - get 403

I have a asp.net web application that runs locally and opens docx files in IE8. However, after deploying to our production server (Win2003), I get a 403 error. The same code works for doc files, just not docx files. So, I've narrowed the problem down to the server but do not have good direction. I read that it might be a MIME type issu...

Word 2010 for writing invoices, starting with XML

Hello, we are doing quite some invoice generation, and so far it is based on some pretty awful word automation that is now in for a review with Word 2010. I would love to move to a XML based format for storing / presenting invoices, only going to a word document in the last stage. This means I can use easily othermeans to present an in...

Getting document.xml from a docx file using ZipInputStream

Hello, I have a inputStream of a docx file and I need to get hold of the document.xml which lies inside the docx. I am using ZipInputStream to read my stream and my code is something like ZipInputStream docXFile = new ZipInputStream(fileName); ZipEntry zipEntry; while ((zipEntry = docXFile.getNextEntry()) != null) { ...

.NET Efficient way to generate WORD Doc - Server Side

Hello, .NET 4.0 I am looking for the easiest way to generate a Word document on our server. Limitations : Server side I don't want to install word on the server Data source is XML I tried to generate a DOCX with XSLT which is fast and easy but the only way I could find to validate the generated document is to open it with Word and...