Foxit PDF RDK

Public Member Functions | Static Public Attributes | List of all members
Barcode Class Reference
Inheritance diagram for Barcode:

## Public Member Functions
| constructor ()
| Constructor.
| GenerateBitmap (info, format, unit_width, height, level)
| Generate a barcode bitmap with a given information string and specified barcode format. More...
| IsEmpty ()
| Check whether current object is empty or not. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Static Public Attributes
static | e_FormatCode128
| Barcode format: Code128, including EAN128 code.
static | e_FormatCode39
| Enumeration for barcode format. More...
static | e_FormatEAN13
| Barcode format: EAN-13 code.
static | e_FormatEAN8
| Barcode format: EAN-8 code.
static | e_FormatITF
| Barcode format: ITF code.
static | e_FormatPDF417
| Barcode format: PDF-417 code.
static | e_FormatQRCode
| Barcode format: Quick Response Code.
static | e_FormatUPCA
| Barcode format: UPC-A code.
static | e_QRCorrectionLevelHigh
| The capability of recovery from 30% amounts of damage.
static | e_QRCorrectionLevelLow
| Enumeration for format error correction level of QR Code. More...
static | e_QRCorrectionLevelMedium
| The capability of recovery from 15% amounts of damage.
static | e_QRCorrectionLevelQuater
| The capability of recovery from 25% amounts of damage.

## Detailed Description

This class can be used to generate barcode bitmap.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ GenerateBitmap()

Barcode.GenerateBitmap | ( | info | ,
|  | format | ,
|  | unit_width | ,
|  | height | ,
|  | level |
| ) |  |

Generate a barcode bitmap with a given information string and specified barcode format.

Parameters

  [in] | info | Information string to be encoded to barcode bitmap. It should not be an empty string.
  [in] | format | Barcode format which is used to encode information string. Please refer to values starting from Barcode.e_FormatCode39 and this should be one of these values.
  [in] | unit_width | Unit width for barcode, in pixels. Valid values: from 1 to 5. If input value is below 1, 1 will be used by default; if input value is above 5, 5 will be used by default. The width of the bitmap will be equal to the product of this parameter and the width of the info encoding. Specially, for PDF-417 and QR Code, height will be ignored, and the height of bitmap will be equal to the product of this parameter and the height of the info encoding.
  [in] | height | The height for bitmap, in pixels. Valid values: equal to or above 20. If input value is below 20, 20 will be used by default. Specially, for PDF-417 and QR Code, height will be ignored, and the height of bitmap will be equal to the product of unit_width and the height of the info encoding.
  [in] | level | (Required only for QR Code) Error correction level. Please refer to values starting from Barcode.e_QRCorrectionLevelLow and this should be one of these values.

Returns
  A barcode bitmap.

## ◆ IsEmpty()

Barcode.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.

## Member Data Documentation

## ◆ e_FormatCode39

Barcode.e_FormatCode39
| static

Enumeration for barcode format.

Values of this enumeration should be used alone.

Barcode format: standard 39 code.

## ◆ e_QRCorrectionLevelLow

Barcode.e_QRCorrectionLevelLow
| static

Enumeration for format error correction level of QR Code.

Values of this enumeration should be used alone.

The capability of recovery from 7% amounts of damage.