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

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.

Related

Can I convert .docx Word documents using the DocX .NET Library?

I am currently attempting to convert a couple of .NET desktop applications that I have developed into a web application harnessing AngularJS and RESTful services.
One of the key components of these applications is in their ability to generate Word documents on the fly using a .dotx Word template. I am currently exploring the possibility of using a third party library called DocX to generate these Word documents without resorting to using a template.
I guess my question is: Can I use this library to read an existing Word document in .docx format and generate a source code representation of the document? If this is possible could someone point me in the direction of any code samples that I could use? I have looked around and have been unable to find anything that could help me get started.
Generating code representation of the document and using it with DocX seems like a time consuming effort to me. Why not using a template instead and fill it with data at runtime?
I have some experience with Docentric, which is 3rd party OpenXML toolkit. It features an Word Add-in for template design and libraries for document generation and manipulation. It took me less then a week to generate pretty complex documents. If I was in your shoes I would definitely try some 3rd party toolkits. They cost money, but save time so do some math and see it they can be useful for you.
It is possible to read an existing Word document in .docx format with following code
DocX document = DocX.Load(filename)
While it is impossible to generate a source code representation of a document.

Extract data from many PDF forms

I regularly receive large numbers of the same PDF form. I want to extract the data from them into a text file. I'd like to do this via a script of some sort. I'm working in a UNIX environment.
Is this possible? I've googled my brains out and can't find anything.
Text in PDF is represented by text elements in page content streams. The streams are commonly compressed. If you have the time and resources you can use ISO 32000-1:2008 or Adobe PDF 1.7 specification to build your own PDF parser. Or it may be more practical to use a 3rd party app as an intermediate translation step.
There are utilities that will decode the stream and give you clear text. One option is PDFtk Server which will work in your environment. Another option is to use the Poppler PDF Rendering Library which has a command line utility "pdftotext" useful for searching for strings in PDFs.

Creating readable XML for iOS

My client uses a process that uses XMLSS to create XML documents that can be opened in Microsoft Excel. In fact, simply renaming the files to .XLS, will ensure that the documents open in Excel by default. These documents are emailed to our clients. The documents open successfully in for Excel for PC and MAC, as well as OpenOffice (both platforms). It's a pretty nice solution.
The problem is, some of our clients have started attempting to open these documents (for viewing) on their iPhones and iPads (iOS devices), and it doesn't work. We know that iOS devices can open actual Office files, but since our documents are really just XML (and not true Excel files), the viewer on iOS doesn't want to view them. At least that's my guess.
We have played with sending these files with both XML and XLS extensions.
I'm aware of the option of using different techniques for building these documents such that they become true XLS files... but obviously, we're not eager to rewrite the entire application when most of our functionality remains just fine.
Any tips, ideas, suggestions?

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

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.

How can I output tables to a PDF file with the iPhone SDK?

I want to output a PDF using UIKit's PDF creation methods. I see plenty of information on the web about creating a graphic context in a PDF, but I want to create smart text tables whose cells the user can later copy and paste into other applications (Word, Excel, etc.). How do I do this?
Unfortunately, that's not trivial. I recommend you the libharu PDF library for iPhone as a good point to start from.