Java Doc for BarcodePDF417.java in  » PDF » pdf-itext » com » lowagie » text » pdf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » pdf itext » com.lowagie.text.pdf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.pdf.BarcodePDF417

BarcodePDF417
public class BarcodePDF417 (Code)
Generates the 2D barcode PDF417. Supports dimensioning auto-sizing, fixed and variable sizes, automatic and manual error levels, raw codeword input, codeword size optimization and bitmap inversion. The output can be a CCITT G4 Image or a raw bitmap.
author:
   Paulo Soares (psoares@consiste.pt)

Inner Class :protected static class Segment
Inner Class :protected static class SegmentList

Field Summary
final protected static  intABSOLUTE_MAX_TEXT_SIZE
    
final protected static  intAL
    
final protected static  intALPHA
    
final protected static  intAS
    
final protected static  intBYTESHIFT
    
final protected static  intBYTE_MODE
    
final protected static  intBYTE_MODE_6
    
final protected static  intISBYTE
    
final protected static  intLL
    
final protected static  intLOWER
    
final protected static  intMACRO_LAST_SEGMENT
    
final protected static  intMACRO_SEGMENT_COUNT
    
final protected static  intMACRO_SEGMENT_ID
    
final protected static  intMAX_DATA_CODEWORDS
    
final protected static  intMIXED
    
final protected static  intML
    
final protected static  intMOD
    
final protected static  intNUMERIC_MODE
    
final protected static  intPAL
    
final public static  intPDF417_AUTO_ERROR_LEVEL
     The error level correction is set automatically according to ISO 15438 recomendations.
final public static  intPDF417_FIXED_COLUMNS
     The size will be at least codeColumns with a variable number of codeRows.
final public static  intPDF417_FIXED_RECTANGLE
     The size of the barcode will be at least codeColumns*codeRows.
final public static  intPDF417_FIXED_ROWS
     The size will be at least codeRows with a variable number of codeColumns.
final public static  intPDF417_FORCE_BINARY
    
final public static  intPDF417_INVERT_BITMAP
     Inverts the output bits of the raw bitmap that is normally bit one for black.
final public static  intPDF417_USE_ASPECT_RATIO
     Auto-size is made based on aspectRatio and yHeight.
final public static  intPDF417_USE_ERROR_LEVEL
     The error level correction is set by the user.
final public static  intPDF417_USE_MACRO
    
final public static  intPDF417_USE_RAW_CODEWORDS
     No text interpretation is done and the content of codewords is used directly.
final protected static  intPL
    
final protected static  intPS
    
final protected static  intPUNCTUATION
    
final protected static  intSPACE
    
final protected static  intSTART_CODE_SIZE
    
final protected static  intSTART_PATTERN
    
final protected static  intSTOP_PATTERN
    
final protected static  intSTOP_SIZE
    
final protected static  intTEXT_MODE
    
protected  intbitPtr
    
protected  intcwPtr
    
protected  SegmentListsegmentList
    

Constructor Summary
public  BarcodePDF417()
     Creates a new BarcodePDF417 with the default settings.

Method Summary
protected  voidassemble()
    
protected  voidbasicNumberCompaction(int start, int length)
    
 voidbreakString()
    
 voidbyteCompaction(int start, int length)
    
protected  voidbyteCompaction6(int start)
    
protected  voidcalculateErrorCorrection(int dest)
    
protected  booleancheckSegmentType(Segment segment, char type)
    
public  java.awt.ImagecreateAwtImage(Color foreground, Color background)
     Creates a java.awt.Image.
protected  voiddumpList()
    
public  floatgetAspectRatio()
     Gets the barcode aspect ratio.
public  intgetBitColumns()
     Gets the number of X pixels of outBits.
public  intgetCodeColumns()
     Gets the number of barcode data columns.
public  intgetCodeRows()
     Gets the number of Y pixels of outBits.
public  int[]getCodewords()
     Gets the codeword array.
public  intgetErrorLevel()
     Gets the error level correction used for the barcode.
