public interface PdfObjectFilter
PdfObject.filter(PdfObjectFilter)
passes each object through
preFilter(PdfObject)
before
descending recursively into the object's contents (if it is a
container such as PdfArray
or PdfDictionary
). It then passes the (possibly modified) object
through postFilter(PdfObject)
for a
second opportunity to examine or modify the object. The modified
object is not required to be of the same type as the original
object.Modifier and Type | Method and Description |
---|---|
PdfObject |
postFilter(PdfObject obj)
Examines a PDF object and optionally returns a modified
object.
|
PdfObject |
preFilter(PdfObject obj)
Examines a PDF object and optionally returns a modified
object.
|
PdfObject preFilter(PdfObject obj) throws PdfFormatException
null
in order to discard the object;
however, this will cause postFilter(PdfObject)
to be called with a
null
value as its parameter. A PdfArray
or PdfDictionary
object is considered to be a container, and this method
filters the container as a whole before filtering each
element within it (assuming the elements are still present
in the modified object). When this method receives a
container, that container's contents will not yet have been
filtered by this method.obj
- the object to examine.PdfFormatException
PdfObject postFilter(PdfObject obj) throws PdfFormatException
null
in order to discard the object. A
PdfArray
or PdfDictionary
object is considered to be a container, and
this method filters each element within it before filtering
the container as a whole. When this method receives a
container, that container's contents will have already been
filtered by this method.obj
- the object to examine.PdfFormatException