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.
◆ CopyToContent()
Copies object to another content.
- Parameters
-
matrix | A pointer to a PdfMatrix structure |
index | A index where to put a new element into the content. |
- Returns
- newly created page object
◆ GetBBox()
virtual void PdsPageObject::GetBBox |
( |
PdfRect * |
bbox | ) |
const |
|
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()
◆ GetDoc()
virtual PdfDoc* PdsPageObject::GetDoc |
( |
| ) |
|
|
pure virtual |
Gets a reference to a document object.
- Returns
- PdfDoc object.
◆ 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 otherwise
◆ GetId()
virtual int PdsPageObject::GetId |
( |
| ) |
|
|
pure virtual |
Gets the ordinal number of a page object.
- Returns
- Object identifier.
◆ GetMcid()
virtual int PdsPageObject::GetMcid |
( |
| ) |
|
|
pure virtual |
Gets content mark ID for this object or -1 if the object does not have MCID property.
- Returns
- the content mark ID
- See also
- PdsContentMark::GetContentMark
◆ GetNumEqualTags()
virtual int PdsPageObject::GetNumEqualTags |
( |
PdsPageObject * |
object | ) |
|
|
pure virtual |
Count the number of different tags within the marked content of the two page objects.
- Parameters
-
- Returns
- the number of different tags
◆ 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.
◆ GetParentContent()
virtual PdsContent* PdsPageObject::GetParentContent |
( |
| ) |
|
|
pure virtual |
Gets a reference to the content in which the object is present.
- Returns
- PdsContent object.
◆ GetQuad()
virtual void PdsPageObject::GetQuad |
( |
PdfQuad * |
quad | ) |
const |
|
pure virtual |
Gets the quad for an element in user space coordinates. See GetBBox for more info. The returned quad is guaranteed to encompass the element.
- Parameters
-
quad | (Filled by the method) A pointer to a PdfQuad structure specifying the bounding quad of an element, specified in user space coordinates. |
◆ GetStateFlags()
virtual int PdsPageObject::GetStateFlags |
( |
| ) |
const |
|
pure virtual |
Get the object state flags.
- Returns
- the object state flags as PdfStateFlags.
◆ 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::GetStructElementFromObject
◆ MoveToContent()
virtual bool PdsPageObject::MoveToContent |
( |
PdsContent * |
content, |
|
|
int |
index |
|
) |
| |
|
pure virtual |
Moves object to another content.
- Parameters
-
content | A pointer to a PdsContent structure |
index | A index where to put a new element into the content. |
- Returns
- true if successfull, false otherwise
◆ MoveToObject()
virtual bool PdsPageObject::MoveToObject |
( |
PdsPageObject * |
ref_obj, |
|
|
bool |
after, |
|
|
int |
dst_tag_index, |
|
|
int |
obj_tag_index |
|
) |
| |
|
pure virtual |
Moves object within a content to another position.
- Parameters
-
ref_obj | A pointer to a PdsPageObject which is a reference object to move the object to |
after | If true the object is moved after the reference object, false othervise |
dst_tag_index | A index of the last marked content tag of the reference object, which will be applied to the object |
obj_tag_index | A index of the first marked content tag of the object, which will ramain set in the object marked content |
- Returns
- true if successfull, false otherwise
◆ RegisterEvent()
Registers a user-supplied procedure to call when the specified event occurs.
- Parameters
-
type | The event type. |
proc | A user-supplied callback to call when the event occurs. |
data | A pointer to user-supplied data to pass to proc each time it is called. |
- Returns
- true if event was registered, false otherwise. Sample RegisterEvent
◆ RemoveTags()
virtual bool PdsPageObject::RemoveTags |
( |
PdfContentMarkFlags |
flags | ) |
|
|
pure virtual |
Remove pbject marked content tags. Method removes for example all content marks, artifact tag or mcid property
- Parameters
-
flags | the PdfContentMarkFlags flags to be used |
- Returns
- the content mark ID
- See also
- PdsContentMark::GetContentMark
◆ 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 otherwise
◆ SetMatrix()
virtual bool PdsPageObject::SetMatrix |
( |
const 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 otherwise
◆ SetStateFlags()
virtual bool PdsPageObject::SetStateFlags |
( |
int |
flags | ) |
|
|
pure virtual |
Set the object state flags.
- Parameters
-
flags | the PdfStateFlags flags to be set |
- Returns
- true if the object's state flags was set false otherwise
◆ UnregisterEvent()
Unregisters a user-supplied procedure to call when the specified event occurs. To un-register, you must use same type, proc and data that were used when the event was registered using Pdfix::RegisterEvent.
- Parameters
-
type | The registered event type. |
proc | A registered user-supplied callback. |
data | A pointer to registered user-supplied data. |
- Returns
- true if event was registered, false otherwise.