Class PDF417

java.lang.Object
java.awt.Component
java.awt.Canvas
com.idautomation.pdf417.PDF417
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PDF417 extends Canvas implements Serializable
This is the main PDF417 class that generates the PDF417 barcode image
See Also:
  • Field Details

  • Constructor Details

    • PDF417

      public PDF417()
  • Method Details

    • setDataToEncode

      public void setDataToEncode(String newCode)
      Sets the code property.
      Parameters:
      newCode - the new value for the code variable.
      See Also:
    • getDataToEncode

      public String getDataToEncode()
      Gets the code property.
      Returns:
      the current value of the code variable.
      See Also:
    • setProcessTilde

      public void setProcessTilde(boolean pt)
      Sets the processTilde property.
      Parameters:
      pt - the new value for the processTilde variable.
      See Also:
    • getProcessTilde

      public boolean getProcessTilde()
      Gets the processTilde property.
      Returns:
      the current string value of th processTildee variable.
      See Also:
    • setLeftMarginCM

      public void setLeftMarginCM(double newMargin)
      Sets the leftMarginCM property.
      Parameters:
      newMargin - the new value for the leftMarginCM variable.
      See Also:
    • getLeftMarginCM

      public double getLeftMarginCM()
      Gets the leftMarginCM property.
      Returns:
      the current value of the leftMarginCM variable.
      See Also:
    • setTopMarginCM

      public void setTopMarginCM(double newMargin)
      Sets the topMarginCM property.
      Parameters:
      newMargin - the new value for the topMarginCM variable.
      See Also:
    • getTopMarginCM

      public double getTopMarginCM()
      Gets the topMarginCM property.
      Returns:
      the current value of the topMarginCM variable.
      See Also:
    • setBackground

      public void setBackground(Color newColor)
      Sets the backColor property.
      Overrides:
      setBackground in class Component
      Parameters:
      newColor - the new value for the backColor variable.
      See Also:
    • getBackground

      public Color getBackground()
      Gets the backColor property.
      Overrides:
      getBackground in class Component
      Returns:
      the current value of the backColor variable.
      See Also:
    • setMacroPDFEnable

      public void setMacroPDFEnable(boolean Macro)
      Sets the MacroPDFEnable property.
      Parameters:
      Macro - the new value for the MacroPDFEnable variable.
      See Also:
    • getMacroPDFEnable

      public boolean getMacroPDFEnable()
      Gets the MacroPDFEnable property.
      Returns:
      the current value of the MacroPDFEnable variable.
      See Also:
    • setMacroPDFSegmentIndex

      public void setMacroPDFSegmentIndex(int index)
      Sets the MacroPDFSegmentIndex property.
      Parameters:
      index - the new value for the MacroPDFSegmentIndex variable.
      See Also:
    • getMacroPDFSegmentIndex

      public int getMacroPDFSegmentIndex()
      Gets the MacroPDFSegmentIndex property.
      Returns:
      the current value of the MacroPDFSegmentIndex variable.
      See Also:
    • setMacroPDFFileID

      public void setMacroPDFFileID(int fileid)
      Sets the MacroPDFFileID property.
      Parameters:
      fileid - the new value for the MacroPDFFileID variable.
      See Also:
    • getMacroPDFFileID

      public int getMacroPDFFileID()
      Gets the MacroPDFFileID property.
      Returns:
      the current value of the MacroPDFFileID variable.
      See Also:
    • setMacroPDFLastSegment

      public void setMacroPDFLastSegment(boolean Macro)
      Sets the MacroPDFLastSegment property.
      Parameters:
      Macro - the new value for the MacroPDFLastSegment variable.
      See Also:
    • getMacroPDFLastSegment

      public boolean getMacroPDFLastSegment()
      Gets the MacroPDFLastSegment property.
      Returns:
      the current value of the MacroPDFLastSegment variable.
      See Also:
    • setPixelsPerCM

      public void setPixelsPerCM(int newRes)
      Sets the resolution property.
      Parameters:
      newRes - the new value for the resolution variable.
      See Also:
    • getPixelsPerCM

      public int getPixelsPerCM()
      Gets the resolution property.
      Returns:
      the current value of the resolution variable.
      See Also:
    • setXDimensionCM

      public void setXDimensionCM(double newX)
      Sets the X property.
      Parameters:
      newX - the new value for the X variable.
      See Also:
    • getXDimensionCM

      public double getXDimensionCM()
      Gets the X property.
      Returns:
      the current value of the X variable.
      See Also:
    • setXtoYRatio

      public void setXtoYRatio(double newRatio)
      Sets the XtoYRatio property.
      Parameters:
      newRatio - the new value for the XtoYRatio variable.
      See Also:
    • getXtoYRatio

      public double getXtoYRatio()
      Gets the XtoYRatio property.
      Returns:
      the current value of the XtoYRatio variable.
      See Also:
    • setTruncated

      public void setTruncated(boolean newVal)
      Sets the truncated property.
      Parameters:
      newVal - the new value for the truncated variable.
      See Also:
    • getTruncated

      public boolean getTruncated()
      Gets the truncated property.
      Returns:
      the current value of the truncated variable.
      See Also:
    • 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:
    • setAutoSize

      public void setAutoSize(boolean newVal)
      Sets the autoSize property.
      Parameters:
      newVal - the new value for the autoSize variable.
      See Also:
    • getAutoSize

      public boolean getAutoSize()
      Gets the autoSize property.
      Returns:
      the current value of the autoSize variable.
      See Also:
    • getPreferredSize

      public Dimension getPreferredSize()
      Gets the size in pixels of the Preferred barcode image generated.
      Overrides:
      getPreferredSize in class Component
      Returns:
      Dimension(pWidth,pHeight)
      See Also:
    • getMinimumSize

      public Dimension getMinimumSize()
      Gets the minimum size in pixels of the barcode image generated.
      Overrides:
      getMinimumSize in class Component
      Returns:
      Dimension(10,10)
      See Also:
    • setForeground

      public void setForeground(Color newColor)
      Sets the barColor property.
      Overrides:
      setForeground in class Component
      Parameters:
      newColor - the new value for the barColor variable.
      See Also:
    • getForeground

      public Color getForeground()
      Gets the barColor property.
      Overrides:
      getForeground in class Component
      Returns:
      the current value of the barColor variable.
      See Also:
    • setRotationAngle

      public void setRotationAngle(int newRotate)
      Sets the rotate property.
      Parameters:
      newRotate - the new value for the rotate variable.
      See Also:
    • getRotationAngle

      public int getRotationAngle()
      Gets the rotate property.
      Returns:
      the current value of the rotate variable.
      See Also:
    • setPDFRows

      public void setPDFRows(int newRows)
      Sets the PDFRows property.
      Parameters:
      newRows - the new value for the PDFRows variable.
      See Also:
    • getPDFRows

      public int getPDFRows()
      Gets the PDFRows property.
      Returns:
      the current value of the PDFRows variable.
      See Also:
    • setPDFColumns

      public void setPDFColumns(int newColumns)
      Sets the PDFColumns property.
      Parameters:
      newColumns - the new value for the PDFColumns variable.
      See Also:
    • getPDFColumns

      public int getPDFColumns()
      Gets the PDFColumns property.
      Returns:
      the current value of the PDFColumns variable.
      See Also:
    • setPDFErrorCorrection

      public void setPDFErrorCorrection(int newEC)
      Sets the PDFECLevel property.
      Parameters:
      newEC - the new value for the PDFECLevel variable.
      See Also:
    • getPDFErrorCorrection

      public int getPDFErrorCorrection()
      Gets the PDFECLevel property.
      Returns:
      the current value of the PDFECLevel variable.
      See Also:
    • setPDFMode

      public void setPDFMode(int newMode)
      Sets the PDFMode property.
      Parameters:
      newMode - the new value for the PDFMode variable.
      See Also:
    • getPDFMode

      public int getPDFMode()
      Gets the PDFMode property.
      Returns:
      the current value of the PDFMode variable.
      See Also:
    • paint

      public void paint(Graphics g2)
      Paints the barcode and rotates it if necessary
      Overrides:
      paint in class Canvas
    • convertToBufferedImage

      public static BufferedImage convertToBufferedImage(Image image)