PDFix SDK  6.5.0
PdePageMap Struct Referenceabstract

PdePageMap class. More...

Public Member Functions

virtual void Release ()=0
 
virtual PdeElementGetElement ()=0
 
virtual bool GetWhitespace (PdfWhitespaceParams *params, int index, PdfRect *bbox)=0
 Searches for whitespaces at the page. They are sorted from biggest to smallest. More...
 
virtual void GetBBox (PdfRect *bbox)=0
 
virtual bool AcquireElements (PdfCancelProc cancel_proc, void *cancel_data)=0
 Recreates a PdePageMap from the PdfPage's elements. More...
 
virtual PdeElementCreateElement (PdfElementType type, PdeElement *parent)=0
 Creates an empty element of specific type. More...
 
virtual bool AddTags (PdsStructElement *element, PdfCancelProc cancel_proc, void *cancel_data)=0
 Adds tags. More...
 
virtual PdfPageGetPage ()=0
 Return the page object of a page map. More...
 

Detailed Description

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.

Member Function Documentation

◆ AcquireElements()

virtual bool PdePageMap::AcquireElements ( PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Recreates a PdePageMap from the PdfPage's elements.

Parameters
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if pagemap was generated successfuly, false otherwise.

◆ AddTags()

virtual bool PdePageMap::AddTags ( PdsStructElement element,
PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Adds tags.

Parameters
elementParent structure element.
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if tags were added successfuly, false otherwise.

◆ CreateElement()

virtual PdeElement* PdePageMap::CreateElement ( PdfElementType  type,
PdeElement parent 
)
pure virtual

Creates an empty element of specific type.

Parameters
paramsParameters 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()

virtual PdeElement* PdePageMap::GetElement ( )
pure virtual

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
indexIndex 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()

virtual bool PdePageMap::GetWhitespace ( PdfWhitespaceParams params,
int  index,
PdfRect bbox 
)
pure virtual

Searches for whitespaces at the page. They are sorted from biggest to smallest.

Parameters
paramsWhitespace parameters that specify which whitespace should be obtained.
indexIndex 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