com.idautomation.pdf417
Class PDF417

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bycom.idautomation.pdf417.PDF417
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class PDF417
extends java.awt.Canvas
implements java.io.Serializable

This is the main PDF417 class that generates the PDF417 barcode image

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 boolean autoSize
          If true, will automatically size the control canvas to fit the barcode at design or runtime; Default =True.
 java.awt.Color backColor
          Background color.
 java.awt.Color barColor
          Color of the bars.
protected  int barHeightPixels
           
 byte[] binaryCode
          The data (as a byte array) to be encoded in the barcode.
 java.lang.String code
          The data (as a string) to be encoded in the barcode.
protected  int[][] coef
          PDF417 error correction coefficients.
protected  int currentX
          Current position of painting cursor.
protected  int currentY
           
protected static int d
           
 double H
           
 int height
           
 double I
           
 double L
           
 double leftMarginCM
          Left margin of the Barcode (also know as quiet zone).
protected  int leftMarginPixels
           
 boolean MacroPDFEnable
          Determines whether or not this barcode is a MacroPDF barcode.
 int MacroPDFFileID
          The MacroPDF File ID corresponding to this barcode.
 boolean MacroPDFLastSegment
          Determines whether this MacroPDF barcode is the last in the series.
 int MacroPDFSegmentIndex
          The MacroPDF Segment Index corresponding to this barcode.
 double N
           
protected  double narrowBarCM
           
protected  int narrowBarPixels
           
static int PDF_BINARY
           
static int PDF_NUMERIC
           
static int PDF_TEXT
           
protected  int[][] PDF417_BITS
          PDF417 bar patterns
 int PDFColumns
          The number of columns in the PDF417 code; the default is 5; the range is from 1 to 30.
 int PDFECLevel
          PDF417 error correction level; the default is 2; the range is from 0 to 8.
 int PDFMode
          PDF417 mode; Valid values are PDF_BINARY (default), PDF_TEXT (for ascii data) and PDF_NUMERIC (for numeric only data).
 int PDFRows
          The number of rows of the PDF417 code; If 0 (default) the number will be calculated automatically.
 int pHeight
          The preferred height of the barcode image in pixels after barcode is generated.
 boolean processTilde
          If true, three numbers after the Tilde will insert an ASCII code; For example ~009 will insert ASCII 9 into the data string.
 int pWidth
          The preferred width of the barcode image in pixels after barcode is generated.
 int resolution
          The resolution used to create the X dimension and other measurements in pixels; Default is 38 Pixels Per CM which is about 96 DPI.
 int rotate
          Rotation angle; valid values are 0 (default), 90, 180 & 270.
protected  java.lang.String[][] textCodes
          PDF417 text mode character set
 double topMarginCM
          Top margin of the Barcode (also know as quiet zone).
protected  int topMarginPixels
           
 boolean truncated
          If true, truncated PDF417 code will be created; Default =False.
 int width
           
protected  double widthBarCM
           
protected  int widthBarPixels
           
 double X
          Size in CM of narrow modules; if X * resolution = < 1, X will be set to one pixel; resolution is used to convert to pixels; use setPixelsPerCM to change the resolution.
 double XtoYRatio
          The X multiple height of individual cells; default=3, usually 2 to 4 times X (make as small as possible, some scanners cannot read less than 3 or 4).
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PDF417()
           
 
Method Summary
protected  void addBar(java.awt.Graphics g, int w, boolean black, int bartopmargin)
          Adds a bar to the bar code at the currentX position.
protected  void addBarWithHeight(java.awt.Graphics g, int w, boolean black, int Y, int Height)
          paint a bar
protected  void calculateSizes()
          Calculates L and converts size in CM to pixels
protected  int findChar(java.lang.String[][] table, java.lang.String c)
          Finds a char in a charset table
