Foxit PDF SDK
fsdk.Barcode Class Reference

Public Member Functions

def GenerateBitmap (info, format, unit_width, height, level)
 Generate a barcode bitmap with a given information string and specified barcode format.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 

Detailed Description

This class can be used to generate barcode bitmap.

Member Function Documentation

◆ GenerateBitmap()

def fsdk.Barcode.GenerateBitmap (   info,
  format,
  unit_width,
  height,
  level 
)

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

Parameters
[in]infoInformation string to be encoded to barcode bitmap. It should not be an empty string.
[in]formatBarcode format which is used to encode information string. Please refer to values starting from fsdk.BarcodeE_FormatCode39 and this should be one of these values.
[in]unit_widthUnit 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]heightThe 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 fsdk.BarcodeE_QRCorrectionLevelLow and this should be one of these values.
Returns
A barcode bitmap.

◆ IsEmpty()

def fsdk.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.