Foxit PDF SDK

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

## Public Member Functions
def | OFDRenderer ()
| Constructor. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...
def | SetColorMode (color_mode)
| Set the color mode. More...
def | SetContentFlag (content_flag)
| Set the content flag. More...
def | StartRender (page, matrix)
| Start to render an OFD page. More...

## Static Public Attributes
| e_ColorModeMapping = _fsdk.OFDRenderer_e_ColorModeMapping
| Map a color value to the color range defined by a background color and a foreground color.
| e_ColorModeMappingGray = _fsdk.OFDRenderer_e_ColorModeMappingGray
| Map gray/white/black color value to background/foreground; for other colors, no change.
| e_ColorModeNormal = _fsdk.OFDRenderer_e_ColorModeNormal
| Normal color mode.
| e_ContentFlagAllContent = _fsdk.OFDRenderer_e_ContentFlagAllContent
| If set, all content will be rendered. This value should be used alone.
| e_ContentFlagAnnot = _fsdk.OFDRenderer_e_ContentFlagAnnot
| If set, annotations will be rendered.(Excluding highlight annotation and stamp)
| e_ContentFlagHighLightAnnots = _fsdk.OFDRenderer_e_ContentFlagHighLightAnnots
| If set, highlight annotations will be rendered.
| e_ContentFlagPage = _fsdk.OFDRenderer_e_ContentFlagPage
| If set, page content will be rendered.
| e_ContentFlagStampAnnots = _fsdk.OFDRenderer_e_ContentFlagStampAnnots
| If set, stamp annotations will be rendered.

## Detailed Description

This class is used to render an OFD page to a bitmap. Please ensure FoxitPDFSDKPython2.Library.InitializeOFDEngine has been called successfully before using this class.

See also
  FoxitPDFSDKPython2.Library

## Constructor & Destructor Documentation

## ◆ OFDRenderer()

def FoxitPDFSDKPython2.OFDRenderer.OFDRenderer | ( |  | ) |

Constructor.

Constructor, with another renderer object.

Constructor, with a bitmap object.

Parameters

  [in] | bitmap | A bitmap object. It should not be an empty bitmap.
  [in] | other | Another renderer object.

## Member Function Documentation

## ◆ IsEmpty()

def FoxitPDFSDKPython2.OFDRenderer.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.

## ◆ SetColorMode()

def FoxitPDFSDKPython2.OFDRenderer.SetColorMode | ( |  | color_mode | ) |

Set the color mode.

Parameters

  [in] | color_mode | Color mode. Please refer to values starting from FoxitPDFSDKPython2.OFDRenderer.e_ColorModeNormal and this should be one of these values. The default value is FoxitPDFSDKPython2.OFDRenderer.e_ColorModeNormal .

Returns
  None.

## ◆ SetContentFlag()

def FoxitPDFSDKPython2.OFDRenderer.SetContentFlag | ( |  | content_flag | ) |

Set the content flag.

Parameters

  [in] | content_flag | Content flag. Please refer to values starting from FoxitPDFSDKPython2.OFDRenderer.e_ContentFlagAllContent and this can be one or a combination of these values. The default value is FoxitPDFSDKPython2.OFDRenderer.e_ContentFlagAllContent .

Returns
  None.

## ◆ StartRender()

def FoxitPDFSDKPython2.OFDRenderer.StartRender | ( |  | page,
|  |  | matrix
| ) |  |

Start to render an OFD page.

This function is used to start to render an OFD page.

Parameters

  [in] | page | An OFD page object. It should not be an empty object.
  [in] | matrix | A matrix for rendering the page, which is usually returned by function FoxitPDFSDKPython2.OFDPage.GetDisplayMatrix .

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.