Skip to content

tafadzwabmotsi/Images-Docx-To-PDF-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Images-Docx-To-PDF-Converter

Images Docx Files to PDF Converter

ImagesDocxToPDFConverter is a JavaFX desktop application that allows users to convert either images (.jpg or .png) files or .docx files to PDF files by dragging and dropping the files for conversion.

Download Application


Input files

The program takes the following as input files:


Processing

The application uses itextpdf and documents4j packages to convert images and docx files to Acrobat PDF format respectively.

Processing image files

Given an image, the program does the following:

  • Creates a new Document instance and FileOutputStream instance
  • Instantiates a new PdfWriter object
  • Opens the PdfWriter and Document
  • Creates a new page where the image will be rendered
  • Instantiates and gets a new Image object
  • Sets image's absolute position (x, y) = (0, 0), border width to 0, and the image's page size to A4
  • Adds the image to the Document object which will convert the image file
  • Close Document and PDFWriter

Process word files

  • Instantiates two File objects for input and output files respectively.
  • Instantiates an InputStream and and OutputStream object for input and output files respectively
  • Builds an IConverter to convert the input file to its respective PDF file
  • Converts the word file to PDF file
  • Shuts IConverter
  • Close the Inputstream and Outputstream objects

User Interface

The application has three options (shown in the screen shot below) for the user:


Converting Images to PDF

Drag and Drop Images

Clicking on the first option, the program launches a new scene prompting the user to drag the image files to the window area:

Converting

On dropping the images, the preview window is launched and the user can browse through the images to converted by scrolling on the window (see the screen shot below):


Converting Images to PDF

Word files can be converted in a similar manner as described above


Results


Technologies

About

Images (.jpeg or .png) and Word files Converter Desktop Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors