Skip to content

A Java-based desktop application that converts Microsoft Word documents (.doc and .docx) to PDF files. Built with Swing for the GUI, it utilizes docx4j for handling Word documents and Apache FOP for PDF conversion. The application allows for batch processing of files with a simple and user-friendly interface.

Notifications You must be signed in to change notification settings

Hikaru-e/docx2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word to PDF Converter

This project is a Java-based desktop application that converts Microsoft Word documents (.doc and .docx) to PDF files. It uses the docx4j library for handling Word documents and Apache FOP for PDF conversion. The graphical user interface (GUI) is built using Swing.

Features

  • Add multiple Word documents for batch conversion.
  • Select an output directory for the converted PDF files.
  • Supports both .doc and .docx formats.
  • Maps fonts to ensure proper rendering in the PDF files. ( Still in progress )

Prerequisites

  • Java 8 or higher
  • Maven 3.6 or higher

Getting Started

Clone the Repository

git clone https://github.com/Hikaru-e/docx2pdf.git
cd docx2pdf 

Build the Project

Use Maven to build the project and create a runnable JAR file.

mvn clean package

Run the Application

After building the project, you can run the application using the generated JAR file located in the target directory.

java -jar target/docx2pdf-1.0-SNAPSHOT-shaded.jar 

Running Application

Usage

  1. Launch the application.
  2. Click on "Add Files" to select Word documents (.doc or .docx) for conversion.
  3. Click on "Browse" to choose an output directory where the converted PDF files will be saved.
  4. Click on "Convert to PDF" to start the conversion process.
  5. The application will notify you upon successful conversion of each file.

Project Structure

  • src/main/java/org/example/Main.java: The main class containing the application logic and GUI.
  • src/main/resources/: Contains additional resources such as icons and styles.
  • pom.xml: Maven project file containing dependencies and build configuration.

Dependencies

The project relies on the following main dependencies:

  • docx4j: For handling Word documents.
  • Apache FOP: For converting documents to PDF.

All dependencies are defined in the pom.xml file and are managed by Maven.

Acknowledgements

About

A Java-based desktop application that converts Microsoft Word documents (.doc and .docx) to PDF files. Built with Swing for the GUI, it utilizes docx4j for handling Word documents and Apache FOP for PDF conversion. The application allows for batch processing of files with a simple and user-friendly interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages