Git Product home page Git Product logo

wordgo's Introduction

Word GO

WordGO - Making it easier for Java to generate word documents

【choose language:中文介绍

Background

In traditional Java Word generation, template files are usually created manually and then imported. If you don't want to create a template and want less code, it's a good idea to choose Word Go~~

Installation

Manually import the jar package

  • IDEA import: Click File-Project Structure; then find Modules on the left and click; finally, click the green + sign on the right, select JARs or directories and select the jar package to be imported.
  • Eclipse import: right-click "Project" → select Properties, select Java Build Path in the list on the left side of the pop-up dialog box

maven import

<dependency>
 <groupId>com.github.qrpcode</groupId>
 <artifactId>wordgo</artifactId>
 <version>1.0-SNAPSHOT</version>
</dependency>

Environment dependency and compatibility

It can be used as long as it can run java, it does not rely on any third-party Office applications

See the table for compatibility:

我的兼容性

Use

Let’s create a "Hello World" first

WordGo wordGo = new WordGo();
//Create a new word
wordGo.add("Hello World", "font-size: 15; color: #FF0000");
//Fill in the data to view the corresponding function description
wordGo.create("C:\\demo.docx");
//Finally, it can be generated. The parameter is the generation directory, which must have a file name and end with. Docx

Yes, it is very similar to Css, it is easy to use~~

Code support JDK1.5 + (inclusive)

Corresponding function description

(can be learned in 10 minutes)

👉 WordGO Construct and generate files

👉 Set document attribute information

👉 Set paper size and margins

👉 Text, page change related operations

👉 Create, fill, and add tables related operations

👉 Picture related operations

👉 Header and footer related operations

Main project leader

@qrpcode

Join

Yes, I also think the code written by me is a bit (very) messy

Come and help me, just pull request after Fork~

Open source agreement

Apache-2.0 License

(In other words, it can be commercialized, please see the agreement in detail~~)

💖 If you find it useful, remember to star ⭐

PS:Welcome to download and try it out. If you need to apply it to commercial projects, please be sure to test all possible functions in advance to avoid generation deviation.

Feel free to leave a message if you find a bug!

wordgo's People

Contributors

qrpcode avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.