PdePageMap class.
More...
PdePageMap class.
The PdePageMap object is a storage of all PdeElements whose were recognized on the page. A PdePageMap may be obtained from an existing page with the PdfPage::AcquirePageMap method. Once your application has the page's PdePageMap, it can get each logical element with GetElement method.
◆ AcquireElements()
virtual bool PdePageMap::AcquireElements |
( |
PdfCancelProc |
cancel_proc, |
|
|
void * |
cancel_data |
|
) |
| |
|
pure virtual |
Recreates a PdePageMap from the PdfPage's elements.
- Parameters
-
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
- Returns
- true if pagemap was generated successfuly, false otherwise.
◆ AddTags()
Adds tags.
- Parameters
-
element | Parent structure element. |
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
- Returns
- true if tags were added successfuly, false otherwise.
◆ CreateElement()
Creates an empty element of specific type.
- Parameters
-
params | Parameters of the newly created element. |
- Returns
- true Pointer to the newly created PDEElement.
◆ GetBBox()
virtual void PdePageMap::GetBBox |
( |
PdfRect * |
bbox | ) |
|
|
pure virtual |
Gets the bounding box for a pagemap. The bounding box is the rectangle that encloses all text, graphics, and images on the page.
- Parameters
-
bbox | (Filled by the method) A PdfRect specifying the page's box. |
- See also
- PdePageMap::GetWhitespace
◆ GetElement()
Gets the requested element from a pagemap. You should never depend on these objects lasting the lifetime of the pagemap. You should extract the information you need from he object immediately and refer to it no further in your code. NOTE: This method does not copy the element, so do not destroy it.
- Parameters
-
index | Index of element to obtain. |
- Returns
- The requested element.
- See also
- PdePageMap::GetNumElements
◆ GetPage()
virtual PdfPage* PdePageMap::GetPage |
( |
| ) |
|
|
pure virtual |
Return the page object of a page map.
- Returns
- the page object.
◆ GetWhitespace()
Searches for whitespaces at the page. They are sorted from biggest to smallest.
- Parameters
-
params | Whitespace parameters that specify which whitespace should be obtained. |
index | Index of whitespace to obtain. Set to zero for the first call. Update the index with each consecutive call of the method while result is true. |
bbox | (Filled by the method) A PdfRect specifying requested whitespace. |
- Returns
- This method returns true if whitespace with requested params exists, otherwise it returns false. Sample GetWhitespace
◆ Release()
virtual void PdePageMap::Release |
( |
| ) |
|
|
pure virtual |
Releases the pagemap resources at the current page. NOTE: The caller can call PdePageMap::Release to optimize a memory handling. Otherwise the page is responsible for freeing PdePageMap resources.
- Returns
- true if succeeded, false otherwise.
- See also
- PdfPage::AcquirePageMap