Using Watermarks in iText 7

Preface

The iText 7 is a powerful library for PDF manipulation. This article is the third one in the dedicated series to the iText library. The previous articles in this series are:

There are several articles for adding a watermark into PDF (e.g. https://kb.itextpdf.com/home/it7kb/faq/how-to-watermark-pdfs-using-text-or-images). Unfortunately, none of them served me well. This led me to summarizing my investigation here.

Using Barcodes in iText 7

In my previous article, I reviewed the basics of iText 7. Here, I focus on the barcode support provided by the iText 7 library. Firstly, I'll provide a short overview of barcodes, and then demonstrate barcode generation for every supported barcode type in the library.

Overview

Here is a simple definition of ‘barcode’ according to Wikipedia:

Introduction to iText 7

Overview

In this article, I will introduce the latest version of the iText 7 library. I will provide an example of how to generate a PDF using the library and some methods for testing PDF content. This will be followed by examples of styling texts or paragraphs. To start, I'll begin with a short overview of the library to provide readers with a better understanding of the concept.

Purpose of iText Library

The iText library can be used to manipulate almost any PDF. It can be used to create static or dynamic PDFs and manipulate already existing PDFs with minimum concern for the PDF standards. The library is a collection of several components, but the primary concern of this article is the IText Core component. See some definitions from the iText site.