public  ImagegetImage()
     Gets an Image with the barcode.
public  intgetLenCodewords()
     Gets the length of the codewords.
protected  intgetMaxSquare()
    
public  intgetOptions()
     Gets the options to generate the barcode.
public  byte[]getOutBits()
     Gets the raw image bits of the barcode.
protected  intgetSegmentLength(Segment segment)
    
public  byte[]getText()
     Gets the bytes that form the barcode.
protected  intgetTextTypeAndValue(int maxLength, int idx)
    
public  floatgetYHeight()
     Gets the Y pixel height relative to X.
protected static  intmaxPossibleErrorLevel(int remain)
    
protected  voidnumberCompaction(int start, int length)
    
protected  voidoutCodeword(int codeword)
    
protected  voidoutCodeword17(int codeword)
    
protected  voidoutCodeword18(int codeword)
    
protected  voidoutPaintCode()
    
protected  voidoutStartPattern()
    
protected  voidoutStopPattern()
    
public  voidpaintCode()
     Paints the barcode.
public  voidsetAspectRatio(float aspectRatio)
     Sets the barcode aspect ratio.
public  voidsetCodeColumns(int codeColumns)
     Sets the number of barcode data columns.
public  voidsetCodeRows(int codeRows)
     Sets the number of barcode rows.
public  voidsetDefaultParameters()
     Set the default settings that correspond to PDF417_USE_ASPECT_RATIO and PDF417_AUTO_ERROR_LEVEL.
public  voidsetErrorLevel(int errorLevel)
     Sets the error level correction for the barcode.
public  voidsetLenCodewords(int lenCodewords)
     Sets the length of the codewords.
public  voidsetMacroFileId(String id)
    
public  voidsetMacroSegmentCount(int cnt)
    
public  voidsetMacroSegmentId(int id)
    
public  voidsetOptions(int options)
     Sets the options to generate the barcode.
public  voidsetText(byte[] text)
     Sets the bytes that form the barcode.
public  voidsetText(String s)
     Sets the text that will form the barcode.
public  voidsetYHeight(float yHeight)
     Sets the Y pixel height relative to X.
protected  voidtextCompaction(int start, int length)
    

Field Detail
ABSOLUTE_MAX_TEXT_SIZE
final protected static int ABSOLUTE_MAX_TEXT_SIZE(Code)



AL
final protected static int AL(Code)



ALPHA
final protected static int ALPHA(Code)



AS
final protected static int AS(Code)



BYTESHIFT
final protected static int BYTESHIFT(Code)



BYTE_MODE
final protected static int BYTE_MODE(Code)



BYTE_MODE_6
final protected static int BYTE_MODE_6(Code)



ISBYTE
final protected static int ISBYTE(Code)



LL
final protected static int LL(Code)



LOWER
final protected static int LOWER(Code)



MACRO_LAST_SEGMENT
final protected static int MACRO_LAST_SEGMENT(Code)



MACRO_SEGMENT_COUNT
final protected static int MACRO_SEGMENT_COUNT(Code)



MACRO_SEGMENT_ID
final protected static int MACRO_SEGMENT_ID(Code)



MAX_DATA_CODEWORDS
final protected static int MAX_DATA_CODEWORDS(Code)



MIXED
final protected static int MIXED(Code)



ML
final protected static int ML(Code)



MOD
final protected static int MOD(Code)



NUMERIC_MODE
final protected static int NUMERIC_MODE(Code)



PAL
final protected static int PAL(Code)



PDF417_AUTO_ERROR_LEVEL
final public static int PDF417_AUTO_ERROR_LEVEL(Code)
The error level correction is set automatically according to ISO 15438 recomendations.



PDF417_FIXED_COLUMNS
final public static int PDF417_FIXED_COLUMNS(Code)
The size will be at least codeColumns with a variable number of codeRows.



PDF417_FIXED_RECTANGLE
final public static int PDF417_FIXED_RECTANGLE(Code)
The size of the barcode will be at least codeColumns*codeRows.



