new BarcodeOptions()
Options for PDFNet.BarcodeModule.BarcodeOptions
Members
-
<static> BarcodeOrientation
-
A set of flags used to specify the barcode orientation(s). Can be bitwise OR-ed to search for multiple orientations. Orientation only affects the following barcode types: e_linear, e_post_net_planet, e_four_state, e_gs1_databar_stacked, e_pdf417, e_micro_pdf417, e_patch_code and e_pharma_code.
Type:
- number
Properties:
Name Type Description e_horizontal
number e_vertical
number e_diagonal
number -
<static> BarcodeProfile
-
An enumeration used to specify the barcode detection profile.
Type:
- number
Properties:
Name Type Description e_high_quality_source_profile
number The default profile assumes an input quality of mediocre to high, such as vector graphics, or an average to high quality scan of a flat paper. This setting provides the fastest barcode read performance. e_low_quality_source_profile
number This profile is useful for scanned paper of very poor quality, such as a very low resolution or a lot of noise. The barcode read performance is slightly slower. e_small_barcodes_profile
number This profile is suitable for vector graphics or scanned paper containing an unusually small barcode. The barcode read performance is significantly slower. e_natural_picture_profile
number This profile should be selected for natural pictures, such as photographs of real-world objects that contain a barcode. The barcode read performance is significantly slower. -
<static> BarcodeTypeGroup
-
A set of flags used to specify a subset of barcode types. Can be bitwise OR-ed to combine multiple groups.
Type:
- number
Properties:
Name Type Description e_none
number e_linear
number e_post_net_planet
number e_four_state
number e_gs1_databar_stacked
number e_qr
number e_data_matrix
number e_aztec
number e_maxi
number e_micro_qr
number e_pdf417
number e_micro_pdf417
number e_patch_code
number e_pharma_code
number -
<static> OutputFormat
-
An enumeration used to specify the format of the data output.
Type:
- number
Properties:
Name Type Description e_auto
number The default setting. The barcode data will be decoded to a string if possible. Otherwise, a Base64-encoded binary stream will be used. e_binary
number The barcode data will be returned as a Base64-encoded binary stream.
Methods
-
getBarcodeOrientations()
-
Gets the value BarcodeOrientations from the options object. Specifies a set of barcode orientations to be searched for in the target PDF. This value can be created by bitwise OR-ing together various values from BarcodeOrientation to select the orientations of interest. By default, all orientations are searched for. Additional search directions can have a modest impact on search time. Orientation only affects the following barcode types: e_linear, e_post_net_planet, e_four_state, e_gs1_databar_stacked, e_pdf417, e_micro_pdf417, e_patch_code and e_pharma_code.
Returns:
The current value for BarcodeOrientations.- Type
- number
-
getBarcodeProfile()
-
Gets the value BarcodeProfile from the options object. Specifies the barcode detection profile. Depending on the type and quality of the input, specialized profiles may return a better result at the cost of a slight runtime performance penalty. Barcode detection has the best runtime performance on high quality sources with the default profile.
Returns:
The current value for BarcodeProfile.- Type
- number
Example
Return value: <pre> PDFNet.BarcodeModule.BarcodeOptions.BarcodeProfile = { e_high_quality_source_profile : 1 e_low_quality_source_profile : 2 e_small_barcodes_profile : 3 e_natural_picture_profile : 4 } </pre>
-
getBarcodeSearchTypes()
-
Gets the value BarcodeSearchTypes from the options object. Specifies a set of barcode types to be searched for in the target PDF. This value can be created by bitwise OR-ing together various values from BarcodeTypeGroup to select the types of interest. Searching for barcodes takes approximately linear time in the number of barcode types to be searched for. By specifying only the types of barcodes of interest, runtime may be significantly improved. By default, all types are searched for.
Returns:
The current value for BarcodeSearchTypes.- Type
- number
-
getDataOutputFormat()
-
Gets the value DataOutputFormat from the options object. Specifies the format of the data output. The default is "auto", which will attempt to decode the barcode data to a string if possible. Otherwise, a Base64-encoded binary stream will be used. If the data is known to be binary, the output format can be set to "binary" to avoid unnecessary decoding attempts. Data returned as binary will be stored in the "data" field of the barcode object in the output JSON, while decoded data will be stored in the "text" field.
Returns:
The current value for DataOutputFormat.- Type
- number
-
getPages()
-
Gets the value Pages from the options object. Specifies a range of pages on which to perform barcode extraction, such as "1-5", or "1-3,5,7-10". Open ended ranges are supported, e.g., "3-". By default all pages are converted. The first page is page number 1.
Returns:
The current value for Pages.- Type
- string
-
setBarcodeOrientations(value)
-
Sets the value for BarcodeOrientations in the options object. Specifies a set of barcode orientations to be searched for in the target PDF. This value can be created by bitwise OR-ing together various values from BarcodeOrientation to select the orientations of interest. By default, all orientations are searched for. Additional search directions can have a modest impact on search time. Orientation only affects the following barcode types: e_linear, e_post_net_planet, e_four_state, e_gs1_databar_stacked, e_pdf417, e_micro_pdf417, e_patch_code and e_pharma_code.
Parameters:
Name Type Description value
number The new value for BarcodeOrientations Returns:
This object, for call chaining. -
setBarcodeProfile(value)
-
Sets the value for BarcodeProfile in the options object. Specifies the barcode detection profile. Depending on the type and quality of the input, specialized profiles may return a better result at the cost of a slight runtime performance penalty. Barcode detection has the best runtime performance on high quality sources with the default profile.
Parameters:
Name Type Description value
number The new value for BarcodeProfile PDFNet.BarcodeModule.BarcodeOptions.BarcodeProfile = { e_high_quality_source_profile : 1 e_low_quality_source_profile : 2 e_small_barcodes_profile : 3 e_natural_picture_profile : 4 }
Returns:
This object, for call chaining. -
setBarcodeSearchTypes(value)
-
Sets the value for BarcodeSearchTypes in the options object. Specifies a set of barcode types to be searched for in the target PDF. This value can be created by bitwise OR-ing together various values from BarcodeTypeGroup to select the types of interest. Searching for barcodes takes approximately linear time in the number of barcode types to be searched for. By specifying only the types of barcodes of interest, runtime may be significantly improved. By default, all types are searched for.
Parameters:
Name Type Description value
number The new value for BarcodeSearchTypes Returns:
This object, for call chaining. -
setDataOutputFormat(value)
-
Sets the value for DataOutputFormat in the options object. Specifies the format of the data output. The default is "auto", which will attempt to decode the barcode data to a string if possible. Otherwise, a Base64-encoded binary stream will be used. If the data is known to be binary, the output format can be set to "binary" to avoid unnecessary decoding attempts. Data returned as binary will be stored in the "data" field of the barcode object in the output JSON, while decoded data will be stored in the "text" field.
Parameters:
Name Type Description value
number The new value for DataOutputFormat Returns:
This object, for call chaining. -
setPages(value)
-
Sets the value for Pages in the options object. Specifies a range of pages on which to perform barcode extraction, such as "1-5", or "1-3,5,7-10". Open ended ranges are supported, e.g., "3-". By default all pages are converted. The first page is page number 1.
Parameters:
Name Type Description value
string The new value for Pages Returns:
This object, for call chaining.