protected  void genEC(int[] data, int len)
          Calculate the error correction/detection info; The first length elements of data are the data and padding, the next EClen elements are where we put the EC info.
 boolean getAutoSize()
          Gets the autoSize property.
 java.awt.Color getBackground()
          Gets the backColor property.
 java.lang.String getDataToEncode()
          Gets the code property.
 java.awt.Color getForeground()
          Gets the barColor property.
 double getLeftMarginCM()
          Gets the leftMarginCM property.
 boolean getMacroPDFEnable()
          Gets the MacroPDFEnable property.
 int getMacroPDFFileID()
          Gets the MacroPDFFileID property.
 boolean getMacroPDFLastSegment()
          Gets the MacroPDFLastSegment property.
 int getMacroPDFSegmentIndex()
          Gets the MacroPDFSegmentIndex property.
 java.awt.Dimension getMinimumSize()
          Gets the minimum size in pixels of the barcode image generated.
 int getPDFColumns()
          Gets the PDFColumns property.
 int getPDFErrorCorrection()
          Gets the PDFECLevel property.
 int getPDFMode()
          Gets the PDFMode property.
 int getPDFRows()
          Gets the PDFRows property.
 int getPixelsPerCM()
          Gets the resolution property.
 java.awt.Dimension getPreferredSize()
          Gets the size in pixels of the Preferred barcode image generated.
 boolean getProcessTilde()
          Gets the processTilde property.
 int getRotationAngle()
          Gets the rotate property.
 double getTopMarginCM()
          Gets the topMarginCM property.
 boolean getTruncated()
          Gets the truncated property.
 double getXDimensionCM()
          Gets the X property.
 double getXtoYRatio()
          Gets the XtoYRatio property.
protected static double mod(double a, double b)
           
 void paint(java.awt.Graphics g2)
          Paints the barcode and rotates it if necessary
protected  void paintBasis(java.awt.Graphics g)
          Paints PDF417
protected  void paintChar(java.awt.Graphics g, java.lang.String patternColor, java.lang.String patternBars)
          Paints a character
protected  void paintChar2(java.awt.Graphics g, java.lang.String patternColor, java.lang.String patternBars, int bartopmargin)
          Paints a character
protected  void paintCharWithHeight(java.awt.Graphics g, java.lang.String patternColor, java.lang.String patternBars, int Y, int Height)
          Paints a character/codeword
protected  void paintPDF417(java.awt.Graphics g)
          Paints a PDF417 code
protected  int[] PDF417_compact_binary(byte[] bytes, int datacols)
          Convert a byte sequence to a sequence of codewords.
protected  int[] PDF417_compact_numeric(byte[] bytes, int datacols)
          Convert a digit sequence to a sequence of codewords.
protected  int[] PDF417_compact_text(byte[] bytes, int datacols)
          Converts a character sequence to a sequence of codewords; Pass the number of data columns to put in each row (between 1 and 30).
protected  java.awt.Image rotate(java.awt.Image im, int angle, int maxw, int maxh)
          rotates an image
 void setAutoSize(boolean newVal)
          Sets the autoSize property.
 void setBackground(java.awt.Color newColor)
          Sets the backColor property.
 void setDataToEncode(java.lang.String newCode)
          Sets the code property.
 void setForeground(java.awt.Color newColor)
          Sets the barColor property.
 void setImageSize(int imgWidth, int imgHeight)
          Sets the size of the generated image, if used then autoSize is set to false.
 void setLeftMarginCM(double newMargin)
          Sets the leftMarginCM property.
 void setMacroPDFEnable(boolean Macro)
          Sets the MacroPDFEnable property.
 void setMacroPDFFileID(int fileid)
          Sets the MacroPDFFileID property.
 void setMacroPDFLastSegment(boolean Macro)
          Sets the MacroPDFLastSegment property.
 void setMacroPDFSegmentIndex(int index)
          Sets the MacroPDFSegmentIndex property.
 void setPDFColumns(int newColumns)
          Sets the PDFColumns property.
 void setPDFErrorCorrection(int newEC)
          Sets the PDFECLevel property.
 void setPDFMode(int newMode)
          Sets the PDFMode property.
 void setPDFRows(int newRows)
          Sets the PDFRows property.
 void setPixelsPerCM(int newRes)
          Sets the resolution property.
 void setProcessTilde(boolean pt)
          Sets the processTilde property.
 void setRotationAngle(int newRotate)
          Sets the rotate property.
 void setTopMarginCM(double newMargin)
          Sets the topMarginCM property.
 void setTruncated(boolean newVal)
          Sets the truncated property.
 void setXDimensionCM(double newX)
          Sets the X property.
 void setXtoYRatio(double newRatio)
          Sets the XtoYRatio property.
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