PDF417_FIXED_ROWS
final public static int PDF417_FIXED_ROWS(Code)
The size will be at least codeRows with a variable number of codeColumns.



PDF417_FORCE_BINARY
final public static int PDF417_FORCE_BINARY(Code)
One single binary segment is used



PDF417_INVERT_BITMAP
final public static int PDF417_INVERT_BITMAP(Code)
Inverts the output bits of the raw bitmap that is normally bit one for black. It has only effect for the raw bitmap.



PDF417_USE_ASPECT_RATIO
final public static int PDF417_USE_ASPECT_RATIO(Code)
Auto-size is made based on aspectRatio and yHeight.



PDF417_USE_ERROR_LEVEL
final public static int PDF417_USE_ERROR_LEVEL(Code)
The error level correction is set by the user. It can be 0 to 8.



PDF417_USE_MACRO
final public static int PDF417_USE_MACRO(Code)
Use Macro PDF417 Encoding
See Also:   BarcodePDF417.setMacroFileId(String)
See Also:   BarcodePDF417.setMacroSegmentId(int)
See Also:   BarcodePDF417.setMacroSegmentCount(int)



PDF417_USE_RAW_CODEWORDS
final public static int PDF417_USE_RAW_CODEWORDS(Code)
No text interpretation is done and the content of codewords is used directly.



PL
final protected static int PL(Code)



PS
final protected static int PS(Code)



PUNCTUATION
final protected static int PUNCTUATION(Code)



SPACE
final protected static int SPACE(Code)



START_CODE_SIZE
final protected static int START_CODE_SIZE(Code)



START_PATTERN
final protected static int START_PATTERN(Code)



STOP_PATTERN
final protected static int STOP_PATTERN(Code)



STOP_SIZE
final protected static int STOP_SIZE(Code)



TEXT_MODE
final protected static int TEXT_MODE(Code)



bitPtr
protected int bitPtr(Code)



cwPtr
protected int cwPtr(Code)



segmentList
protected SegmentList segmentList(Code)




Constructor Detail
BarcodePDF417
public BarcodePDF417()(Code)
Creates a new BarcodePDF417 with the default settings.




Method Detail
assemble
protected void assemble()(Code)



basicNumberCompaction
protected void basicNumberCompaction(int start, int length)(Code)



breakString
void breakString()(Code)



byteCompaction
void byteCompaction(int start, int length)(Code)



byteCompaction6
protected void byteCompaction6(int start)(Code)



calculateErrorCorrection
protected void calculateErrorCorrection(int dest)(Code)



checkSegmentType
protected boolean checkSegmentType(Segment segment, char type)(Code)



createAwtImage
public java.awt.Image createAwtImage(Color foreground, Color background)(Code)
Creates a java.awt.Image.
Parameters:
  foreground - the color of the bars
Parameters:
  background - the color of the background the image



dumpList
protected void dumpList()(Code)



getAspectRatio
public float getAspectRatio()(Code)
Gets the barcode aspect ratio. the barcode aspect ratio



getBitColumns
public int getBitColumns()(Code)
Gets the number of X pixels of outBits. the number of X pixels of outBits



getCodeColumns
public int getCodeColumns()(Code)
Gets the number of barcode data columns. he number of barcode data columns



getCodeRows
public int getCodeRows()(Code)
Gets the number of Y pixels of outBits. It is also the number of rows in the barcode. the number of Y pixels of outBits



getCodewords
public int[] getCodewords()(Code)
Gets the codeword array. This array is always 928 elements long. It can be writen to if the option PDF417_USE_RAW_CODEWORDS is set. the codeword array



getErrorLevel
public int getErrorLevel()(Code)
Gets the error level correction used for the barcode. It may different from the previously set value. the error level correction used for the barcode



getImage
public Image getImage() throws BadElementException(Code)
Gets an Image with the barcode. The image will have to be scaled in the Y direction by yHeightfor the barcode to have the right printing aspect. the barcode Image
throws:
  BadElementException - on error



getLenCodewords
public int getLenCodewords()(Code)
Gets the length of the codewords. the length of the codewords



