Chapters
-
Introducing PDF and iText
-
Using iText's basic building blocks
-
Adding content at absolute positions
-
Organizing content in tables
-
Table, cell, and page events
-
Working with existing PDFs
-
Making documents interactive
-
Filling out interactive forms
-
Integrating iText in your web applications
-
Brightening up your PDF with color and images
-
Choosing the right font
-
Protecting your PDF
-
PDFs inside-out
-
The imaging model
-
Page content and structure
-
PDF streams
Chapter 12:
Protecting your PDF
< Chapter 11: Choosing the right font
Chapter 13: PDFs inside-out >
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.1.1: The Info dictionary
- 12.2: PDF and compression
- 12.2.1: Compression levels
- 12.2.2: Compressing and decompressing existing files
- 12.2.1: Compression levels
- 12.3: Encrypting a PDF document
- 12.3.1: Creating a password-encrypted PDF
- 12.3.2: Public-key encryption
- 12.3.1: Creating a password-encrypted PDF
- 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.4.1: Creating an unsigned signature field
- 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:
Figures
- Figure 12.1: Metadata in PDF files
- Figure 12.2: A protected public-key encrypted PDF document
- Figure 12.3: An opened public-key encrypted PDF document
- Figure 12.4: PDFs with signature fields
- Figure 12.5: PDF with a certifying signature
- Figure 12.6: Document with two signatures, of which one has "validity unknown"
- Figure 12.7: Document with two valid signatures
- Figure 12.8: Document with one valid and one invalid signature
- Figure 12.9: A signed PDF with a timestamp
Examples
- MetadataPdf
Keywords: Existing PDFs, Hello World, Metadata, PdfReader, PdfStamper - MetadataXmp
Keywords: Existing PDFs, eXtensible Metadata Platform, Hello World, Metadata, PdfReader, PdfStamper - HelloWorldCompression
Keywords: Compression, Decompressing PDFs, Existing PDFs, PdfReader, PdfStamper, Compression > compression levels, Compression > full compression - EncryptionPdf
Keywords: Decrypting PDFs, Encryption, eXtensible Metadata Platform, Hello World, Encryption > AES, Encryption > Alleged RC4 - EncryptWithCertificate
Keywords: Certificates, Decrypting PDFs, Encryption, Private key, Encryption > AES, Encryption > certificate encryption - SignatureField
Keywords: AcroForm technology, Certificates, Digital signatures, Private key, Signature fields, Annotation > widget annotations, PdfStamper > append mode, Signature fields > add empty signature field - Signatures
Keywords: Certificates, Digital signatures, Hello World, Private key, Signature fields, Digital signatures > extract revision, Digital signatures > sign a document more than once, Digital signatures > verify digital signatures, PdfStamper > append mode - SignatureExternalHash
Keywords: Certificates, Digital signatures, Private key, Signature fields, PdfStamper > append mode - SignWithBC
Keywords: Certificates, Digital signatures, Private key, Signature fields, PdfStamper > append mode - TimestampOCSP
Keywords: Certificates, Digital signatures, Online Certificate Status Protocol, Private key, Signature fields, Time stamp, PdfStamper > append mode
Content © 2010-2013 1T3XT BVBA
