public class PdfResourceCounter extends Object
Constructor and Description |
---|
PdfResourceCounter(PdfObject obj)
Creates a PdfResourceCounter instance to be used to count the resources needed for either a page (in this case pass a page dictionary) or the trailer (root and info dictionary) of a PDF file.
|
Modifier and Type | Method and Description |
---|---|
long |
getLength(Map<Integer,PdfObject> res)
Returns the resources needed for the object that was used to create this PdfResourceCounter.
|
Map<Integer,PdfObject> |
getResources()
Returns a map with the resources.
|
protected void |
loopOver(PdfObject obj)
In case an object is an array, a dictionary or a stream, we need to loop over the entries and process them one by one.
|
protected void |
process(PdfObject obj)
Processes an object.
|
public PdfResourceCounter(PdfObject obj)
obj
- the object we want to examine
protected final void process(PdfObject obj)
obj
- the object to process
protected final void loopOver(PdfObject obj)
obj
- the object to examine
public Map<Integer,PdfObject> getResources()
public long getLength(Map<Integer,PdfObject> res)
res
- The resources that can be excluded when counting the bytes.
Copyright © 1998–2023 iText Group NV. All rights reserved.