public final class UPCEWriter extends UPCEANWriter
BitMatrix.| Constructor and Description |
|---|
UPCEWriter() |
| Modifier and Type | Method and Description |
|---|---|
boolean[] |
encode(String contents)
Encode the contents to boolean array expression of one-dimensional barcode.
|
BitMatrix |
encode(String contents,
BarcodeFormat format,
int width,
int height,
Map<EncodeHintType,?> hints)
Encode the contents following specified format.
|
getDefaultMarginappendPattern, encodepublic BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType,?> hints) throws WriterException
OneDimensionalCodeWriterwidth and height are required size. This method may return bigger size
BitMatrix when specified size is too small. The user can set both width and
height to zero to get minimum size barcode. If negative value is set to width
or height, IllegalArgumentException is thrown.encode in interface Writerencode in class OneDimensionalCodeWritercontents - The contents to encode in the barcodeformat - The barcode format to generatewidth - The preferred width in pixelsheight - The preferred height in pixelshints - Additional parameters to supply to the encoderBitMatrix representing encoded barcode imageWriterException - if contents cannot be encoded legally in a formatpublic boolean[] encode(String contents)
OneDimensionalCodeWriterencode in class OneDimensionalCodeWritercontents - barcode contents to encodeboolean[] of horizontal pixels (false = white, true = black)Copyright © 2007–2018. All rights reserved.