B4A Library docx4j Wrapper

Hello all ,

This is a basic wrapper for docx4j library .

you need to download these jars and copy them to your libraries folder
https://www.dropbox.com/s/3amebrcgxy7vwdl/libs.zip?dl=0

Note : You need to call createpackage before adding text and images .

Now it just support the following methods:
I will try to add more if I get some time .

SMMRTF
Author:
SMM
Version: 1.01
  • SMMRTF
    Events:
    • ready (result As Boolean)
    • success (result As Boolean)
    Methods:
    • Initialize (EventName As String)
    • create_package
      Creates documemt package , this process takes some time so please wait for _ready event .
    • addImage (image_dir As String, image_file As String)
      Adds an image to document .
    • addParagraphOfText (text As String)
      Adds a simple text paragraph to document .
    • save_file (DIR_NAME As String, FILE_NAME As String)
      Save your file to specified directory and filename.
V1.02 fixes log4j-1.2.17 issue
 

Attachments

  • SMMRTF1.01.zip
    28.3 KB · Views: 180
  • SMMRTF1.02.zip
    28.3 KB · Views: 191
Last edited:

PoleStar

Member
Licensed User
Longtime User
Thanks a lot
Explain more about the library's work?
~~~~~~~~~~~~~~~
I get this error when compiling project:
Cannot find: C:\Basic4android\libraries\log4j-1.2.17.jar

You attached log4j-1.2.15
I think you forget to attach log4j-1.2.17.jar
 

peacemaker

Expert
Licensed User
Longtime User
1) it requires "log4j-1.2.17.jar", not log4j-1.2.15.jar. I downloaded it here http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.17/log4j-1.2.17.zip
2) After long compilation the error is:
B4X:
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded

And with MaxRamForDex=1536 - the error is:
B4X:
trouble writing output: Too many method references: 67887; max is 65536.
You may try using --multi-dex option.
....

For multidex there is no solution in B4A yet, as i could understand.

This project is tooooo huge also :((((
 
Last edited:

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Thanks a lot
Explain more about the library's work?
~~~~~~~~~~~~~~~
I get this error when compiling project:
Cannot find: C:\Basic4android\libraries\log4j-1.2.17.jar

You attached log4j-1.2.15
I think you forget to attach log4j-1.2.17.jar

1) it requires "log4j-1.2.17.jar", not log4j-1.2.15.jar. I downloaded it here http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.17/log4j-1.2.17.zip
2) After long compilation the error is:
B4X:
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded

And with MaxRamForDex=1536 - the error is:
B4X:
trouble writing output: Too many method references: 67887; max is 65536.
You may try using --multi-dex option.
....

For multidex there is no solution in B4A yet, as i could understand.

This project is tooooo huge also :((((

Really sorry
Now it is fixed in version 1.02 .
 

peacemaker

Expert
Licensed User
Longtime User
Me too, but ... seems, your project is just test empty ?
Can you upload your test project ?
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Me too, but ... seems, your project is just test empty ?
Can you upload your test project ?

A global declaration
B4X:
Dim rt as SMMRTF
Then
B4X:
rt.Initialize("rt")
rt.create_package

B4X:
Sub rt_ready(success as boolean)
rt.addParagraphOfText("some simple text")
rt.save_file(File.DirRootExternal, "myfile.doc")

End sub
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
End sub[/CODE]

rt.create_package was not used in your code. But if add - does not work in Bluestacks emulator, no any event fired.
B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
Dim rt As SMMRTF
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
rt.Initialize("rt")
End Sub

Sub Activity_Resume
rt.create_package
End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub rt_ready(success As Boolean)
rt.addParagraphOfText("текст")
rt.save_file(File.DirRootExternal, "myfile.doc")

End Sub

Sub rt_success (result As Boolean)
    Log(result)
End Sub

But compiled OK in a minute.
And "_success" event is not described :(, when should be fired...
 
Last edited:

somed3v3loper

Well-Known Member
Licensed User
Longtime User
rt.create_package was not used in your code. But if add - does not work.
B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
Dim rt As SMMRTF
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
rt.Initialize("rt")
End Sub

Sub Activity_Resume
rt.create_package
End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub rt_ready(success As Boolean)
rt.addParagraphOfText("текст")
rt.save_file(File.DirRootExternal, "myfile.doc")

End Sub

Sub rt_success (result As Boolean)
    Log(result)
End Sub

But compiled OK in a minute.
And "_success" event is not described :(, when should be fired...

I edited the code and added createpackage.

Try adding createpackage inside activity_create event
 

peacemaker

Expert
Licensed User
Longtime User
Whooooo.
0) Compiling: about 40 seconds
1) Debug mode: does not work, no any event fired\debugged.
2) Release_Obfuscated mode: 4 MB APK-file, works: 10 seconds for .doc file creation, 2 KB, but single RU word (NOT ENGLISH !!!! :)) is saved ;)

But with non-empty project it's cannot be compiled due to lots of classes qty.
 
Last edited:

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Whooooo.
0) Compiling: about 40 seconds
1) Debug mode: does not work, no any event fired\debugged.
2) Release_Obfuscated mode: 4 MB APK-file, works: 10 seconds for .doc file creation, 2 KB, but single RU word (NOT ENGLISH !!!! :)) is saved ;))

