DiplomaGen is a small Java application that generates a .docx diploma file using Apache POI.
It inserts an image, adds a title, fills in static text, and leaves blank spaces for a contestant’s name, time, and date.
- Inserts a PNG image into a generated
.docxfile - Adds formatted text (title, subtitle, award line)
- Provides blank fields for:
- First & last name
- Time
- Date
- Outputs a ready-to-edit
Diploma.docx
- Java 22+
- Maven
- Apache POI (
poi-ooxmldependency included inpom.xml) - A PNG image located at:
src/main/java/org/example/
The generator:
- Creates a new Word document
- Embeds the given PNG image
- Writes the diploma text with formatting
- Saves the output as Diploma.docx in the project root
Apache POI handles DOCX creation, text styling, and the picture embedding (using EMU units for sizing).
Compile and run using Maven
Anton Jansson