public final class DocumentStructureUtils extends Object
PdfDocument
.Modifier and Type | Method and Description |
---|---|
static List<com.itextpdf.kernel.pdf.PdfObject> |
search(com.itextpdf.kernel.pdf.PdfDocument document,
IPdfObjectPredicate predicate)
Collects all objects matches the provided predicate.
|
static void |
traverse(com.itextpdf.kernel.pdf.PdfDocument document,
IAction action)
Goes across all the structure of the document starting from indirect objects definition and
then through its children recursively.
|
public static List<com.itextpdf.kernel.pdf.PdfObject> search(com.itextpdf.kernel.pdf.PdfDocument document, IPdfObjectPredicate predicate)
document
- is a PdfDocument
to perform a searchpredicate
- is a IPdfObjectPredicate
public static void traverse(com.itextpdf.kernel.pdf.PdfDocument document, IAction action)
IAction.processIndirectObjectDefinition(PdfObject)
and every met object including
both types direct and indirect are is processed with IAction.processObject(PdfObject)
call. Allows to replace objects during traversing (see
IAction.processObject(PdfObject)
for details).document
- is a PdfDocument
to perform a traversingaction
- is an action to perform during traversingCopyright © 1998–2024 iText Group NV. All rights reserved.