|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.barcode.BarCodeReader
BarCodeReader encapsulates an image, it then perform
public void paint(Graphics g) { try { Image img = this.getToolkit().getImage("c:\\test.jpg"); BarCodeReader reader = new BarCodeReader(img); BarCodeInfo[] results = null; results = reader.read(); if(results.length > 0) { g.drawString("barcode found:" + results[0].getCodeText(), 10, 10); } else { g.drawString("barcode not found", 10, 10); } } catch (Exception ex) { ex.printStackTrace(); } }
Field Summary | |
static int |
ORIENTATION_EAST
Specifies scanning direction from left to right |
static int |
ORIENTATION_NORTH
Specifies scanning direction from bottom to top |
static int |
ORIENTATION_SOUTH
Specifies scanning direction from top to bottom |
static int |
ORIENTATION_WEST
Specifies scanning direction from right to left |
static long |
SYMBOLOGY_AZTEC
Specifies |
static long |
SYMBOLOGY_CODABAR
Specifies |
static long |
SYMBOLOGY_CODE11
Specifies |
static long |
SYMBOLOGY_CODE39EXTENDED
Specifies |
static long |
SYMBOLOGY_CODE39STANDARD
Specifies |
static long |
SYMBOLOGY_CODE93EXTENDED
Specifies |
static long |
SYMBOLOGY_CODE93STANDARD
Specifies |
static long |
SYMBOLOGY_DATAMATRIX
Specifes |
static long |
SYMBOLOGY_EAN128
Specifes |
static long |
SYMBOLOGY_EAN13
Specifies |
static long |
SYMBOLOGY_EAN14
Specifies |
static long |
SYMBOLOGY_EAN8
Specifies |
static long |
SYMBOLOGY_INTERLEAVED2OF5
Specifies |
static long |
SYMBOLOGY_ITF14
Specifes |
static long |
SYMBOLOGY_MACROPDF417
Specifies |
static long |
SYMBOLOGY_MSI
Specifies |
static long |
SYMBOLOGY_PDF417
Specifies |
static long |
SYMBOLOGY_PLANET
Specifies |
static long |
SYMBOLOGY_POSTNET
Specifies |
static long |
SYMBOLOGY_QR
Specifies |
static long |
SYMBOLOGY_SSCC18
Specifies |
static long |
SYMBOLOGY_STANDARD2OF5
Specifies |
static long |
SYMBOLOGY_UPCA
Specifies |
static long |
SYMBOLOGY_UPCE
Specifies |
Constructor Summary | |
BarCodeReader(java.awt.Image image)
Instantiates x barcode reader to detect barcodes from the specified image |
Method Summary | |
boolean |
getDetectSupplement()
Gets whether to detect supplement barcode for EAN13, EAN8, BooklandEAN, UPCA, UPCE barcode. |
int |
getOrientation()
Sets the scan direction for BarCodeReader. |
int |
getScanStep()
Gets how many pixels reader advances at one time. |
long |
getSymbology()
Gets the symbology settings. |
boolean |
getVerifyChecksum()
Gets whether verify the checksum of x detected barcode. |
BarCodeInfo[] |
read()
Scan the image for barcodes. |
void |
setDetectSupplement(boolean value)
Sets whether to detect supplenent barcode for EAN13, EAN8, BooklandEAN, UPCA, UPCE barcode. |
void |
setImage(java.awt.Image value)
Sets the image for reader to scan |
void |
setOrientation(int value)
Sets the scan direction for BarCodeReader. |
void |
setScanStep(int value)
Sets how many pixels reader advances at one time. |
void |
setSymbology(long value)
Sets the symbology for target barcode. |
void |
setVerifyChecksum(boolean value)
Sets whether verify the checksum of x detected barcode. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long SYMBOLOGY_CODABAR
com.aspose.barcode.Symbology.CODABAR
,
Constant Field Valuespublic static final long SYMBOLOGY_CODE11
com.aspose.barcode.Symbology.CODE11
,
Constant Field Valuespublic static final long SYMBOLOGY_CODE39EXTENDED
com.aspose.barcode.Symbology.CODE39EXTENDED
,
Constant Field Valuespublic static final long SYMBOLOGY_CODE39STANDARD
com.aspose.barcode.Symbology.CODE39STANDARD
,
Constant Field Valuespublic static final long SYMBOLOGY_CODE93EXTENDED
com.aspose.barcode.Symbology.CODE93EXTENDED
,
Constant Field Valuespublic static final long SYMBOLOGY_CODE93STANDARD
com.aspose.barcode.Symbology.CODE93STANDARD
,
Constant Field Valuespublic static final long SYMBOLOGY_EAN13
com.aspose.barcode.Symbology.EAN13
,
Constant Field Valuespublic static final long SYMBOLOGY_EAN8
com.aspose.barcode.Symbology.EAN8
,
Constant Field Valuespublic static final long SYMBOLOGY_INTERLEAVED2OF5
com.aspose.barcode.Symbology.INTERLEAVED2OF5
,
Constant Field Valuespublic static final long SYMBOLOGY_MSI
com.aspose.barcode.Symbology.MSI
,
Constant Field Valuespublic static final long SYMBOLOGY_STANDARD2OF5
com.aspose.barcode.Symbology.STANDARD2OF5
,
Constant Field Valuespublic static final long SYMBOLOGY_UPCA
com.aspose.barcode.Symbology.UPCA
,
Constant Field Valuespublic static final long SYMBOLOGY_UPCE
com.aspose.barcode.Symbology.UPCE
,
Constant Field Valuespublic static final long SYMBOLOGY_EAN128
com.aspose.barcode.Symbology.EAN128
,
Constant Field Valuespublic static final long SYMBOLOGY_PDF417
com.aspose.barcode.Symbology.PDF417
,
Constant Field Valuespublic static final long SYMBOLOGY_MACROPDF417
com.aspose.barcode.Symbology.PDF417
,
Constant Field Valuespublic static final long SYMBOLOGY_DATAMATRIX
com.aspose.barcode.Symbology.DATAMATRIX
,
Constant Field Valuespublic static final long SYMBOLOGY_AZTEC
com.aspose.barcode.Symbology.AZTEC
,
Constant Field Valuespublic static final long SYMBOLOGY_QR
com.aspose.barcode.Symbology.QR
,
Constant Field Valuespublic static final long SYMBOLOGY_ITF14
com.aspose.barcode.Symbology.ITF14
,
Constant Field Valuespublic static final long SYMBOLOGY_EAN14
com.aspose.barcode.Symbology.EAN14
,
Constant Field Valuespublic static final long SYMBOLOGY_SSCC18
com.aspose.barcode.Symbology.SSCC18
,
Constant Field Valuespublic static final long SYMBOLOGY_PLANET
com.aspose.barcode.Symbology.PLANET
,
Constant Field Valuespublic static final long SYMBOLOGY_POSTNET
com.aspose.barcode.Symbology.POSTNET
,
Constant Field Valuespublic static final int ORIENTATION_EAST
com.aspose.barcode.Orientation.East
,
Constant Field Valuespublic static final int ORIENTATION_WEST
com.aspose.barcode.Orientation.West
,
Constant Field Valuespublic static final int ORIENTATION_SOUTH
com.aspose.barcode.Orientation.South
,
Constant Field Valuespublic static final int ORIENTATION_NORTH
com.aspose.barcode.Orientation.North
,
Constant Field ValuesConstructor Detail |
public BarCodeReader(java.awt.Image image) throws java.lang.Exception
image
- of Image
java.lang.Exception
- when image format not supportedMethod Detail |
public long getSymbology()
public void setSymbology(long value)
public void paint(Graphics g) { try { Image img = this.getToolkit().getImage("c:\\test.jpg"); BarCodeReader reader = new BarCodeReader(img); //Target barcode would be EAN13 or UPCA reader.setSymbology(Symbology.EAN13 | Symbology.UPCA); BarCodeInfo[] results = null; results = reader.read(); if(results.length > 0) { g.drawString("barcode found:" + results[0].getCodeText(), 10, 10); } else { g.drawString("barcode not found", 10, 10); } } catch (Exception ex) { ex.printStackTrace(); } }
value
- Symbology
public boolean getVerifyChecksum()
setVerifyChecksum(boolean)
public void setVerifyChecksum(boolean value)
value
- getVerifyChecksum()
public int getScanStep()
setScanStep(int)
public void setScanStep(int value)
value
- of intgetScanStep()
public int getOrientation()
setOrientation(int)
,
Orientation
public void setOrientation(int value)
value
- getOrientation()
,
Orientation
public boolean getDetectSupplement()
setDetectSupplement(boolean)
,
com.aspose.barcode.BarCodeInfo.hasSupplement()
,
com.aspose.barcode.BarCodeInfo.getSupplementInfo()
public void setDetectSupplement(boolean value)
value
- of booleangetDetectSupplement()
,
com.aspose.barcode.BarCodeInfo.hasSupplement()
,
com.aspose.barcode.BarCodeInfo.getSupplementInfo()
public void setImage(java.awt.Image value) throws java.lang.Exception
value
- of Image
java.lang.Exception
- when image format not supportedpublic BarCodeInfo[] read() throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |