Foxit PDF SDK

Public Member Functions | List of all members
FoxitPDFSDKPython2.LRContext Class Reference
Inheritance diagram for FoxitPDFSDKPython2.LRContext:

## Public Member Functions
def | LRContext (other)
| Constructor, with another context object. More...
def | GetRootElement ()
| Get the root element of structure tree. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...
def | StartParse (pause)
| Start to parse layout recognition for related PDF page. More...

## Detailed Description

This class can be used to parse layout recognition to get the root element.

## Constructor & Destructor Documentation

## ◆ LRContext()

def FoxitPDFSDKPython2.LRContext.LRContext | ( |  | other | ) |

Constructor, with another context object.

Parameters

  [in] | other | Another context object.

## Member Function Documentation

## ◆ GetRootElement()

def FoxitPDFSDKPython2.LRContext.GetRootElement | ( |  | ) |

Get the root element of structure tree.

Please ensure current context object has been parsed successfully before calling this function; otherwise, no valid root structure element can be retrieved.

Returns
  Root element.

## ◆ IsEmpty()

def FoxitPDFSDKPython2.LRContext.IsEmpty | ( |  | ) |

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ StartParse()

def FoxitPDFSDKPython2.LRContext.StartParse | ( |  | pause | ) |

Start to parse layout recognition for related PDF page.

It may take a long time to do parsing, so Foxit PDF SDK uses a progressive process to do this. If there is any error occurs in parsing progress, this function will throw exception. Please refer to class FoxitPDFSDKPython2 and values starting from FoxitPDFSDKPython2.e_ErrFile .

Parameters

  [in] | pause | Pause callback object which decides if the parsing process needs to be paused. This can be null which means not to pause during the parsing process. If this is not null, it should be a valid pause object implemented by user. Default value: null.

Returns
  A progressive object. Please check the rate of current progress by function FoxitPDFSDKPython2.Progressive.GetRateOfProgress . If the rate is not 100 yet, call function FoxitPDFSDKPython2.Progressive.Continue to continue the progress until the progress is finished.