PDFix SDK  5.0.27
PdePageMap Struct Referenceabstract

PdePageMap class. More...

Public Member Functions

virtual void Release ()=0
 
virtual PdeElementGetElement ()=0
 
virtual bool GetWhitespace (PdfWhitespaceParams *params, int index, _out_ 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 (_callback_ 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, _callback_ PdfCancelProc cancel_proc, void *cancel_data)=0
 Adds tags. 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::GetPageMap 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 ( _callback_ PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Recreates a PdePageMap from the PdfPage's elements.

Parameters
cancel_procCallback to check for canceling operations. A CancelProc is typically passed to some method that takes a long time to complete. At frequent intervals, the method calls the CancelProc. If it returns true, then the method cancels its operation; if false, it continues.
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,
_callback_ PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Adds tags.

Parameters
elementParent structure element.
cancel_procCallback to check for canceling operations. A CancelProc is typically passed to some method that takes a long time to complete. At frequent intervals, the method calls the CancelProc. If it returns true, then the method cancels its operation; if false, it continues.
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

◆ GetWhitespace()

virtual bool PdePageMap::GetWhitespace ( PdfWhitespaceParams params,
int  index,
_out_ 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