Loading...
Searching...
No Matches
pdftron::PDF::BarcodeOptions Class Reference

`#include <BarcodeOptions.h>`

Inheritance diagram for pdftron::PDF::BarcodeOptions:

## Public Types
enum | BarcodeTypeGroup { e_none = 0 , e_linear = 1 , e_post_net_planet = 2 , e_four_state = 4 , e_gs1_databar_stacked = 8 , e_qr = 16 , e_data_matrix = 32 , e_aztec = 64 , e_maxi = 128 , e_micro_qr = 256 , e_pdf417 = 512 , e_micro_pdf417 = 1024 , e_patch_code = 2048 , e_pharma_code = 4096 }
enum | BarcodeOrientation { e_horizontal = 1 , e_vertical = 2 , e_diagonal = 4 }
enum | BarcodeProfile { e_high_quality_source_profile = 1 , e_low_quality_source_profile = 2 , e_small_barcodes_profile = 3 , e_natural_picture_profile = 4 }
enum | OutputFormat { e_auto = 0 , e_binary = 1 }

## Public Member Functions
| BarcodeOptions ()
| ~BarcodeOptions ()
UInt32 | GetBarcodeOrientations ()
BarcodeOptions & | SetBarcodeOrientations (UInt32 value)
BarcodeProfile | GetBarcodeProfile ()
BarcodeOptions & | SetBarcodeProfile (BarcodeProfile value)
UInt32 | GetBarcodeSearchTypes ()
BarcodeOptions & | SetBarcodeSearchTypes (UInt32 value)
OutputFormat | GetDataOutputFormat ()
BarcodeOptions & | SetDataOutputFormat (OutputFormat value)
UString | GetPages ()
BarcodeOptions & | SetPages (const UString &value)
Public Member Functions inherited from pdftron::PDF::OptionsBase
| OptionsBase ()

## Additional Inherited Members
Static Public Member Functions inherited from pdftron::PDF::OptionsBase
static SDF::Obj | GetArray (SDF::Obj dict, const char *key)
static void | PutNumber (SDF::Obj dict, const char *key, double num)
static void | PutBool (SDF::Obj dict, const char *key, bool val)
static void | PutText (SDF::Obj dict, const char *key, const UString &text)
static void | PutRect (SDF::Obj dict, const char *key, const Rect &rect)
static void | PushBackNumber (SDF::Obj dict, const char *key, double num)
static void | PushBackBool (SDF::Obj dict, const char *key, bool val)
static void | PushBackText (SDF::Obj dict, const char *key, const UString &text)
static void | PushBackRect (SDF::Obj dict, const char *key, const Rect &rect)
static Rect | RectFromArray (SDF::Obj nums)
static void | InsertRectCollection (SDF::Obj dict, const char *key, const RectCollection &rects, int index)
static Rect | RectFromArray (void *)
static double | ColorPtToNumber (const ColorPt &cp)
static ColorPt | ColorPtFromNumber (double dnum)

## Detailed Description

Definition at line 9 of file BarcodeOptions.h.

## Member Enumeration Documentation

## ◆ BarcodeOrientation

enum pdftron::PDF::BarcodeOptions::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.

Enumerator
e_horizontal |
e_vertical |
e_diagonal |

Definition at line 41 of file BarcodeOptions.h.

## ◆ BarcodeProfile

enum pdftron::PDF::BarcodeOptions::BarcodeProfile

An enumeration used to specify the barcode detection profile.

Enumerator
e_high_quality_source_profile | 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 | 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 | 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 | 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.

Definition at line 51 of file BarcodeOptions.h.

## ◆ BarcodeTypeGroup

enum pdftron::PDF::BarcodeOptions::BarcodeTypeGroup

A set of flags used to specify a subset of barcode types. Can be bitwise OR-ed to combine multiple groups.

Enumerator
e_none |
e_linear |
e_post_net_planet |
e_four_state |
e_gs1_databar_stacked |
e_qr |
e_data_matrix |
e_aztec |
e_maxi |
e_micro_qr |
e_pdf417 |
e_micro_pdf417 |
e_patch_code |
e_pharma_code |

Definition at line 16 of file BarcodeOptions.h.

## ◆ OutputFormat

enum pdftron::PDF::BarcodeOptions::OutputFormat

An enumeration used to specify the format of the data output.

Enumerator
e_auto | 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 | The barcode data will be returned as a Base64-encoded binary stream.

Definition at line 62 of file BarcodeOptions.h.

## Constructor & Destructor Documentation

## ◆ BarcodeOptions()

pdftron::PDF::BarcodeOptions::BarcodeOptions | ( |  | ) |

## ◆ ~BarcodeOptions()

pdftron::PDF::BarcodeOptions::~BarcodeOptions | ( |  | ) |

## Member Function Documentation

## ◆ GetBarcodeOrientations()

UInt32 pdftron::PDF::BarcodeOptions::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.

## ◆ GetBarcodeProfile()

BarcodeProfile pdftron::PDF::BarcodeOptions::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.

## ◆ GetBarcodeSearchTypes()

UInt32 pdftron::PDF::BarcodeOptions::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.

## ◆ GetDataOutputFormat()

OutputFormat pdftron::PDF::BarcodeOptions::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.

## ◆ GetPages()

UString pdftron::PDF::BarcodeOptions::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.

## ◆ SetBarcodeOrientations()

BarcodeOptions & pdftron::PDF::BarcodeOptions::SetBarcodeOrientations | ( | UInt32 | 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

  value | The new value for BarcodeOrientations.

Returns
  This object, for call chaining.

## ◆ SetBarcodeProfile()

BarcodeOptions & pdftron::PDF::BarcodeOptions::SetBarcodeProfile | ( | BarcodeProfile | 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

  value | The new value for BarcodeProfile.

Returns
  This object, for call chaining.

## ◆ SetBarcodeSearchTypes()

BarcodeOptions & pdftron::PDF::BarcodeOptions::SetBarcodeSearchTypes | ( | UInt32 | 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

  value | The new value for BarcodeSearchTypes.

Returns
  This object, for call chaining.

## ◆ SetDataOutputFormat()

BarcodeOptions & pdftron::PDF::BarcodeOptions::SetDataOutputFormat | ( | OutputFormat | 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

  value | The new value for DataOutputFormat.

Returns
  This object, for call chaining.

## ◆ SetPages()

BarcodeOptions & pdftron::PDF::BarcodeOptions::SetPages | ( | const UString & | 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

  value | The new value for Pages.

Returns
  This object, for call chaining.

The documentation for this class was generated from the following file:

- PDF/BarcodeOptions.h