binaryCode

public byte[] binaryCode
The data (as a byte array) to be encoded in the barcode.


code

public java.lang.String code
The data (as a string) to be encoded in the barcode.

See Also:
setDataToEncode(String newCode), getDataToEncode(), User Manual

processTilde

public boolean processTilde
If true, three numbers after the Tilde will insert an ASCII code; For example ~009 will insert ASCII 9 into the data string.

See Also:
setProcessTilde(boolean pt), getProcessTilde(), User Manual

leftMarginCM

public double leftMarginCM
Left margin of the Barcode (also know as quiet zone). The default is .2 CM.

See Also:
setLeftMarginCM(double newMargin), getLeftMarginCM(), User Manual

d

protected static final int d
See Also:
Constant Field Values

topMarginCM

public double topMarginCM
Top margin of the Barcode (also know as quiet zone). The default is .2 CM

See Also:
setTopMarginCM(double newMargin), getTopMarginCM(), User Manual

leftMarginPixels

protected int leftMarginPixels

topMarginPixels

protected int topMarginPixels

backColor

public java.awt.Color backColor
Background color.

See Also:
setBackground(Color newColor), getBackground(), User Manual

narrowBarPixels

protected int narrowBarPixels

widthBarPixels

protected int widthBarPixels

narrowBarCM

protected double narrowBarCM

widthBarCM

protected double widthBarCM

MacroPDFEnable

public boolean MacroPDFEnable
Determines whether or not this barcode is a MacroPDF barcode.

See Also:
setMacroPDFEnable(boolean Macro), getMacroPDFEnable(), User Manual

MacroPDFSegmentIndex

public int MacroPDFSegmentIndex
The MacroPDF Segment Index corresponding to this barcode. Valid values are 0 to 99998

See Also:
setMacroPDFSegmentIndex(int index), getMacroPDFSegmentIndex(), User Manual

MacroPDFFileID

public int MacroPDFFileID
The MacroPDF File ID corresponding to this barcode. Valid values are 0 to 899

See Also:
setMacroPDFFileID(int fileid), getMacroPDFFileID(), User Manual

MacroPDFLastSegment

public boolean MacroPDFLastSegment
Determines whether this MacroPDF barcode is the last in the series.

See Also:
setMacroPDFLastSegment(boolean Macro), getMacroPDFLastSegment(), User Manual

resolution

public int resolution
The resolution used to create the X dimension and other measurements in pixels; Default is 38 Pixels Per CM which is about 96 DPI. 96 DPI is the resolution of the web browser; this setting works best when using the servlet. Enter 118 to create a 300 DPI image.

See Also:
setPixelsPerCM(int newRes), getPixelsPerCM(), User Manual

barHeightPixels

protected int barHeightPixels

N

public double N

X

public double X
Size in CM of narrow modules; if X * resolution = < 1, X will be set to one pixel; resolution is used to convert to pixels; use setPixelsPerCM to change the resolution.

See Also:
setXDimensionCM(double newX), getXDimensionCM(), User Manual

XtoYRatio

public double XtoYRatio
The X multiple height of individual cells; default=3, usually 2 to 4 times X (make as small as possible, some scanners cannot read less than 3 or 4).

See Also:
setXtoYRatio(double newRatio), getXtoYRatio(), User Manual

truncated

public boolean truncated
If true, truncated PDF417 code will be created; Default =False.

See Also:
setTruncated(boolean newVal), getTruncated(), User Manual

width

public int width

height

public int height

pWidth

public int pWidth
The preferred width of the barcode image in pixels after barcode is generated.

See Also:
getPreferredSize(), User Manual

pHeight

public int pHeight
The preferred height of the barcode image in pixels after barcode is generated.

See Also:
getPreferredSize(), User Manual

autoSize

public boolean autoSize
If true, will automatically size the control canvas to fit the barcode at design or runtime; Default =True.

See Also:
setAutoSize(boolean newVal), getAutoSize(), User Manual

barColor

public java.awt.Color barColor
Color of the bars.

