Skip to content

Commit

Permalink
new file
Browse files Browse the repository at this point in the history
  • Loading branch information
plutext committed May 17, 2012
1 parent ed706a9 commit a78bfb5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
#Thu May 17 16:53:00 EST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
23 changes: 23 additions & 0 deletions README.txt
@@ -0,0 +1,23 @@
Convert sample.docx to HTML on Android, using docx4j.

When you run it, the app should come up with 2 tabs, one displaying the web page, the other the HTML source.

The docx which is converted is the one in res/raw directory.

If you look at AndroidDocxToHtmlActivity.java you'll see that you can choose to have HTML images saved as files on the device, or based64 encoded as a data URI. The latter makes the HTML source harder to read, but avoids issues writing to the device (cleanup etc), see http://dataurl.net/#about

To run this Eclipse project, you'll probably need to increase your heap space in eclipse.ini (symptom is 'you get Unable to execute dex: Java heap space').

I used:
-Xms256m
-Xmx4096m

In Eclipse, Windows > Preferences > General > Show Heap Status gives you an entry on the bottom row which is useful.

Because Android does not support JAXB out of the box, this project contains jars which came from:

- https://github.com/plutext/jaxb-2_2_5_1/tree/android2
- https://github.com/plutext/ae-xmlgraphics-commons
- https://github.com/plutext/ae-awt

Note: The set of jars here is the minimal set required for HTML output. Certain other docx4j features will require additional jars, which are not present in this project.

0 comments on commit a78bfb5

Please sign in to comment.