Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.addon.ofd.OFDRenderer Class Reference
Inheritance diagram for com.foxit.sdk.addon.ofd.OFDRenderer:

## Public Member Functions
| OFDRenderer ()
| Constructor.
| OFDRenderer (Bitmap bitmap)
| Constructor, with a bitmap object. More...
| OFDRenderer (OFDRenderer other)
| Constructor, with another renderer object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
boolean | isEmpty ()
| Check whether current object is empty or not. More...
void | setColorMode (int color_mode) throws com.foxit.sdk.PDFException
| Set the color mode. More...
void | setContentFlag (int content_flag) throws com.foxit.sdk.PDFException
| Set the content flag. More...
Progressive | startRender (OFDPage page, Matrix2D matrix)
| Start to render an OFD page. More...
Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void | delete ()
| Clean up related C++ resources immediately. More...

## Static Public Attributes
static final int | e_ColorModeMapping = 2
| Map a color value to the color range defined by a background color and a foreground color.
static final int | e_ColorModeMappingGray = 1
| Map gray/white/black color value to background/foreground; for other colors, no change.
static final int | e_ColorModeNormal = 0
| Normal color mode.
static final int | e_ContentFlagAllContent = 0x00
| If set, all content will be rendered. This value should be used alone.
static final int | e_ContentFlagAnnot = 0x02
| If set, annotations will be rendered.(Excluding highlight annotation and stamp)
static final int | e_ContentFlagHighLightAnnots = 0x04
| If set, highlight annotations will be rendered.
static final int | e_ContentFlagPage = 0x01
| If set, page content will be rendered.
static final int | e_ContentFlagStampAnnots = 0x08
| If set, stamp annotations will be rendered.

## Detailed Description

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

See also
  com.foxit.sdk.common.Library

## Constructor & Destructor Documentation

## ◆ OFDRenderer() [1/2]

com.foxit.sdk.addon.ofd.OFDRenderer.OFDRenderer | ( | Bitmap | bitmap | ) |

Constructor, with a bitmap object.

Parameters

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

## ◆ OFDRenderer() [2/2]

com.foxit.sdk.addon.ofd.OFDRenderer.OFDRenderer | ( | OFDRenderer | other | ) |

Constructor, with another renderer object.

Parameters

  [in] | other | Another renderer object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.addon.ofd.OFDRenderer.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ isEmpty()

boolean com.foxit.sdk.addon.ofd.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()

void com.foxit.sdk.addon.ofd.OFDRenderer.setColorMode | ( | int | color_mode | ) | throws com.foxit.sdk.PDFException

Set the color mode.

Parameters

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

Returns
  None.

## ◆ setContentFlag()

void com.foxit.sdk.addon.ofd.OFDRenderer.setContentFlag | ( | int | content_flag | ) | throws com.foxit.sdk.PDFException

Set the content flag.

Parameters

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

Returns
  None.

## ◆ startRender()

Progressive com.foxit.sdk.addon.ofd.OFDRenderer.startRender | ( | OFDPage | page,
|  | Matrix2D | 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 OFDPage.getDisplayMatrix .

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