See Also:
setForeground(Color newColor), getForeground(), User Manual

I

public double I

H

public double H

L

public double L

rotate

public int rotate
Rotation angle; valid values are 0 (default), 90, 180 & 270.

See Also:
setRotationAngle(int newRotate), getRotationAngle(), User Manual

textCodes

protected java.lang.String[][] textCodes
PDF417 text mode character set


coef

protected int[][] coef
PDF417 error correction coefficients.


PDF417_BITS

protected int[][] PDF417_BITS
PDF417 bar patterns


PDFRows

public int PDFRows
The number of rows of the PDF417 code; If 0 (default) the number will be calculated automatically. We recommend changing the columns instead of the rows to size the symbol.

See Also:
setPDFRows(int newRows), getPDFRows(), User Manual

PDFColumns

public int PDFColumns
The number of columns in the PDF417 code; the default is 5; the range is from 1 to 30.

See Also:
setPDFColumns(int newColumns), getPDFColumns(), User Manual

PDFECLevel

public int PDFECLevel
PDF417 error correction level; the default is 2; the range is from 0 to 8.

See Also:
setPDFErrorCorrection(int newEC), getPDFErrorCorrection(), User Manual

PDF_BINARY

public static final int PDF_BINARY
See Also:
Constant Field Values

PDF_TEXT

public static final int PDF_TEXT
See Also:
Constant Field Values

PDF_NUMERIC

public static final int PDF_NUMERIC
See Also:
Constant Field Values

PDFMode

public int PDFMode
PDF417 mode; Valid values are PDF_BINARY (default), PDF_TEXT (for ascii data) and PDF_NUMERIC (for numeric only data).

See Also:
setPDFMode(int newMode), getPDFMode(), User Manual

currentX

protected int currentX
Current position of painting cursor.


currentY

protected int currentY
Constructor Detail

PDF417

public PDF417()
Method Detail

setDataToEncode

public void setDataToEncode(java.lang.String newCode)
Sets the code property.

Parameters:
newCode - the new value for the code variable.
See Also:
code, User Manual

getDataToEncode

public java.lang.String getDataToEncode()
Gets the code property.

Returns:
the current value of the code variable.
See Also:
code, User Manual

setProcessTilde

public void setProcessTilde(boolean pt)
Sets the processTilde property.

Parameters:
pt - the new value for the processTilde variable.
See Also:
processTilde, User Manual

getProcessTilde

public boolean getProcessTilde()
Gets the processTilde property.

Returns:
the current string value of th processTildee variable.
See Also:
processTilde, User Manual

setLeftMarginCM

public void setLeftMarginCM(double newMargin)
Sets the leftMarginCM property.

Parameters:
newMargin - the new value for the leftMarginCM variable.
See Also:
leftMarginCM, User Manual

getLeftMarginCM

public double getLeftMarginCM()
Gets the leftMarginCM property.

Returns:
the current value of the leftMarginCM variable.
See Also:
leftMarginCM, User Manual

setTopMarginCM

public void setTopMarginCM(double newMargin)
Sets the topMarginCM property.

Parameters:
newMargin - the new value for the topMarginCM variable.
See Also:
topMarginCM, User Manual

getTopMarginCM

public double getTopMarginCM()
Gets the topMarginCM property.

Returns:
the current value of the topMarginCM variable.
See Also:
topMarginCM, User Manual

setBackground

public void setBackground(java.awt.Color newColor)
Sets the backColor property.

Parameters:
newColor - the new value for the backColor variable.
See Also:
backColor, User Manual

getBackground

public java.awt.Color getBackground()
Gets the backColor property.

Returns:
the current value of the backColor variable.
See Also:
backColor, User Manual

setMacroPDFEnable

public void setMacroPDFEnable(boolean Macro)
Sets the MacroPDFEnable property.

Parameters:
Macro - the new value for the MacroPDFEnable variable.
See Also:
MacroPDFEnable, User Manual

getMacroPDFEnable

public boolean getMacroPDFEnable()
Gets the MacroPDFEnable property.

Returns:
the current value of the MacroPDFEnable variable.
See Also:
MacroPDFEnable, User Manual

