Foxit PDF Conversion SDK

Public Member Functions | List of all members
fpdfconversionsdk.Range Class Reference

## Public Member Functions
def | AddSegment (start_index, end_index, filter)
| Add a new range segment. (Reverse ordering is legal.) More...
def | AddSingle (index)
| Add an index as a new range segment. More...
def | GetSegmentCount ()
| Get the count of range segments. More...
def | GetSegmentEnd (segment_index)
| Get the end index of a specified range segment. More...
def | GetSegmentStart (segment_index)
| Get the start index of a specified range segment. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...
def | RemoveAll ()
| Remove all range segments. More...

## Detailed Description

This class represents index range. Here, a range consists of one or more segments and each segment consists of one single index or a group of consecutive indexes.
For some special case, such as used in fpdfconversionsdk.PDF2OfficeSettingData , index values specified in this range represent page numbers directly instead of page indexes.

See also
  fpdfconversionsdk.PDF2OfficeSettingData

## Member Function Documentation

## ◆ AddSegment()

def fpdfconversionsdk.Range.AddSegment | ( |  | start_index,
|  |  | end_index,
|  |  | filter
| ) |  |

Add a new range segment. (Reverse ordering is legal.)

Parameters

  [in] | start_index | The start index of a new range segment.
  [in] | end_index | The end index of a new range segment.
  [in] | filter | Filter type to decide which indexes of this range would be used. Please refer to values starting from fpdfconversionsdk.RangeE_All and this should be one of these values. Default value: fpdfconversionsdk.RangeE_All . Specially, when this value is fpdfconversionsdk.RangeE_Even or fpdfconversionsdk.RangeE_Odd , that means each even or odd number within the specified range segment will be treated as a single segment.

Returns
  None.

## ◆ AddSingle()

def fpdfconversionsdk.Range.AddSingle | ( |  | index | ) |

Add an index as a new range segment.

Parameters

  [in] | index | An index to be added as a new range segment.

## ◆ GetSegmentCount()

def fpdfconversionsdk.Range.GetSegmentCount | ( |  | ) |

Get the count of range segments.

Returns
  The count of range segments.

## ◆ GetSegmentEnd()

def fpdfconversionsdk.Range.GetSegmentEnd | ( |  | segment_index | ) |

Get the end index of a specified range segment.

Parameters

  [in] | segment_index | The segment index. Valid range: 0 to (count-1). count is returned by function fpdfconversionsdk.Range.GetSegmentCount .

Returns
  The end index of a specified range segment.

## ◆ GetSegmentStart()

def fpdfconversionsdk.Range.GetSegmentStart | ( |  | segment_index | ) |

Get the start index of a specified range segment.

Parameters

  [in] | segment_index | The segment index. Valid range: 0 to (count-1). count is returned by function fpdfconversionsdk.Range.GetSegmentCount .

Returns
  The start index of a specified range segment.

## ◆ IsEmpty()

def fpdfconversionsdk.Range.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.

## ◆ RemoveAll()

def fpdfconversionsdk.Range.RemoveAll | ( |  | ) |

Remove all range segments.

Returns
  None.