public class PdfRenumberOffset extends java.lang.Object implements PdfObjectFilter
PdfObjectFilter is used to filter the indirect
references. This class is synchronized.| Modifier and Type | Field and Description |
|---|---|
protected int |
_offset
The offset value to add to each object number.
|
protected boolean |
_resetG
Controls whether generation numbers will be set to 0 during
the renumbering process.
|
| Constructor and Description |
|---|
PdfRenumberOffset()
Constructs a
PdfRenumberOffset instance. |
| Modifier and Type | Method and Description |
|---|---|
PdfObject |
postFilter(PdfObject obj)
This method is used by
renumber(PdfObject) to filter indirect references and
should not be called externally. |
PdfObject |
preFilter(PdfObject obj)
This method is used by
renumber(PdfObject) to filter indirect references and
should not be called externally. |
PdfObject |
renumber(PdfObject obj)
Adds an offset to the object number in each
PdfReference within the specified object. |
void |
resetGeneration(boolean reset)
Controls whether generation numbers will be set to 0 during
the renumbering process.
|
void |
setOffset(int offset)
Sets the offset value to add to each object number during
renumbering.
|
protected int _offset
protected boolean _resetG
true.public PdfRenumberOffset()
PdfRenumberOffset instance. By
default, generation numbers will not be modified (see
resetGeneration(boolean)). The offset value defaults to 0
(see setOffset(int)).public void setOffset(int offset)
offset - the offset to use.public void resetGeneration(boolean reset)
reset - if true, generation numbers will
be set to 0; otherwise they are not modified.public PdfObject renumber(PdfObject obj) throws PdfFormatException
PdfReference within the specified object.
The generation number may optionally be reset to 0 (see
resetGeneration(boolean)). The offset is specified with
setOffset(int).obj - the object to renumber.PdfFormatExceptionpublic PdfObject preFilter(PdfObject obj) throws PdfFormatException
renumber(PdfObject) to filter indirect references and
should not be called externally. (It is not
synchronized.)preFilter in interface PdfObjectFilterobj - the object to filter.PdfFormatExceptionpublic PdfObject postFilter(PdfObject obj) throws PdfFormatException
renumber(PdfObject) to filter indirect references and
should not be called externally. (It is not
synchronized.)postFilter in interface PdfObjectFilterobj - the object to filter.PdfFormatException