Excel to PDF in Java – JAR Files

In the previous part, we explained how to generate a simple HTML form that is capable of accepting an user uploaded XLS file and post it to a Java servlet and generate PDF. In this part, we will identify all the required Java libraries that will support the servlet code. You will require a number of JAR files and I have provided a table of JAR files that you must have in your classpath for the example to work.

XLS to PDF – Required JAR Files

Listed below are the JAR files that is required for the entire tutorial:

JAR File
This file is required to handle .XLS files uploaded to the servlet.
This JAR file supports reading the form data including the uploaded file.
This JAR files supports methods that generate InputStream of the uploaded Excel file.
Core servlet API shipped with TomCat, to support the servlet code completely.
JAR files in this library converts the XLS / XLSX file data to PDF.
You need this to support XLSX format. (Open Office XML format ).Part of POI library.
Required for XLSX format handling.Part of POI library.
Required to handle XLSX format. Part of POI library.
To parse XLSX format. Part of POI library.
Read XLSX file schemas

You don’t need to search for these JAR files across the internet. All you need to do is download POIv3.8, iText 5.3.4, and TomCat. You can find all the JAR files in them.

Once you have a copy of all the JAR files, make sure you copy them to your CLASSPATH.
If you have all the required files ready, you can move to the next part of this tutorial => Complete Java Servlet Program. Refer links below for navigation assistance.
This Tutorial Series: Convert Excel to PDF – Java Servlet Example
Keywords: Excel to PDF, Java Servlet, Apache POI, Itext, Convert XLS to PDF Example
All parts:
1. HTML Form Design to support XLS to PDF Conversion.
2. JAR Files required for conversion and their use.
3. Handling uploaded file in a servlet./ Complete Java code to convert Excel to PDF through a servlet.
4. Servlet Configuration / Testing.

No comments:

Post a Comment