| FoxitPDFSDKforWeb v11.1.0 Archives Foxit PDF SDK for Web

Classes | Functions
shared
PDFViewCtrl

It's a module that contains some utility classes which encapsulates common operations such as Unit object processor. More...

## Classes
class | Color
| Class for processing color-related algorithms such as conversions. More...

## Functions
function | getRanges (intervals)
| Get the number range. More...
function | getUnitByName (unitName)
| Get the unit object by the unit name. More...
function | setThemeColor (colorInfo)
| Set custom theme color. More...

## Detailed Description

It's a module that contains some utility classes which encapsulates common operations such as Unit object processor.

## Function Documentation

## ◆ getRanges()

function getRanges | ( |  | intervals | ) |

Get the number range.

Parameters

  intervals | Array<[number,number]|number> - function example(){ var getRanges = PDFViewCtrl.shared.getRanges; getRanges([0,2],4,5) // [0, 1, 2, 4, 5] }

Returns
  number[] -

Since
  8.2.0

## ◆ getUnitByName()

function getUnitByName | ( |  | unitName | ) |

Get the unit object by the unit name.

Since
  8.0.0
  function example(){
  var getUnitByName = PDFViewCtrl.shared.getUnitByName;
  var unit = getUnitByName('inch')
  }

Parameters

  unitName | string

Returns
  Unit -

## ◆ setThemeColor()

function setThemeColor | ( |  | colorInfo | ) |

Set custom theme color.

Parameters

  colorInfo | Object[] - The color objects array.
  colorInfo[].dom | HTMLElement|string - The target DOM element. The default value is document.body.
  colorInfo[].colors | Object - The color object.

Since
  9.2.0
  setThemeColor([{
  dom: document.body,
  colors: {
  background: '#000000',
  }
  }])

@2026 Foxit Software Incorporated. All rights reserved.