Summary: Nested Classes | Ctors | Methods | Inherited Methods | [Expand All]
public class

# BarcodeOptions

extends OptionsBase

java.lang.Object
↳ | com.pdftron.pdf.OptionsBase
| ↳ | com.pdftron.pdf.BarcodeOptions

## Summary

Nested Classes
class | BarcodeOptions.BarcodeOrientation | A set of flags used to specify the barcode orientation(s).
enum | BarcodeOptions.BarcodeProfile | An enumeration used to specify the barcode detection profile.
class | BarcodeOptions.BarcodeTypeGroup | A set of flags used to specify a subset of barcode types.
enum | BarcodeOptions.OutputFormat | An enumeration used to specify the format of the data output.

Public Constructors
| BarcodeOptions() Constructor.
| BarcodeOptions(String json_string) Constructor.

Public Methods
int | getBarcodeOrientations() Gets the value BarcodeOrientations from the options object.
BarcodeOptions.BarcodeProfile | getBarcodeProfile() Gets the value BarcodeProfile from the options object.
int | getBarcodeSearchTypes() Gets the value BarcodeSearchTypes from the options object.
BarcodeOptions.OutputFormat | getDataOutputFormat() Gets the value DataOutputFormat from the options object.
String | getPages() Gets the value Pages from the options object.
BarcodeOptions | setBarcodeOrientations(int value) Sets the value for BarcodeOrientations in the options object.
BarcodeOptions | setBarcodeProfile(BarcodeOptions.BarcodeProfile value) Sets the value for BarcodeProfile in the options object.
BarcodeOptions | setBarcodeSearchTypes(int value) Sets the value for BarcodeSearchTypes in the options object.
BarcodeOptions | setDataOutputFormat(BarcodeOptions.OutputFormat value) Sets the value for DataOutputFormat in the options object.
BarcodeOptions | setPages(String value) Sets the value for Pages in the options object.

[Expand] Inherited Methods
From class java.lang.Object
boolean | equals(Object arg0)
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Public Constructors

#### public BarcodeOptions ()

Constructor.

##### Throws

PDFNetException |

#### public BarcodeOptions (String json_string)

Constructor.

##### Throws

PDFNetException |

## Public Methods

#### public int 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

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

##### Throws

PDFNetException |

#### public BarcodeOptions.BarcodeProfile 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

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

##### Throws

PDFNetException |

#### public int 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

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

##### Throws

PDFNetException |

#### public BarcodeOptions.OutputFormat 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

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

##### Throws

PDFNetException |

#### public String 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

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

##### Throws

PDFNetException |

#### public BarcodeOptions setBarcodeOrientations (int 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 | 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

- This object, for call chaining.

##### Throws

PDFNetException |

#### public BarcodeOptions setBarcodeProfile (BarcodeOptions.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 | 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

- This object, for call chaining.

##### Throws

PDFNetException |

#### public BarcodeOptions setBarcodeSearchTypes (int 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 | 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

- This object, for call chaining.

##### Throws

PDFNetException |

#### public BarcodeOptions setDataOutputFormat (BarcodeOptions.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 | 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

- This object, for call chaining.

##### Throws

PDFNetException |

#### public BarcodeOptions setPages (String 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 | 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

- This object, for call chaining.

##### Throws

PDFNetException |