Chapter 12: Protecting your PDF

Chapter 12 of the book iText in Action 2E covers:
  • Providing metadata
  • Compressing and decompressing PDFs
  • Encrypting documents
  • Adding digital signatures
In this chapter, you'll discover that you can add different types of metadata to a PDF document. You'll use compression of content streams to reduce the file size, and you'll use the decompression methods to inspect the PDF syntax that is used to describe the content of a page.
In the sections about encryption and digital signatures, you'll protect PDF files with a password, and you'll use public-key cryptography to encrypt, decrypt, and digitally sign a PDF document. You'll work with key stores and certificates, signing documents in different ways. You'll also learn about Certificate and Time Stamp Authorities, about Certificate Revocation Lists (CRLs) and the Online Certificate Status Protocol (OCSP).
  • 12.1: Adding metadata
    • 12.1.1: The Info dictionary
    • 12.1.2: The Extensible Metadata Platform (XMP)
  • 12.2: PDF and compression
    • 12.2.1: Compression levels
    • 12.2.2: Compressing and decompressing existing files
  • 12.3: Encrypting a PDF document
    • 12.3.1: Creating a password-encrypted PDF
    • 12.3.2: Public-key encryption
  • 12.4: Digital signatures, OCSP, and timestamping
    • 12.4.1: Creating an unsigned signature field
    • 12.4.2: Signing a PDF
    • 12.4.3: Adding multiple signatures
    • 12.4.4: Verifying the signatures in a document
    • 12.4.5: Creating the digest and signing externally
    • 12.4.6: CRLs, OCSP, and timestamping
    • 12.4.7: PDF Advanced Electronic Signature (PAdES) profiles
  • 12.5: Summary
Consult the full table of contents, take a look at the illustrations from this chapter, or try out some of the examples: