Foxit PDF SDK

Public Member Functions | List of all members
FoxitPDFSDKPython3.IconProviderCallback Class Reference

Inherits FoxitPDFSDKPython3._object.

## Public Member Functions
def | CanChangeColor (annot_type, icon_name)
| A callback function used to check if current icon provider supports to change color for a specified type. More...
def | GetDisplayHeight (annot_type, icon_name)
| A callback function used to get the height for display of a specified icon, in device size(pixel normally). More...
def | GetDisplayWidth (annot_type, icon_name)
| A callback function used to get the width for display of a specified icon, in device size(pixel normally). More...
def | GetIcon (annot_type, icon_name, color, annot_dict)
| A callback function used to get the icon as PDF page contents for a specified type. More...
def | GetProviderID ()
| A callback function used to get provider ID. More...
def | GetProviderVersion ()
| A callback function used to get provider version. More...
def | GetShadingColor (annot_type, icon_name, referenced_color, shading_index, out_shading_color)
| A callback function used to get the shading colors if current icon provider supports for a specified type. Currently, only support Type-2 shading settings with two color values. More...
def | HasIcon (annot_type, icon_name)
| A callback function used to check if current icon provider supports icon for a specified type. More...
def | Release ()
| A callback function used to release current callback object itself. More...

## Detailed Description

This class represents a callback object as customized annotation icon provider. All the functions in this class are used as callback functions. Pure virtual functions should be implemented by user and user can also choose to implement some or all the reset virtual functions when necessary. Icon provider can only be used for note, file attachment, stamp annotations.
Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers by callback functions FoxitPDFSDKPython3.IconProviderCallback.GetProviderID and FoxitPDFSDKPython3.IconProviderCallback.GetProviderVersion .

## Member Function Documentation

## ◆ CanChangeColor()

def FoxitPDFSDKPython3.IconProviderCallback.CanChangeColor | ( |  | annot_type,
|  |  | icon_name
| ) |  |

A callback function used to check if current icon provider supports to change color for a specified type.

Parameters

  [in] | annot_type | The annotation type. It should be one of FoxitPDFSDKPython3.Annot.e_Note , FoxitPDFSDKPython3.Annot.e_FileAttachment and FoxitPDFSDKPython3.Annot.e_Stamp .
  [in] | icon_name | Icon name of the annotation.

Returns
  true means current icon provider supports to change color for a specified icon type, while false means not support.

## ◆ GetDisplayHeight()

def FoxitPDFSDKPython3.IconProviderCallback.GetDisplayHeight | ( |  | annot_type,
|  |  | icon_name
| ) |  |

A callback function used to get the height for display of a specified icon, in device size(pixel normally).

Parameters

  [in] | annot_type | The annotation type. It should be one of FoxitPDFSDKPython3.Annot.e_Note , FoxitPDFSDKPython3.Annot.e_FileAttachment and FoxitPDFSDKPython3.Annot.e_Stamp .
  [in] | icon_name | Icon name of the annotation.

Returns
  The height for display.

## ◆ GetDisplayWidth()

def FoxitPDFSDKPython3.IconProviderCallback.GetDisplayWidth | ( |  | annot_type,
|  |  | icon_name
| ) |  |

A callback function used to get the width for display of a specified icon, in device size(pixel normally).

Parameters

  [in] | annot_type | The annotation type. It should be one of FoxitPDFSDKPython3.Annot.e_Note , FoxitPDFSDKPython3.Annot.e_FileAttachment and FoxitPDFSDKPython3.Annot.e_Stamp .
  [in] | icon_name | Icon name of the annotation.

Returns
  The width for display.

## ◆ GetIcon()

def FoxitPDFSDKPython3.IconProviderCallback.GetIcon | ( |  | annot_type,
|  |  | icon_name,
|  |  | color,
|  |  | annot_dict
| ) |  |

A callback function used to get the icon as PDF page contents for a specified type.

Parameters

  [in] | annot_type | The annotation type. It should be one of FoxitPDFSDKPython3.Annot.e_Note , FoxitPDFSDKPython3.Annot.e_FileAttachment and FoxitPDFSDKPython3.Annot.e_Stamp .
  [in] | icon_name | Icon name of the annotation.
  [in] | color | The icon color of the annotation. Format: 0xAARRGGBB.
  [in] | annot_dict | The annotation dictionary.

Returns
  A PDF page object whose content would be used as the icon.

## ◆ GetProviderID()

def FoxitPDFSDKPython3.IconProviderCallback.GetProviderID | ( |  | ) |

A callback function used to get provider ID.

Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers.

Returns
  The provider ID.

## ◆ GetProviderVersion()

def FoxitPDFSDKPython3.IconProviderCallback.GetProviderVersion | ( |  | ) |

A callback function used to get provider version.

Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers.

Returns
  Version string.

## ◆ GetShadingColor()

def FoxitPDFSDKPython3.IconProviderCallback.GetShadingColor | ( |  | annot_type,
|  |  | icon_name,
|  |  | referenced_color,
|  |  | shading_index,
|  |  | out_shading_color
| ) |  |

A callback function used to get the shading colors if current icon provider supports for a specified type. Currently, only support Type-2 shading settings with two color values.

Parameters

  [in] | annot_type | The annotation type. It should be one of FoxitPDFSDKPython3.Annot.e_Note , FoxitPDFSDKPython3.Annot.e_FileAttachment and FoxitPDFSDKPython3.Annot.e_Stamp .
  [in] | icon_name | Icon name of the annotation.
  [in] | referenced_color | Referenced color. Format: 0xRRGGBB.
  [in] | shading_index | Index color of shading, starting from 0. If shading colors are more than one, this function will be called multiple times.
  [out] | out_shading_color | Output parameter that receives the two shading color value.

Returns
  true means success, while false means failure.

## ◆ HasIcon()

def FoxitPDFSDKPython3.IconProviderCallback.HasIcon | ( |  | annot_type,
|  |  | icon_name
| ) |  |

A callback function used to check if current icon provider supports icon for a specified type.

Parameters

  [in] | annot_type | The annotation type. It should be one of FoxitPDFSDKPython3.Annot.e_Note , FoxitPDFSDKPython3.Annot.e_FileAttachment and FoxitPDFSDKPython3.Annot.e_Stamp .
  [in] | icon_name | Icon name of the annotation.

Returns
  true means current icon provider supports the specified icon, while false means not support.

## ◆ Release()

def FoxitPDFSDKPython3.IconProviderCallback.Release | ( |  | ) |

A callback function used to release current callback object itself.

Returns
  None.