CHAPTER 3
66
Syntax
Some filters may take parameters to control how they operate. These optional
parameters are specified by the
DecodeParms
entry in the stream’s dictionary (or
the
FDecodeParms
entry if the stream is external).
PDF supports a standard set of filters that fall into two main categories:
•
ASCII filters
enable decoding of arbitrary 8-bit binary data that has been en-
coded as ASCII text. (See Section 3.1, “Lexical Conventions,” for an explanation
of why this type of encoding might be useful.) Note that ASCII filters serve no
useful purpose in a PDF file that is encrypted; see Section 3.5, “Encryption.”
•
Decompression filters
enable decoding of data that has been compressed. The
compressed data is always in 8-bit binary format, even if the original data is
ASCII text. (Compression is particularly valuable for large sampled images,
since it reduces storage requirements and transmission time. Some types of
compression are
lossy,
meaning that some data is lost during the encoding, re-
sulting in a loss of quality when the data is decompressed. Compression in
which no loss of data occurs is called
lossless.)
The standard filters are summarized in Table 3.5, which also indicates whether
they accept any optional parameters. The following sections describe these filters
and their parameters (if any) in greater detail, including specifications of
encoding algorithms for some filters. (See also implementation notes 9 and 10 in
was compressed using the LZW compression method and then encoded in ASCII
base-85 representation. Example 3.3 shows the same stream without any
encoding. (The stream’s contents are explained in Section 3.7.1, “Content