setMacroPDFSegmentIndex

public void setMacroPDFSegmentIndex(int index)
Sets the MacroPDFSegmentIndex property.

Parameters:
index - the new value for the MacroPDFSegmentIndex variable.
See Also:
MacroPDFSegmentIndex, User Manual

getMacroPDFSegmentIndex

public int getMacroPDFSegmentIndex()
Gets the MacroPDFSegmentIndex property.

Returns:
the current value of the MacroPDFSegmentIndex variable.
See Also:
MacroPDFSegmentIndex, User Manual

setMacroPDFFileID

public void setMacroPDFFileID(int fileid)
Sets the MacroPDFFileID property.

Parameters:
fileid - the new value for the MacroPDFFileID variable.
See Also:
MacroPDFFileID, User Manual

getMacroPDFFileID

public int getMacroPDFFileID()
Gets the MacroPDFFileID property.

Returns:
the current value of the MacroPDFFileID variable.
See Also:
MacroPDFFileID, User Manual

setMacroPDFLastSegment

public void setMacroPDFLastSegment(boolean Macro)
Sets the MacroPDFLastSegment property.

Parameters:
Macro - the new value for the MacroPDFLastSegment variable.
See Also:
MacroPDFLastSegment, User Manual

getMacroPDFLastSegment

public boolean getMacroPDFLastSegment()
Gets the MacroPDFLastSegment property.

Returns:
the current value of the MacroPDFLastSegment variable.
See Also:
MacroPDFLastSegment, User Manual

setPixelsPerCM

public void setPixelsPerCM(int newRes)
Sets the resolution property.

Parameters:
newRes - the new value for the resolution variable.
See Also:
resolution, User Manual

getPixelsPerCM

public int getPixelsPerCM()
Gets the resolution property.

Returns:
the current value of the resolution variable.
See Also:
resolution, User Manual

setXDimensionCM

public void setXDimensionCM(double newX)
Sets the X property.

Parameters:
newX - the new value for the X variable.
See Also:
X, User Manual

getXDimensionCM

public double getXDimensionCM()
Gets the X property.

Returns:
the current value of the X variable.
See Also:
X, User Manual

setXtoYRatio

public void setXtoYRatio(double newRatio)
Sets the XtoYRatio property.

Parameters:
newRatio - the new value for the XtoYRatio variable.
See Also:
XtoYRatio, User Manual

getXtoYRatio

public double getXtoYRatio()
Gets the XtoYRatio property.

Returns:
the current value of the XtoYRatio variable.
See Also:
XtoYRatio, User Manual

setTruncated

public void setTruncated(boolean newVal)
Sets the truncated property.

Parameters:
newVal - the new value for the truncated variable.
See Also:
truncated, User Manual

getTruncated

public boolean getTruncated()
Gets the truncated property.

Returns:
the current value of the truncated variable.
See Also:
truncated, User Manual

setImageSize

public void setImageSize(int imgWidth,
                         int imgHeight)
Sets the size of the generated image, if used then autoSize is set to false.

See Also:
User Manual

setAutoSize

public void setAutoSize(boolean newVal)
Sets the autoSize property.

Parameters:
newVal - the new value for the autoSize variable.
See Also:
autoSize, User Manual

getAutoSize

public boolean getAutoSize()
Gets the autoSize property.

Returns:
the current value of the autoSize variable.
See Also:
autoSize, User Manual

getPreferredSize

public java.awt.Dimension getPreferredSize()
Gets the size in pixels of the Preferred barcode image generated.

Returns:
Dimension(pWidth,pHeight)
See Also:
pWidth, pHeight, User Manual

getMinimumSize

public java.awt.Dimension getMinimumSize()
Gets the minimum size in pixels of the barcode image generated.

Returns:
Dimension(10,10)
See Also:
User Manual

setForeground

public void setForeground(java.awt.Color newColor)
Sets the barColor property.

Parameters:
newColor - the new value for the barColor variable.
See Also:
barColor, User Manual

getForeground

public java.awt.Color getForeground()
Gets the barColor property.

Returns:
the current value of the barColor variable.
See Also:
barColor, User Manual

setRotationAngle

public void setRotationAngle(int newRotate)
Sets the rotate property.

