| FoxitPDFSDKforWeb v11.0.5 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
Unit Class Reference
PDF » util

Unit object. More...

Inherited by PixelUnit.

## Public Member Functions
| convertAreaTo (value, targetUnit)
| Conversion per unit area. More...
| convertTo (value, targetUnit)
| Unit conversion. More...

## Detailed Description

Unit object.

Since
  8.0.0

## Member Function Documentation

## ◆ convertAreaTo()

Unit::convertAreaTo | ( |  | value,
|  |  | targetUnit
| ) |  |
| inline

Conversion per unit area.

Parameters

  value | number -
  targetUnit | Unit - target Unit Object function example(){ var getUnitByName = UIExtension.PDFViewCtrl.shared.getUnitByName; var value = getUnitByName('inch').convertAreaTo(1,getUnitByName('mm')) }

Since
  8.0.0

Returns
  number -

## ◆ convertTo()

Unit::convertTo | ( |  | value,
|  |  | targetUnit
| ) |  |
| inline

Unit conversion.

Parameters

  value | number -
  targetUnit | Unit - target Unit Object function example(){ var getUnitByName = UIExtension.PDFViewCtrl.shared.getUnitByName; var value = getUnitByName('inch').convertTo(1,getUnitByName('mm')) }

Since
  8.0.0

Returns
  number -

@2025 Foxit Software Incorporated. All rights reserved.