GetBarcodes
GetBarcodes()
Extracts barcodes from the document.
public IEnumerable<PageBarcodeArea> GetBarcodes()
Return Value
A collection of PageBarcodeArea
objects; null
if barcodes extraction isn’t supported.
Examples
The following example shows how to extract barcodes from a document:
// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
{
// Extract barcodes from the document.
IEnumerable<PageBarcodeArea> barcodes = parser.GetBarcodes();
// Iterate over barcodes
foreach(PageBarcodeArea barcode in barcodes)
{
// Print the page index
Console.WriteLine("Page: " + barcode.Page.Index.ToString());
// Print the barcode value
Console.WriteLine("Value: " + barcode.Value);
}
}
See Also
- class PageBarcodeArea
- class Parser
- namespace GroupDocs.Parser
- assembly GroupDocs.Parser
GetBarcodes(int)
Extracts barcodes from the document page.
public IEnumerable<PageBarcodeArea> GetBarcodes(int pageIndex)
Parameter | Type | Description |
---|---|---|
pageIndex | Int32 | The zero-based page index. |
Return Value
A collection of PageBarcodeArea
objects; null
if barcodes extraction isn’t supported.
Examples
The following example shows how to extract barcodes from a document page:
// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
{
// Extract barcodes from the second document page.
IEnumerable<PageBarcodeArea> barcodes = parser.GetBarcodes(1);
// Iterate over barcodes
foreach(PageBarcodeArea barcode in barcodes)
{
// Print the page index
Console.WriteLine("Page: " + barcode.Page.Index.ToString());
// Print the barcode value
Console.WriteLine("Value: " + barcode.Value);
}
}
See Also
- class PageBarcodeArea
- class Parser
- namespace GroupDocs.Parser
- assembly GroupDocs.Parser
GetBarcodes(BarcodeOptions)
Extracts barcodes from the document using customization options.
public IEnumerable<PageBarcodeArea> GetBarcodes(BarcodeOptions options)
Parameter | Type | Description |
---|---|---|
options | BarcodeOptions | The options for barcodes extraction. |
Return Value
A collection of PageBarcodeArea
objects; null
if barcodes extraction isn’t supported.
Examples
The following example shows how to extract barcodes from the upper-right corner.
// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
{
// Create the options which are used for barcodes extraction
BarcodeOptions options = new BarcodeOptions(new Rectangle(new Point(590, 80), new Size(150, 150)));
// Extract barcodes from the upper-right corner.
IEnumerable<PageBarcodeArea> barcodes = parser.GetBarcodes(options);
// Iterate over barcodes
foreach (PageBarcodeArea barcode in barcodes)
{
// Print the page index
Console.WriteLine("Page: " + barcode.Page.Index.ToString());
// Print the barcode value
Console.WriteLine("Value: " + barcode.Value);
}
}
See Also
- class PageBarcodeArea
- class BarcodeOptions
- class Parser
- namespace GroupDocs.Parser
- assembly GroupDocs.Parser
GetBarcodes(int, BarcodeOptions)
Extracts barcodes from the document page using customization options.
public IEnumerable<PageBarcodeArea> GetBarcodes(int pageIndex, BarcodeOptions options)
Parameter | Type | Description |
---|---|---|
pageIndex | Int32 | The zero-based page index. |
options | BarcodeOptions | The options for barcodes extraction. |
Return Value
A collection of PageBarcodeArea
objects; null
if barcodes extraction isn’t supported.
See Also
- class PageBarcodeArea
- class BarcodeOptions
- class Parser
- namespace GroupDocs.Parser
- assembly GroupDocs.Parser