PdsPageObject class.
More...
PdsPageObject class.
A PdsPageObject is a general object in a PDF page content, which may be of any PdsPageObject object type. The Object layer provides several methods that are not specific to any particular object.
◆ GetBBox()
virtual void PdsPageObject::GetBBox |
( |
PdfRect * |
bbox | ) |
|
|
pure virtual |
Gets the bounding box for an element in user space coordinates. To avoid the device-dependent effects of specifying objects in device space, PDF defines a device-independent coordinate system that always bears the same relationship to the current page, regardless of the output device on which printing or displaying occurs. This device-independent coordinate system is called user space. The origin of the user space(0, 0) represents the bottom-left corner of the PDF page. PDF files specify 72 points to 1 physical inch. The returned bounding box is guaranteed to encompass the element.
- Parameters
-
bbox | (Filled by the method) A pointer to a PdfRect structure specifying the bounding box of an element, specified in user space coordinates. |
◆ GetContentMark()
◆ GetGState()
Gets the graphic state of the page object.
- Parameters
-
g_state | (filled by method) A pointer to a PdfGraphicState structure specifying the graphic state of the page object. |
- Returns
- true if the graphic state was successfully retrieved. false othervise
◆ GetId()
virtual int PdsPageObject::GetId |
( |
| ) |
|
|
pure virtual |
Gets the ordinal number of a page object.
- Returns
- Object identifier.
◆ GetObjectType()
Gets the type of an object.
- Returns
- Object type, kObjectUnknown otherwise.
◆ GetPage()
virtual PdfPage* PdsPageObject::GetPage |
( |
| ) |
|
|
pure virtual |
Gets a reference to the page on which the object is present.
- Returns
- PdfPage object.
◆ GetStructObject()
virtual PdsObject* PdsPageObject::GetStructObject |
( |
bool |
struct_parent | ) |
|
|
pure virtual |
Gets the corresponding struct element object from the document structure tree. Iterates hierarchy of objects from the structure tree. If there is a reference to the current page object, a structure element object with this reference is returned.
- Parameters
-
struct_parent | If set to true, ParentTree is used in finding the structure element to which the page object belongs. |
- Returns
- PdsObject object corresponding to the found structure element, otherwise nullptr.
- See also
- PdsStructTree::AcquireStructElement
◆ SetGState()
Sets the graphics state information for the page object. This method is valid only for PdsForm, PdsImage, PdsPath, and PdsShading objects.
- Parameters
-
g_state | A pointer to a PdfGraphicState structure with graphics state information to set for the page object |
- Returns
- true if the graphic state was successfully set. false othervise
◆ SetMatrix()
virtual bool PdsPageObject::SetMatrix |
( |
PdfMatrix * |
matrix | ) |
|
|
pure virtual |
Sets the transformation matrix for the page object. This method is valid only for PdsImage object.
- Parameters
-
matrix | A pointer to a PdfMatrix structure |
- Returns
- true if the transformation matrix was successfully set. false othervise
◆ SetRender()
virtual void PdsPageObject::SetRender |
( |
bool |
render | ) |
|
|
pure virtual |
Set page object element to draw or not while rendering page content.
- Parameters
-
render | True if the object should be rendered. False othervise. |