The library, named GDocx, add a fluent like interface on top of Docx4j.
Small example:
- Code: Select all
GP p = GP.create().text("Tahoma 24 red right aligned").font("Tahoma", 24).color("FF0000").align(JcEnumeration.CENTER);
The above line creates a paragraph with Tahoma 24, red color, center aligned. The p instance can be used everywhere a Docx4j's P instance can be used.
Similar approach for table, row and cells. Please note that not all Docx4j API has a fluent counterpart in GDocx.
The GDocx library is released under Apache 2.0 License and it can be downloaded from https://java.net/projects/gdocx
Comments and requests can be added on the project area.