creating an emailable or printable document using an Android app

374 views Asked by At

Can anyone recommend a good source (either a tutorial or book?) on how to generate a .doc file from an Android App? I am completely new to programming and don/t understand most of what I read as answers here, hence the need for a recommendation: I need to learn! What I'm after is to be able to produce a document based on a standard template, containing a choice of standard paragraphs with user insertions, which can then be emailed, all from a smart phone or tablet.

1

There are 1 answers

0
ktingle On

Unfortunately I think you have a research task on your hands. If your requirements allow you to create an Open Office XML document then its possible to insert the user's paragraphs 'by hand'.

An Open Office XML document is just a zip archive with XML files inside of it. Unzip the template document using java.util.zip and locate the word/document.xml file inside. Insert the user's text using the DOM and persist the file.

Another approach would be to try to get docx4j integrated into your Android project. My guess is that this project reference many libraries that are not included with the Android SDK.

Good luck and hope this helps.