How to create a Word-like document (.docx) in an app? - iphone

I would like to create a .docx file within an iPad application. The file would be created within the app (the user would create/edit it like in Word--preferably with the same "feel" of Word) and then it would be saved as a .docx file.
So, is it possible to do this? If so, how? What other alternative file formats are there?
Thanks,
John

You can easily generate RTF corresponding to most typical features of a word processor. It will not cover the vastness of available DOCX features, but I'm not certain a complete port of Microsoft Word to the iPhone would be practical, so most of these features would be unavailable anyway.
RTF is fully (read-write) supported by Microsoft Office and several other editors.

Related

Create a desktop app that generate ms word file

I'm now working with tons of MS Word files and trying to find a way in improving my workflow.
I'm wondering if there's a way to create a desktop app which can preview certain parts from a Word file, select them and generate a new one with controls in Word's text style, paragraph, etc.
I supposed that this would take MS Word API and some frame structure particularly. I've been using Electron/node.js to create some cross platform applications, wondering if it can do as well? Or is there any reference that I can dig in?
Sorry if this sounds like a rookie one. I've tried to search but still can't find out where to start.
There are three possible ways to get the job done:
Automate MS Word to get job done. See Automate MS Office Applications using Python win32com module for more information. For example:
import win32com.client
word = win32com.client.Dispatch("Word.Application")
Use the Open XML SDK for generating Word documents at runtime, see Welcome to the Open XML SDK 2.5 for Office for more information.
Use third-party components.
If you are on Windows, there seem to be some way to access Word files in Python: https://www.blog.pythonlibrary.org/2010/07/16/python-and-microsoft-office-using-pywin32/. Maybe in node too.

Programmatically convert Doc(x) files to PDF using Microsoft Word

We are developing a Java application that needs to programmatically convert .rtf, .doc and .docx files to PDF files.
Formatting is important to us, so we need the page numbers to be the same between a source file and a target PDF file, and the contents of each page being the same as the original file.
We have tried out open source solutions, such as JODConverter to invoke a LibreOffice of OpenOffice installation, Docx4j and XDocReport. The best formatting was achieved with LibreOffice. However, even in that case, the pages were different (for example, a 87-page .rtf file results in an 80-page PDF file).
So, we think that the ideal way to make the conversion would be to somehow invoke Microsoft Word though our Java application, and make the conversion with it. That would produce PDF files that have the same formatting as the original files.
Is this possible in any of the following ways:
An API that is directly invokeable through Java?
An API that is invokeable through a .Net language and we would use that with something like JACOB?
A 3rd party library that uses a Microsoft Word installation under the hood (something like JODConverter for Word)?
A CLI interface supported by Word (relevant question)?
Something else?

Which is best approach (JODConverter+open Office or Apache POI HWPF+iText) to convert Microsoft word to PDF in java?

In my application I have to send automatic emails to the customer when customer status changes.I need to attach a document to that email which should be in the pdf format. I have to create this attached PDF document from a existing word document.Being Apache Open Office is installer and have to be started as a service every time when I want to convert a document I am dilemma to choose between JODConverter+open Office and Apache POI HWPF + iText.Please suggest me which to use .
Disclosure: I lead the docx4j project
JODConverter + OpenOffice will probably give you the best support for the widest range of features in a binary .doc file. HWPF only supports a restricted subset of .doc content.
If your documents are standard fare paragraphs, tables, images, headers/footers docx files, docx4j ought to meet your needs (it includes PDF output via Apache FOP).

[iPhone]Have a way (or library) to create .doc files in iPhone app?

Have a way (or a library) to create .doc files in iPhone app ?
Short of writing your own library, you have two choices:
Use RTF, which will produce a Word-readable document that covers basic word processing features.
Send the data to a server, have the server do the conversion, then return the Word document to the application.

What's the easiest way to generate DOC files?

Right now I'm generating HTML with a Perlscript, and then manually converting to DOC in OpenOffice. Actually I have to copy, create new "Text document", paste, save, as it treats HTML and DOC as separate file types, but that's quite unessential. That's very inconvenient.
Is there any automated way I can convert HTML to decent DOC, or some other nice format like HTML I can generate textually and convert to DOC in automated way?
(I'm on OSX)
I can't help you get to .doc, but have you seen the Open XML Format SDK from Microsoft? This will allow you to generate Office 2007 format documents (.docx, .xlsx etc) from .NET code.
Theoretically you may have some luck with this under Mono on OS X, as it doesn't require an installation of Office 2007 (for Windows) to function.
Not sure if this is what you want, but you can fairly easily generate WordML documents with code. WordML is the Word 2003 XML file format. It's NOT the same thing at the Office 2007 Open XML formats. WordML is just one file that's not too hard to create if your just doing fairly basic formatting. You could generate it directly rather than creating the HTML first. You can name the files with a .DOC extension and Word 2003 and later will open them just fine. You can resave them as real .DOC file if you want.
Here's the on-line WordML reference. I can send you some sample code if you'd like.
http://msdn.microsoft.com/en-us/library/aa212812(office.11).aspx
If you really want to create a general file format that could be converted into other formats, creating XML-FO file might be the way to go. There are a number of products out there that can take XML-FO and transform it into other files, such as Word and PDF.
We do use the components of Aspose that are available for .NET and Java. With Java you should be able to use them on OS X, too.
You have to purchase the components (i.e. they are not free), but aside from this, they are really great.