A PDF Portfolio can contain a wide range of file types created in different applications. For example, it can include Word documents, e-mail messages, spreadsheets and PowerPoint presentations. In this article, you will learn how to create a portfolio and add files/folders to it programmatically by using Spire.PDF for Java.

Import jar dependency (2 Methods)
● Download the Spire.PDF for Java API and unzip it. Then add the Spire.Pdf.jar file to your project as dependency.
● Directly add the jar dependency to maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>…

This article will share how to convert PowerPoint documents to HTML format files using Free Spire.Presentation for Java.

Installation(2 Methods)
● Download the free API and unzip it. Then add the Spire.Presentation.jar file to your project as dependency.

● You can also add the jar dependency to your maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.presentation.free</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>

Below is a screenshot of the sample PowerPoint document.

Sample Code

import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;

public class ToHtml {
public static void main(String[] args) throws Exception {

//Create a Presentation object
Presentation presentation = new Presentation();

//Load the sample document
presentation.loadFromFile("C:\\Users\\Administrator\\Desktop\\sample.pptx");

//Save the document to HTML format
presentation.saveToFile("C:\\Users\\Administrator\\Desktop\\ToHtml.html", FileFormat.HTML);
}
}

The Excel gridlines run between the columns and row of the spreadsheet, allowing you to see where each individual cell is located. This article will share how to use a free Java API to hide or show gridlines in a Excel worksheet programmatically.

Installation (2 Method)
1# Download the free API (Free Spire.XLS for Java)and unzip it, then add the Spire.Xls.jar file to your project as dependency.

2# You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.xls.free</artifactId>
<version>3.9.1</version> …

Like footnote, the endnote is a supplementary explanation to the main text. It is usually located at the end of the document to list the source of the citation. This article will show you how to add an endnote to Word documents using Free Spire.Doc for Java.

Installation
Method 1: Download the free API and unzip it. Then add the Spire.Doc.jar file to your Java application as dependency.

Method 2: Directly add the jar dependency to maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.doc.free</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>


The table of contents is usually an indispensable part of a long document. It enables readers to understand what is in the document and how to find the specific content easily. In this article, I will introduce how to create table of contents in a Word document programmatically using Free Spire.Doc for Java.

Installation
Method 1: Download the free library and unzip it. Then add the Spire.Doc.jar file to your Java application as dependency.

Method 2: Directly add the jar dependency to maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>…

Text box allows people to enter text in it and move it arbitrarily. It can be used in some areas that need to be emphasized or highlighted. This article will demonstrate how to add textbox into Excel worksheet with Free Spire.XLS for Java. We could fill in the textbox with text and image.

Installation (2 Method)
1# Download the free library and unzip it, then add the Spire.Xls.jar file to your project as dependency.

2# You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>…

In my previous article, I’ve introduced how to add header and footer to a Word document. This article will share how to add header and footer when creating new PDF document by using Free Spire. PDF for Java.

Spire.PDF for Java has a class named PdfPageTemplateElement, which represents a page template element that can be used as header, footer, watermark or stamp. The template can contain text, image as well as dynamic fields like PdfPageCountField, PdfPageNumberField, etc. We use text string for the header and dynamic fields for the footer in the following example.

Import JAR Dependency

● Download the…


Chart is a very convenient tool for data analysis and comparison, and this article will share to create a chart in a PowerPoint document programmatically using Free Spire.Presentation for Java.

Installation(2 Methods)
● Download the free API and unzip it. Then add the Spire.Presentation.jar file to your project as dependency.

● You can also add the jar dependency to your maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.presentation.free</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>

Sample Code

import com.spire.presentation.*;
import com.spire.pdf.tables.table.*;
import com.spire.presentation.charts.*;
import com.spire.presentation.drawing.FillFormatType;
import java.awt.geom.Rectangle2D;
import java.lang.Object;


public class CreateChart {
public…

In Word document, multi-level lists can make the content more organized. Now, this article will give a simple example of how to insert a multi-level list in a Word document using Free Spire.Doc for Java.

Installation
Method 1: Download the free library and unzip it. Then add the Spire.Doc.jar file to your Java application as dependency.

Method 2: Directly add the jar dependency to maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.doc.free</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>

Sample Code

import com.spire.doc.Document;
import com.spire.doc.FileFormat;
import com.spire.doc.Section;
import com.spire.doc.documents.*;

public class CreateMultiLevelList {…

A dynamic PDF stamp usually consists of some dynamic information, such as system date, time, and company information. This article will introduce how to add a dynamic rubber stamp to PDF by using Free Spire.PDF for Java.

Import jar dependency (2 Method)
● Download the Free Spire.PDF for Java and unzip it. Then add the Spire.Pdf.jar file to your project as dependency.

● Directly add the jar dependency to maven project by adding the following configurations to the pom.xml.

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.pdf.free</artifactId>
<version>4.3.0</version>
</dependency>
</dependencies>

Sample Code

import com.spire.pdf.PdfDocument;
import com.spire.pdf.PdfPageBase;
import com.spire.pdf.annotations.PdfRubberStampAnnotation;
import com.spire.pdf.annotations.appearance.PdfAppearance;
import…

Andrew Wilson

Sharing Java Code

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store