getMaxSquare
protected int getMaxSquare()(Code)



getOptions
public int getOptions()(Code)
Gets the options to generate the barcode. the options to generate the barcode



getOutBits
public byte[] getOutBits()(Code)
Gets the raw image bits of the barcode. The image will have to be scaled in the Y direction by yHeight. The raw barcode image



getSegmentLength
protected int getSegmentLength(Segment segment)(Code)



getText
public byte[] getText()(Code)
Gets the bytes that form the barcode. This bytes should be interpreted in the codepage Cp437. the bytes that form the barcode



getTextTypeAndValue
protected int getTextTypeAndValue(int maxLength, int idx)(Code)



getYHeight
public float getYHeight()(Code)
Gets the Y pixel height relative to X. the Y pixel height relative to X



maxPossibleErrorLevel
protected static int maxPossibleErrorLevel(int remain)(Code)



numberCompaction
protected void numberCompaction(int start, int length)(Code)



outCodeword
protected void outCodeword(int codeword)(Code)



outCodeword17
protected void outCodeword17(int codeword)(Code)



outCodeword18
protected void outCodeword18(int codeword)(Code)



outPaintCode
protected void outPaintCode()(Code)



outStartPattern
protected void outStartPattern()(Code)



outStopPattern
protected void outStopPattern()(Code)



paintCode
public void paintCode()(Code)
Paints the barcode. If no exception was thrown a valid barcode is available.



setAspectRatio
public void setAspectRatio(float aspectRatio)(Code)
Sets the barcode aspect ratio. A ratio or 0.5 will make the barcode width twice as large as the height.
Parameters:
  aspectRatio - the barcode aspect ratio



setCodeColumns
public void setCodeColumns(int codeColumns)(Code)
Sets the number of barcode data columns. This number may be changed to keep the barcode valid.
Parameters:
  codeColumns - the number of barcode data columns



setCodeRows
public void setCodeRows(int codeRows)(Code)
Sets the number of barcode rows. This number may be changed to keep the barcode valid.
Parameters:
  codeRows - the number of barcode rows



setDefaultParameters
public void setDefaultParameters()(Code)
Set the default settings that correspond to PDF417_USE_ASPECT_RATIO and PDF417_AUTO_ERROR_LEVEL.



setErrorLevel
public void setErrorLevel(int errorLevel)(Code)
Sets the error level correction for the barcode.
Parameters:
  errorLevel - the error level correction for the barcode



setLenCodewords
public void setLenCodewords(int lenCodewords)(Code)
Sets the length of the codewords.
Parameters:
  lenCodewords - the length of the codewords



setMacroFileId
public void setMacroFileId(String id)(Code)
Sets the File ID for macro PDF417 encoding
Parameters:
  id - the file id



setMacroSegmentCount
public void setMacroSegmentCount(int cnt)(Code)
Sets the segment count for macro PDF417 encoding
Parameters:
  cnt - the number of macro segments
See Also:   BarcodePDF417.setMacroSegmentId(int)



setMacroSegmentId
public void setMacroSegmentId(int id)(Code)
Sets the segment id for macro PDF417 encoding
Parameters:
  id - the id (starting at 0)
See Also:   BarcodePDF417.setMacroSegmentCount(int)



setOptions
public void setOptions(int options)(Code)
Sets the options to generate the barcode. This can be all the PDF417_* constants.
Parameters:
  options - the options to generate the barcode



setText
public void setText(byte[] text)(Code)
Sets the bytes that form the barcode. This bytes should be interpreted in the codepage Cp437.
Parameters:
  text - the bytes that form the barcode



setText
public void setText(String s)(Code)
Sets the text that will form the barcode. This text is converted to bytes using the encoding Cp437.
Parameters:
  s - the text that will form the barcode



setYHeight
public void setYHeight(float yHeight)(Code)
Sets the Y pixel height relative to X. It is usually 3.
Parameters:
  yHeight - the Y pixel height relative to X



textCompaction
protected void textCompaction(int start, int length)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.