Page 1 of 1

A question about License.

PostPosted: Wed Dec 12, 2012 7:26 am
by hpeng
Hi, there is a paragraph in docx4j\legals\NOTICE:

The jar containing package org.docx4j.org.xhtmlrenderer is an LGPL library. Source may be found at https://github.com/plutext/flyingsaucer


I searched the docx4j-2.8.1. and it does not seem to contain org.docx4j.org anymore.

I noticed the change log for version 2.5.0 contains following:

] PDF conversion via HTML or iText moved from main source tree; iText, xhtmlrenderer and pdf-renderer dependencies removed.


My question is if the above paragraph in the NOTICE still affects us given we are not using the xhtml feature and will not distribute xhtmlrenderer-1.0.0.jar.

Thanks.

Re: A question about License.

PostPosted: Wed Dec 12, 2012 11:37 am
by jason
org.docx4j.org.xhtmlrenderer is a separate project, which lives at https://github.com/plutext/flyingsaucer

It can be considered OK to use an LGPL library this way.

It is used by org.docx4j.convert.in.xhtml.XHTMLImporter

Re: A question about License.

PostPosted: Wed Dec 12, 2012 11:47 am
by hpeng
Thanks.

I guess my real question is: is it OK to distribute docx4j.jar in a commercial package to end users.

The license looks fine but the NOTICE gets us a little bit concerned.

I would greatly appreciate if you can shed any lights on this.

Best and thanks again.

Re: A question about License.

PostPosted: Wed Dec 12, 2012 3:21 pm
by jason
It is certainly our intent that developers can distribute docx4j.jar in a commercial package to end users. However, I guess you need to consider this specific issue, so thanks for drawing this issue to our attention.

As you suggest, you can leave out xhtmlrenderer-1.0.0.jar. If you leave out xhtmlrenderer-1.0.0.jar, then you oughtn't need to worry about it (ie the paragraph in the NOTICE shouldn't affect you).

For real peace of mind, you could build docx4j again to omit org.docx4j.convert.in.xhtml.XHTMLImporter

I can't give you legal advice though: It is really up to you (or your lawyers) to determine the impact of xhtmlrenderer, and what steps you will take in response.

A typical license header from xhtmlrenderer says copyright (c) 2007 Wisconsin Court System,
and that you can redistribute it and/or modify it under the terms of the LGPL; either version 2.1
of the License, or (at your option) any later version.

Have a look at clause 4 of v3, http://www.gnu.org/copyleft/lesser.html and clauses 5 and 6 of http://www.gnu.org/licenses/lgpl-2.1.html and choose the one you prefer.

Regarding clause 4 of v3, "convey" seems to be a broad term, which is good. See http://www.gnu.org/licenses/gpl-faq.htm ... Distribute

Re: A question about License.

PostPosted: Thu Dec 13, 2012 5:50 am
by hpeng
Thanks a lot for the information.

Re: A question about License.

PostPosted: Thu Dec 13, 2012 8:52 am
by jason
For those that wish to include xhtmlrenderer, I've reviewed clause 4 of LGPL v3, which says you must do each of the following:

a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.


The docx4j NOTICE file nearly does this; it should specifically say v3

b) Accompany the Combined Work with a copy of the GNU GPL and this license document.


Not hard to do.

c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.


This one is up to you, if applicable.

d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.


Go with option 4d1, since Java jars are a "suitable shared library mechanism"; see http://www.gnu.org/licenses/gpl-faq.html#LGPLJava

e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)


This bit about "Installation Information" is as clear as mud. I can't see any clear requirement to provide the source code for xhtmlrenderer, which is a bit surprising, but it would probably be simplest just to package it in the xhtmlrenderer jar.

In summary, I don't see any reason why someone wishing to include xhtmlrenderer in their commercial application wouldn't do so, but again, you should make your own decisions based on your own legal advice.

Re: A question about License.

PostPosted: Wed Dec 19, 2012 1:42 am
by hpeng
That's great help. Thanks a lot.

Hua.

Re: A question about License.

PostPosted: Thu Dec 04, 2014 12:50 am
by weh11
Hi

I have just started looking at using docx4j for commercial use - I have read through this post and believe my use should be fine - are all the current dependant libraries free / open source? If so is there anything specific I need to do for any of the licenses?

I am only going to be using it to create quite basic word documents.

Do I just need to include the docx4j 3.2.1 legals documents?

Thanks

Re: A question about License.

PostPosted: Thu Dec 04, 2014 7:17 am
by jason
Subject to the notes in the legals document [1], docx4j and all its dependencies are ASLv2 licensed [2]

To use docx4j, see clause 4 of the license:

4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.


which includes the requirement that you include the contents of the NOTICE [1].

Note: A while ago (~July 2013), the stuff which uses xhtmlrenderer was moved into a separate project [2], licensed under LGPL v2.1 (or later), which is the license used by Flying Saucer (the main dependency)

[1] https://github.com/plutext/docx4j/blob/ ... als/NOTICE
[2] http://www.apache.org/licenses/LICENSE-2.0.html
[3] https://github.com/plutext/docx4j-ImportXHTML/