Parameters:
newRotate - the new value for the rotate variable.
See Also:
rotate, User Manual

getRotationAngle

public int getRotationAngle()
Gets the rotate property.

Returns:
the current value of the rotate variable.
See Also:
rotate, User Manual

setPDFRows

public void setPDFRows(int newRows)
Sets the PDFRows property.

Parameters:
newRows - the new value for the PDFRows variable.
See Also:
PDFRows, User Manual

getPDFRows

public int getPDFRows()
Gets the PDFRows property.

Returns:
the current value of the PDFRows variable.
See Also:
PDFRows, User Manual

setPDFColumns

public void setPDFColumns(int newColumns)
Sets the PDFColumns property.

Parameters:
newColumns - the new value for the PDFColumns variable.
See Also:
PDFColumns, User Manual

getPDFColumns

public int getPDFColumns()
Gets the PDFColumns property.

Returns:
the current value of the PDFColumns variable.
See Also:
PDFColumns, User Manual

setPDFErrorCorrection

public void setPDFErrorCorrection(int newEC)
Sets the PDFECLevel property.

Parameters:
newEC - the new value for the PDFECLevel variable.
See Also:
PDFECLevel, User Manual

getPDFErrorCorrection

public int getPDFErrorCorrection()
Gets the PDFECLevel property.

Returns:
the current value of the PDFECLevel variable.
See Also:
PDFECLevel, User Manual

setPDFMode

public void setPDFMode(int newMode)
Sets the PDFMode property.

Parameters:
newMode - the new value for the PDFMode variable.
See Also:
PDFMode, User Manual

getPDFMode

public int getPDFMode()
Gets the PDFMode property.

Returns:
the current value of the PDFMode variable.
See Also:
PDFMode, User Manual

findChar

protected int findChar(java.lang.String[][] table,
                       java.lang.String c)
Finds a char in a charset table


mod

protected static double mod(double a,
                            double b)

addBarWithHeight

protected void addBarWithHeight(java.awt.Graphics g,
                                int w,
                                boolean black,
                                int Y,
                                int Height)
paint a bar


paintCharWithHeight

protected void paintCharWithHeight(java.awt.Graphics g,
                                   java.lang.String patternColor,
                                   java.lang.String patternBars,
                                   int Y,
                                   int Height)
Paints a character/codeword


paintPDF417

protected void paintPDF417(java.awt.Graphics g)
Paints a PDF417 code


paintBasis

protected void paintBasis(java.awt.Graphics g)
Paints PDF417


PDF417_compact_binary

protected int[] PDF417_compact_binary(byte[] bytes,
                                      int datacols)
Convert a byte sequence to a sequence of codewords. Pass the number of data columns to put in each row (between 1 and 30).


PDF417_compact_numeric

protected int[] PDF417_compact_numeric(byte[] bytes,
                                       int datacols)
Convert a digit sequence to a sequence of codewords. Pass the number of data columns to put in each row (between 1 and 30).


PDF417_compact_text

protected int[] PDF417_compact_text(byte[] bytes,
                                    int datacols)
Converts a character sequence to a sequence of codewords; Pass the number of data columns to put in each row (between 1 and 30).


genEC

protected void genEC(int[] data,
                     int len)
Calculate the error correction/detection info; The first length elements of data are the data and padding, the next EClen elements are where we put the EC info.


addBar

protected void addBar(java.awt.Graphics g,
                      int w,
                      boolean black,
                      int bartopmargin)
Adds a bar to the bar code at the currentX position.


paintChar

protected void paintChar(java.awt.Graphics g,
                         java.lang.String patternColor,
                         java.lang.String patternBars)
Paints a character


paintChar2

protected void paintChar2(java.awt.Graphics g,
                          java.lang.String patternColor,
                          java.lang.String patternBars,
                          int bartopmargin)
Paints a character


calculateSizes

protected void calculateSizes()
Calculates L and converts size in CM to pixels


paint

public void paint(java.awt.Graphics g2)
Paints the barcode and rotates it if necessary


rotate

protected java.awt.Image rotate(java.awt.Image im,
                                int angle,
                                int maxw,
                                int maxh)
rotates an image