But with non-empty project it's cannot be compiled due to lots of classes qty.
So it was Debug mode ?
I stopped using it since I installed Wifi ADB :D
Sorry this lib needs many dependencies .
I do not know whether we can use the new b4a feature #ExcludeClasses
 

peacemaker

Expert
Licensed User
Longtime User
You might want to try wifi adb from google play .
No, thanks - debugging is important. Please, try to check on your side why trouble during debug mode.

.png picture from Asset is not added :(
B4X:
Sub rt_ready(success As Boolean)
rt.addParagraphOfText("текст")
File.Copy(File.DirAssets, "banner2.png", File.DirInternalCache, "banner2.png")
rt.addImage(File.DirInternalCache, "banner2.png")
rt.addParagraphOfText("текст 2")
rt.save_file(File.DirRootExternal, "myfile.doc")


java.io.FileNotFoundException: /AssetsDir/banner2.png: open failed: ENOENT (No such file or directory)

But PNG is for sure inside APK. And debugging is not possible to see detailed :-(

EDIT: code sample is edited to be workable
 
Last edited:

somed3v3loper

Well-Known Member
Licensed User
Longtime User
No, thanks - debugging is important. Please, try to check on your side why trouble during debug mode.

.png picture from Asset is not added :(
B4X:
Sub rt_ready(success As Boolean)
rt.addParagraphOfText("текст")
rt.addImage(File.DirAssets, "banner2.png")
rt.addParagraphOfText("текст 2")
rt.save_file(File.DirRootExternal, "myfile.doc")


java.io.FileNotFoundException: /AssetsDir/banner2.png: open failed: ENOENT (No such file or directory)

But PNG is for sure inside APK. And debugging is not possible to see detailed :-(
Try to copy png from assets to a real folder before adding it to the document .
 

DonManfred

Expert
Licensed User
Longtime User

peacemaker

Expert
Licensed User
Longtime User
Try to copy png from assets to a real folder before adding it to the document .
Yes, if to pre-copy
B4X:
File.Copy(File.DirAssets, "banner2.png", File.DirInternalCache, "banner2.png")
picture is inserted OK.

Didn't you check debug-mode ?
Any plan to add textcolor, textsize and font for the paragraph text ?

I guess, if these basic text settings, and normal debugging -it can make this lib usable.
Thanks in advance.

p.s. but it needs to make unused classes list for #ExcludeClasses also, for real project usage.
Is it hard for you to list the classes that are really used in your wrap ?
How to make list of really unused classes, i mean - to avoid errors ?

Now error text has these classes list:
B4X:
B4A version: 5.80
Parsing code.    (0.38s)
Compiling code.    (1.91s)
 
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.50s)
Generating R file.    (0.75s)
Compiling generated Java code.    (4.30s)
Convert byte code - optimized dex.    Error
................................
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.log4j.xml.DOMConfigurator$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class..........
......many such blocks..................

trouble writing output: Too many method references: 67172; max is 65536.
You may try using --multi-dex option.
References by package:
   156 ae.com.sun.imageio.plugins.bmp
    85 ae.com.sun.imageio.plugins.common
   204 ae.com.sun.imageio.plugins.gif
   493 ae.com.sun.imageio.plugins.jpeg
   199 ae.com.sun.imageio.plugins.png
    75 ae.com.sun.imageio.plugins.wbmp
    28 ae.com.sun.imageio.spi
    14 ae.com.sun.imageio.stream
    82 ae.com.sun.xml.bind
     2 ae.com.sun.xml.bind.annotation
    92 ae.com.sun.xml.bind.api
    54 ae.com.sun.xml.bind.api.impl
    82 ae.com.sun.xml.bind.marshaller
    33 ae.com.sun.xml.bind.unmarshaller
    48 ae.com.sun.xml.bind.util
    32 ae.com.sun.xml.bind.v2
    16 ae.com.sun.xml.bind.v2.bytecode
   193 ae.com.sun.xml.bind.v2.model.annotation
   147 ae.com.sun.xml.bind.v2.model.core
   898 ae.com.sun.xml.bind.v2.model.impl
   241 ae.com.sun.xml.bind.v2.model.nav
    96 ae.com.sun.xml.bind.v2.model.runtime
   629 ae.com.sun.xml.bind.v2.runtime
   224 ae.com.sun.xml.bind.v2.runtime.output
   175 ae.com.sun.xml.bind.v2.runtime.property
   334 ae.com.sun.xml.bind.v2.runtime.reflect
   183 ae.com.sun.xml.bind.v2.runtime.reflect.opt
   488 ae.com.sun.xml.bind.v2.runtime.unmarshaller
   173 ae.com.sun.xml.bind.v2.schemagen
    13 ae.com.sun.xml.bind.v2.schemagen.episode
   132 ae.com.sun.xml.bind.v2.schemagen.xmlschema
    95 ae.com.sun.xml.bind.v2.util
  3668 ae.java.awt
    87 ae.java.awt.color
   163 ae.java.awt.datatransfer
   261 ae.java.awt.dnd
    17 ae.java.awt.dnd.peer
   267 ae.java.awt.event
   370 ae.java.awt.font
   798 ae.java.awt.geom
   923 ae.java.awt.image
    99 ae.java.awt.image.renderable
   179 ae.java.awt.peer
    75 ae.java.awt.print
   192 ae.javax.accessibility
   374 ae.javax.imageio
    24 ae.javax.imageio.event
   212 ae.javax.imageio.metadata
     6 ae.javax.imageio.plugins.bmp
    38 ae.javax.imageio.plugins.jpeg
   139 ae.javax.imageio.spi
   250 ae.javax.imageio.stream
   404 ae.javax.xml.bind
    89 ae.javax.xml.bind.annotation
    24 ae.javax.xml.bind.annotation.adapters
     9 ae.javax.xml.bind.attachment
   119 ae.javax.xml.bind.helpers
    37 ae.javax.xml.bind.util
   203 ae.javax.xml.stream
    59 ae.javax.xml.stream.events
    66 ae.javax.xml.stream.util
  1014 ae.sun.awt
   174 ae.sun.awt.datatransfer
    99 ae.sun.awt.dnd
     1 ae.sun.awt.event
   275 ae.sun.awt.geom
   788 ae.sun.awt.image
    85 ae.sun.awt.shell
    92 ae.sun.awt.util
  1320 ae.sun.font
   369 ae.sun.java2d
    39 ae.sun.java2d.cmm
    40 ae.sun.java2d.cmm.lcms
   558 ae.sun.java2d.loops
   213 ae.sun.java2d.opengl
   496 ae.sun.java2d.pipe
    44 ae.sun.java2d.pipe.hw
   124 ae.sun.java2d.pisces
     7 ae.sun.security.action
     6 ae.sun.util
    15 android.animation
    78 android.app
     2 android.appwidget
   101 android.content
    10 android.content.pm
    31 android.content.res
    20 android.database
    22 android.database.sqlite
    66 android.graphics
    18 android.graphics.drawable
     5 android.hardware
    27 android.media
    17 android.net
    60 android.os
     4 android.provider
    15 android.telephony
    22 android.text
     2 android.text.method
    11 android.text.style
    17 android.util
    71 android.view
     2 android.view.inputmethod
    21 android.webkit
   230 android.widget
   201 anywheresoftware.b4a
    25 anywheresoftware.b4a.agraham.byteconverter
   191 anywheresoftware.b4a.agraham.dialogs
    71 anywheresoftware.b4a.agraham.encryption
    66 anywheresoftware.b4a.agraham.reflection
    44 anywheresoftware.b4a.agraham.richstring
     1 anywheresoftware.b4a.debug
    38 anywheresoftware.b4a.giuseppe.salvi.icos.library
    57 anywheresoftware.b4a.http
    29 anywheresoftware.b4a.inappbilling3
   241 anywheresoftware.b4a.keywords
    12 anywheresoftware.b4a.keywords.constants
   117 anywheresoftware.b4a.net
   873 anywheresoftware.b4a.objects
    72 anywheresoftware.b4a.objects.collections
    97 anywheresoftware.b4a.objects.drawable
    67 anywheresoftware.b4a.objects.streams
   248 anywheresoftware.b4a.phone
   148 anywheresoftware.b4a.randomaccessfile
    47 anywheresoftware.b4a.sql
    26 anywheresoftware.b4j.object
    25 b4a.example
    23 com.android.vending.billing
    12 com.google.analytics.containertag.common
   211 com.google.analytics.containertag.proto
    15 com.google.analytics.midtier.proto.containertag
   470 com.google.analytics.tracking.android
    29 com.google.android.gms.analytics.internal
  1209 com.google.tagmanager
    11 com.google.tagmanager.proto
   202 com.google.tagmanager.protobuf.nano
    58 com.itseasy.rtf
     4 com.itseasy.rtf.exception
   108 com.itseasy.rtf.text
     2 com.maximus.id
   806 com.pdfjet
    52 com.sun.activation.registries
    76 com.sun.istack
    15 com.sun.istack.localization
     2 com.sun.jdmk.comm
     1 com.sun.org.apache.xerces.internal.util
     1 com.sun.xml.internal.bind.marshaller
     3 com.sun.xml.txw2
     1 com.sun.xml.txw2.output
    26 com.topologi.diffx
    99 com.topologi.diffx.algorithm
    13 com.topologi.diffx.config
    20 com.topologi.diffx.event
   182 com.topologi.diffx.event.impl
    11 com.topologi.diffx.event.lang
    35 com.topologi.diffx.format
    62 com.topologi.diffx.load
    40 com.topologi.diffx.load.text
    50 com.topologi.diffx.sequence
     3 com.topologi.diffx.util
   140 com.topologi.diffx.xml
    45 com.topologi.diffx.xml.esc
    14 de.donmanfred
    10 default
    30 giuseppe.salvi.icos.library
    65 java.awt
     1 java.awt.color
    28 java.awt.datatransfer
     8 java.awt.dnd
    13 java.awt.event
     5 java.awt.geom
    18 java.awt.image
    32 java.beans
   339 java.io
   537 java.lang
     1 java.lang.annotation
    13 java.lang.ref
    64 java.lang.reflect
    40 java.math
   109 java.net
    92 java.nio
    11 java.nio.channels
    36 java.nio.charset
     2 java.rmi
    49 java.security
     4 java.security.cert
     2 java.security.spec
     7 java.sql
    94 java.text
   451 java.util
    57 java.util.concurrent
     7 java.util.concurrent.atomic
    17 java.util.concurrent.locks
     3 java.util.jar
    22 java.util.logging
    15 java.util.regex
    59 java.util.zip
   186 javax.activation
    16 javax.crypto
     3 javax.crypto.spec
    23 javax.jms
    12 javax.mail
     6 javax.mail.internet
    31 javax.management
     4 javax.naming
     6 javax.net
    38 javax.net.ssl
     5 javax.print
     1 javax.print.attribute
     4 javax.print.attribute.standard
   130 javax.swing
     8 javax.swing.event
    16 javax.swing.table
     6 javax.swing.text
    26 javax.swing.tree
    38 javax.xml.datatype
    11 javax.xml.namespace
    20 javax.xml.parsers
    28 javax.xml.stream
    18 javax.xml.transform
     6 javax.xml.transform.dom
    24 javax.xml.transform.sax
    17 javax.xml.transform.stream
    12 javax.xml.validation
     5 javax.xml.xpath
    94 myjava.awt.datatransfer
     2 net.arnx.wmf2svg.gdi.svg
     2 net.arnx.wmf2svg.gdi.wmf
    24 org.antlr.runtime
     3 org.antlr.stringtemplate
     9 org.apache.avalon.framework.configuration
     2 org.apache.commons.codec.binary
   263 org.apache.commons.io
   127 org.apache.commons.io.filefilter
    83 org.apache.commons.io.input
   100 org.apache.commons.io.output
     6 org.apache.commons.lang
     6 org.apache.commons.lang.builder
     3 org.apache.commons.lang.text
    15 org.apache.commons.logging
   104 org.apache.commons.net
   433 org.apache.commons.net.ftp
   123 org.apache.commons.net.ftp.parser
    75 org.apache.commons.net.io
    92 org.apache.commons.net.pop3
   120 org.apache.commons.net.smtp
   121 org.apache.commons.net.util
     4 org.apache.fop.apps
    14 org.apache.harmony.awt
    96 org.apache.harmony.awt.datatransfer
    12 org.apache.harmony.awt.internal.nls
     3 org.apache.harmony.misc
    23 org.apache.http
     2 org.apache.http.auth
     4 org.apache.http.client
    12 org.apache.http.client.methods
     2 org.apache.http.conn
     2 org.apache.http.conn.params
     4 org.apache.http.conn.scheme
     2 org.apache.http.conn.ssl
     5 org.apache.http.entity
     5 org.apache.http.impl.auth
     6 org.apache.http.impl.client
     1 org.apache.http.impl.conn.tsccm
     1 org.apache.http.message
     4 org.apache.http.params
     2 org.apache.http.util
    35 org.apache.james.mime4j.codec
     7 org.apache.james.mime4j.util
   379 org.apache.log4j
   105 org.apache.log4j.chainsaw
    31 org.apache.log4j.config
   163 org.apache.log4j.helpers
    21 org.apache.log4j.jdbc
    70 org.apache.log4j.jmx
    77 org.apache.log4j.lf5
    88 org.apache.log4j.lf5.util
   251 org.apache.log4j.lf5.viewer
   131 org.apache.log4j.lf5.viewer.categoryexplorer
    45 org.apache.log4j.lf5.viewer.configure
   174 org.apache.log4j.net
    17 org.apache.log4j.nt
    16 org.apache.log4j.or
     2 org.apache.log4j.or.jms
     2 org.apache.log4j.or.sax
   162 org.apache.log4j.spi
    59 org.apache.log4j.varia
    69 org.apache.log4j.xml
     5 org.apache.poi.hwpf
     2 org.apache.poi.hwpf.model
    18 org.apache.poi.hwpf.usermodel
     2 org.apache.poi.poifs.dev
     3 org.apache.poi.poifs.filesystem
   139 org.apache.xerces.jaxp.datatype
     1 org.apache.xerces.util
    10 org.apache.xmlgraphics.fonts
    30 org.apache.xmlgraphics.image
   264 org.apache.xmlgraphics.image.codec.png
   147 org.apache.xmlgraphics.image.codec.tiff
   149 org.apache.xmlgraphics.image.codec.util
    98 org.apache.xmlgraphics.image.loader
    48 org.apache.xmlgraphics.image.loader.cache
   234 org.apache.xmlgraphics.image.loader.impl
    24 org.apache.xmlgraphics.image.loader.impl.imageio
    37 org.apache.xmlgraphics.image.loader.pipeline
    49 org.apache.xmlgraphics.image.loader.spi
    59 org.apache.xmlgraphics.image.loader.util
   124 org.apache.xmlgraphics.image.rendered
    32 org.apache.xmlgraphics.image.writer
    26 org.apache.xmlgraphics.image.writer.imageio
    15 org.apache.xmlgraphics.image.writer.internal
   170 org.apache.xmlgraphics.java2d
   112 org.apache.xmlgraphics.java2d.color
    27 org.apache.xmlgraphics.java2d.color.profile
   121 org.apache.xmlgraphics.java2d.ps
   221 org.apache.xmlgraphics.ps
    87 org.apache.xmlgraphics.ps.dsc
   183 org.apache.xmlgraphics.ps.dsc.events
     8 org.apache.xmlgraphics.ps.dsc.tools
    75 org.apache.xmlgraphics.util
    24 org.apache.xmlgraphics.util.dijkstra
    22 org.apache.xmlgraphics.util.i18n
    58 org.apache.xmlgraphics.util.io
    15 org.apache.xmlgraphics.util.uri
   132 org.apache.xmlgraphics.xmp
    10 org.apache.xmlgraphics.xmp.merge
    82 org.apache.xmlgraphics.xmp.schemas
    26 org.apache.xmlgraphics.xmp.schemas.pdf
    94 org.docx4j
   110 org.docx4j.bibliography
    22 org.docx4j.convert.in
    31 org.docx4j.convert.in.xhtml
    52 org.docx4j.convert.out
    14 org.docx4j.convert.out.flatOpcXml
   118 org.docx4j.convert.out.html
     4 org.docx4j.convert.out.pdf
    61 org.docx4j.convert.out.pdf.viaXSLFO
    14 org.docx4j.customXmlProperties
    18 org.docx4j.customxml
    28 org.docx4j.diff
  2672 org.docx4j.dml
  1663 org.docx4j.dml.chart
   135 org.docx4j.dml.chartDrawing
     7 org.docx4j.dml.compatibility
   881 org.docx4j.dml.diagram
    51 org.docx4j.dml.diagram2008
     3 org.docx4j.dml.lockedCanvas
    17 org.docx4j.dml.picture
   177 org.docx4j.dml.spreadsheetdrawing
   187 org.docx4j.dml.wordprocessingDrawing
    35 org.docx4j.docProps.core
    26 org.docx4j.docProps.core.dc.elements
    72 org.docx4j.docProps.core.dc.terms
    83 org.docx4j.docProps.custom
    73 org.docx4j.docProps.extended
   141 org.docx4j.docProps.variantTypes
    46 org.docx4j.fonts
     2 org.docx4j.fonts.fop
    16 org.docx4j.fonts.fop.apps
   514 org.docx4j.fonts.fop.fonts
    18 org.docx4j.fonts.fop.fonts.apps
    27 org.docx4j.fonts.fop.fonts.autodetect
   324 org.docx4j.fonts.fop.fonts.base14
    36 org.docx4j.fonts.fop.fonts.substitute
   173 org.docx4j.fonts.fop.fonts.truetype
   224 org.docx4j.fonts.fop.fonts.type1
    34 org.docx4j.fonts.fop.util
    20 org.docx4j.fonts.foray.font.format
    38 org.docx4j.fonts.microsoft
    22 org.docx4j.fonts.substitutions
    38 org.docx4j.jaxb
   895 org.docx4j.math
    47 org.docx4j.model
   272 org.docx4j.model.datastorage
    20 org.docx4j.model.fields
    11 org.docx4j.model.fields.merge
    73 org.docx4j.model.images
    68 org.docx4j.model.listnumbering
    26 org.docx4j.model.properties
   133 org.docx4j.model.properties.paragraph
   107 org.docx4j.model.properties.run
    51 org.docx4j.model.properties.table
     2 org.docx4j.model.properties.table.tblStyle
    21 org.docx4j.model.properties.table.tc
     2 org.docx4j.model.properties.table.tr
     6 org.docx4j.model.sdt
    79 org.docx4j.model.structure
     9 org.docx4j.model.structure.jaxb
   237 org.docx4j.model.styles
    38 org.docx4j.model.table
    31 org.docx4j.openpackaging
    66 org.docx4j.openpackaging.contenttype
    13 org.docx4j.openpackaging.exceptions
    60 org.docx4j.openpackaging.io
    96 org.docx4j.openpackaging.packages
   176 org.docx4j.openpackaging.parts
   106 org.docx4j.openpackaging.parts.DrawingML
   105 org.docx4j.openpackaging.parts.PresentationML
    76 org.docx4j.openpackaging.parts.SpreadsheetML
   339 org.docx4j.openpackaging.parts.WordprocessingML
     6 org.docx4j.openpackaging.parts.digitalsignature
    32 org.docx4j.openpackaging.parts.opendope
    81 org.docx4j.openpackaging.parts.relationships
     3 org.docx4j.org.xhtmlrenderer.css.constants
     9 org.docx4j.org.xhtmlrenderer.css.style
     1 org.docx4j.org.xhtmlrenderer.css.style.derived
     8 org.docx4j.org.xhtmlrenderer.docx
     2 org.docx4j.org.xhtmlrenderer.layout
    11 org.docx4j.org.xhtmlrenderer.newtable
    10 org.docx4j.org.xhtmlrenderer.render
     5 org.docx4j.org.xhtmlrenderer.resource
    16 org.docx4j.relationships
   160 org.docx4j.samples
    31 org.docx4j.sharedtypes
    51 org.docx4j.utils
  1715 org.docx4j.vml
   613 org.docx4j.vml.officedrawing
    16 org.docx4j.vml.presentationDrawing
     7 org.docx4j.vml.root
    90 org.docx4j.vml.spreadsheetDrawing
    73 org.docx4j.vml.wordprocessingDrawing
  5623 org.docx4j.wml
    30 org.docx4j.xmlPackage
    11 org.eclipse.compare
    19 org.eclipse.compare.internal
    59 org.eclipse.compare.rangedifferencer
     8 org.json
    21 org.jvnet.jaxb2_commons.ppp
    44 org.merlin.io
    75 org.opendope.SmartArt.dataHierarchy
    10 org.opendope.components
    55 org.opendope.conditions
    53 org.opendope.questions
    26 org.opendope.xpaths
     9 org.plutext.jaxb.svg11
    34 org.plutext.jaxb.xslfo
    22 org.pptx4j
    37 org.pptx4j.convert.out.svginhtml
     3 org.pptx4j.jaxb
    39 org.pptx4j.model
  1713 org.pptx4j.pml
    29 org.pptx4j.samples
    79 org.w3c.dom
     9 org.w3c.dom.css
     2 org.w3c.dom.traversal
     3 org.xlsx4j.jaxb
    11 org.xlsx4j.samples
  5084 org.xlsx4j.sml
    62 org.xml.sax
    31 org.xml.sax.helpers
   828 peacemaker.cvmaster
    37 peacemaker.cvmaster.designerscripts
    18 smm.rtf
     1 sun.awt
    19 sun.misc
     1 sun.nio.cs
     1 sun.nio.cs.ext
     5 sun.security.action
     5 sun.text
    13 uk.co.martinpearman.b4a.androidresources
    34 uk.co.martinpearman.b4a.content.res
   586 uk.co.martinpearman.b4a.pdfjet
    26 uk.co.martinpearman.b4a.util

It needs to remove unused among these - how to determine exactly ?
B4X:
#ExcludeClasses: org.docx4j
#ExcludeClasses: org.docx4j.bibliography
#ExcludeClasses: org.docx4j.convert.in
#ExcludeClasses: org.docx4j.convert.in.xhtml
#ExcludeClasses: org.docx4j.convert.out
#ExcludeClasses: org.docx4j.convert.out.flatOpcXml
#ExcludeClasses: org.docx4j.convert.out.html
#ExcludeClasses: org.docx4j.convert.out.pdf
#ExcludeClasses: org.docx4j.convert.out.pdf.viaXSLFO
#ExcludeClasses: org.docx4j.customXmlProperties
#ExcludeClasses: org.docx4j.customxml
#ExcludeClasses: org.docx4j.diff
#ExcludeClasses: org.docx4j.dml
#ExcludeClasses: org.docx4j.dml.chart
#ExcludeClasses: org.docx4j.dml.chartDrawing
#ExcludeClasses: org.docx4j.dml.compatibility
#ExcludeClasses: org.docx4j.dml.diagram
#ExcludeClasses: org.docx4j.dml.diagram2008
#ExcludeClasses: org.docx4j.dml.lockedCanvas
#ExcludeClasses: org.docx4j.dml.picture
#ExcludeClasses: org.docx4j.dml.spreadsheetdrawing
#ExcludeClasses: org.docx4j.dml.wordprocessingDrawing
#ExcludeClasses: org.docx4j.docProps.core
#ExcludeClasses: org.docx4j.docProps.core.dc.elements
#ExcludeClasses: org.docx4j.docProps.core.dc.terms
#ExcludeClasses: org.docx4j.docProps.custom
#ExcludeClasses: org.docx4j.docProps.extended
#ExcludeClasses: org.docx4j.docProps.variantTypes
#ExcludeClasses: org.docx4j.fonts
#ExcludeClasses: org.docx4j.fonts.fop
#ExcludeClasses: org.docx4j.fonts.fop.apps
#ExcludeClasses: org.docx4j.fonts.fop.fonts
#ExcludeClasses: org.docx4j.fonts.fop.fonts.apps
#ExcludeClasses: org.docx4j.fonts.fop.fonts.autodetect
#ExcludeClasses: org.docx4j.fonts.fop.fonts.base14
#ExcludeClasses: org.docx4j.fonts.fop.fonts.substitute
#ExcludeClasses: org.docx4j.fonts.fop.fonts.truetype
#ExcludeClasses: org.docx4j.fonts.fop.fonts.type1
#ExcludeClasses: org.docx4j.fonts.fop.util
#ExcludeClasses: org.docx4j.fonts.foray.font.format
#ExcludeClasses: org.docx4j.fonts.microsoft
#ExcludeClasses: org.docx4j.fonts.substitutions
#ExcludeClasses: org.docx4j.jaxb
#ExcludeClasses: org.docx4j.math
#ExcludeClasses: org.docx4j.model
#ExcludeClasses: org.docx4j.model.datastorage
#ExcludeClasses: org.docx4j.model.fields
#ExcludeClasses: org.docx4j.model.fields.merge
#ExcludeClasses: org.docx4j.model.images
#ExcludeClasses: org.docx4j.model.listnumbering
#ExcludeClasses: org.docx4j.model.properties
#ExcludeClasses: org.docx4j.model.properties.paragraph
#ExcludeClasses: org.docx4j.model.properties.run
#ExcludeClasses: org.docx4j.model.properties.table
#ExcludeClasses: org.docx4j.model.properties.table.tblStyle
#ExcludeClasses: org.docx4j.model.properties.table.tc
#ExcludeClasses: org.docx4j.model.properties.table.tr
#ExcludeClasses: org.docx4j.model.sdt
#ExcludeClasses: org.docx4j.model.structure
#ExcludeClasses: org.docx4j.model.structure.jaxb
#ExcludeClasses: org.docx4j.model.styles
#ExcludeClasses: org.docx4j.model.table
#ExcludeClasses: org.docx4j.openpackaging
#ExcludeClasses: org.docx4j.openpackaging.contenttype
#ExcludeClasses: org.docx4j.openpackaging.exceptions
#ExcludeClasses: org.docx4j.openpackaging.io
#ExcludeClasses: org.docx4j.openpackaging.packages
#ExcludeClasses: org.docx4j.openpackaging.parts
#ExcludeClasses: org.docx4j.openpackaging.parts.DrawingML
#ExcludeClasses: org.docx4j.openpackaging.parts.PresentationML
#ExcludeClasses: org.docx4j.openpackaging.parts.SpreadsheetML
#ExcludeClasses: org.docx4j.openpackaging.parts.WordprocessingML
#ExcludeClasses: org.docx4j.openpackaging.parts.digitalsignature
#ExcludeClasses: org.docx4j.openpackaging.parts.opendope
#ExcludeClasses: org.docx4j.openpackaging.parts.relationships
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.css.constants
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.css.style
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.css.style.derived
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.docx
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.layout
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.newtable
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.render
#ExcludeClasses: org.docx4j.org.xhtmlrenderer.resource
#ExcludeClasses: org.docx4j.relationships
#ExcludeClasses: org.docx4j.samples
#ExcludeClasses: org.docx4j.sharedtypes
#ExcludeClasses: org.docx4j.utils
#ExcludeClasses: org.docx4j.vml
#ExcludeClasses: org.docx4j.vml.officedrawing
#ExcludeClasses: org.docx4j.vml.presentationDrawing
#ExcludeClasses: org.docx4j.vml.root
#ExcludeClasses: org.docx4j.vml.spreadsheetDrawing
#ExcludeClasses: org.docx4j.vml.wordprocessingDrawing
#ExcludeClasses: org.docx4j.wml
#ExcludeClasses: org.docx4j.xmlPackage
 
Last edited:

somed3v3loper

Well-Known Member
Licensed User
Longtime User
I might go for another library .
Docx4j seems to use lots of dependencies and xml for styling and colors.
 
Top