O'Reilly logo

iText in Action: Creating and Manipulating PDF by Bruno Lowagie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Creating barcodes

We briefly discussed the abstract class com.lowagie.text.pdf.Barcode in chapter 5, and appendix A section A.5 gave you an overview of the Barcode subclasses. These classes provide a user-friendly way to create an Image instance that represents a barcode.

This could be a com.lowagie.text.Image or a java.awt.Image class. There’s also a method to place the barcode on a PdfContentByte object and to create a PdfTemplate containing the barcode.

In this appendix, which is a specific extension of chapter 5, we’ll look at an example of every barcode type supported in iText.

Barcodes to identify products

If you live in America or Canada and you go to your retail store, you’re probably familiar with Universal Product Code (UPC

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required