Package com.itextpdf.text.pdf.mc
Class StructureItem
java.lang.Object
com.itextpdf.text.pdf.mc.StructureItem
- Direct Known Subclasses:
StructureMCID
,StructureObject
The abstract StructureItem class is extended by StructureMCID and StructureObject.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The object number of the page to which this structure item belongs. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
checkMCID
(int pageref, int mcid) Checks if an MCID corresponds with the MCID stored in the StructureItem.int
checkStructParent
(int pageref, int structParent) Checks if a StructParent corresponds with the StructParent stored in the StructureItem.int
Returns the number of the page object to which the structure item belongs.
-
Field Details
-
pageref
protected int pagerefThe object number of the page to which this structure item belongs.
-
-
Constructor Details
-
StructureItem
public StructureItem()
-
-
Method Details
-
getPageref
public int getPageref()Returns the number of the page object to which the structure item belongs.- Returns:
- a number of the reference of a page
-
checkMCID
public int checkMCID(int pageref, int mcid) Checks if an MCID corresponds with the MCID stored in the StructureItem.- Parameters:
pageref
- the page reference that needs to be checkedmcid
- the MCID that needs to be checked- Returns:
- 0 in case there's no MCID (in case of a StructureObject), 1 in case the MCID matches, -1 in case there's no match.
-
checkStructParent
public int checkStructParent(int pageref, int structParent) Checks if a StructParent corresponds with the StructParent stored in the StructureItem.- Parameters:
pageref
- the page reference that needs to be checkedstructParent
- the structParent that needs to be checked- Returns:
- 0 in case there's no StructParent (in case of a StructureMCID) 1 in case the StructParent matches, -1 in case there's no match.
-