Skip to content

wvWare (wvHtml) library port for Android - library to load and parse Word 2000, 97, 95 and 6 files

License

Notifications You must be signed in to change notification settings

opendocument-app/wvWare-Android

Repository files navigation

wvWare (wvHtml) library port for Android

build Maven Central

Used by:

Scope:

Limited to wvHtml.

C++ runtime dependency:

Using mismatched prebuilt libraries is less problematic if all the libraries used in the application are:

  • Built with the same major version of toolchain - ndk-26
  • Linked against shared C++ STL - android.defaultConfig.externalNativeBuild.cmake.arguments "-DANDROID_STL=c++_shared" in app's (and all JNI dependencies) build.gradle.

How to install:

wvWare-Android is distributed through MavenCentral. Add a dependency in build.gradle:

dependencies {
    implementation 'app.opendocument:wvware-android:1.2.11'
}

Usage:

Library is interfaced through Java.

import com.viliussutkus89.android.wvware.wvWare;
...
java.io.File input = new java.io.File(getFilesDir(), "my.doc");
java.io.File outputHTML = new wvWare(getApplicationContext()).setInputDOC(input).convert();

Encrypted documents need a password to be decrypted.

java.io.File outputHTML = new wvWare(getApplicationContext()).setInputDOC(input).setPassword("password").convert();

Library needs Android Context to obtain path to cache directory and asset files, which are supplied in .aar.