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

Chapter 11. Adding color and text

This chapter covers

  • PDF and Color spaces

  • Transparency and clipping

  • PDF’s text state

We already dealt with a great deal of the theory described in chapter 4 of the PDF Reference (”Graphics”). We’ll continue by discussing colors and colorspaces. Each object in PDF can be in 11 different colorspaces, but you don’t have to worry about that; iText provides color classes that hide the complex theory.

While we’re talking about color, we’ll also discuss rendering (chapter 6 of the PDF Reference) and transparency (chapter 7). You’ll also learn how to apply masks to an image.

We’ll complete this chapter by explaining how text state is implemented in iText. This will let you add street names to the map of Foobar.

Adding color to ...

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