iText 9.0.0 API
|
Base class for the barcode types that have 1D representation. More...
Public Member Functions |
|
virtual float | GetX () |
Gets the minimum bar width. More... |
|
virtual void | SetX (float x) |
Sets the minimum bar width. More... |
|
virtual float | GetN () |
Gets the bar multiplier for wide bars. More... |
|
virtual void | SetN (float n) |
Sets the bar multiplier for wide bars. More... |
|
virtual PdfFont | GetFont () |
Gets the text font. More... |
|
virtual void | SetFont (PdfFont font) |
Sets the text font. More... |
|
virtual float | GetSize () |
Gets the size of the text. More... |
|
virtual void | SetSize (float size) |
Sets the size of the text. More... |
|
virtual float | GetBaseline () |
Gets the text baseline. More... |
|
virtual void | SetBaseline (float baseline) |
Sets the text baseline. More... |
|
virtual float | GetBarHeight () |
Gets the height of the bars. More... |
|
virtual void | SetBarHeight (float barHeight) |
Sets the height of the bars. More... |
|
virtual int | GetTextAlignment () |
Gets the text alignment. More... |
|
virtual void | SetTextAlignment (int textAlignment) |
Sets the text alignment. More... |
|
virtual bool | IsGenerateChecksum () |
Gets the optional checksum generation. More... |
|
virtual void | SetGenerateChecksum (bool generateChecksum) |
Setter for property generateChecksum. More... |
|
virtual bool | IsChecksumText () |
Gets the property to show the generated checksum in the the text. More... |
|
virtual void | SetChecksumText (bool checksumText) |
Sets the property to show the generated checksum in the the text. More... |
|
virtual bool | IsStartStopText () |
Sets the property to show the start and stop character '*' in the text for the barcode 39. More... |
|
virtual void | SetStartStopText (bool startStopText) |
Gets the property to show the start and stop character '*' in the text for the barcode 39. More... |
|
virtual bool | IsExtended () |
Gets the property to generate extended barcode 39. More... |
|
virtual void | SetExtended (bool extended) |
Sets the property to generate extended barcode 39. More... |
|
virtual String | GetCode () |
Gets the code to generate. More... |
|
virtual void | SetCode (String code) |
Sets the code to generate. More... |
|
virtual bool | IsGuardBars () |
Gets the property to show the guard bars for barcode EAN. More... |
|
virtual void | SetGuardBars (bool guardBars) |
Sets the property to show the guard bars for barcode EAN. More... |
|
virtual int | GetCodeType () |
Gets the code type. More... |
|
virtual void | SetCodeType (int codeType) |
Sets the code type. More... |
|
abstract Rectangle | GetBarcodeSize () |
Gets the maximum area that the barcode and the text, if any, will occupy. More... |
|
abstract Rectangle | PlaceBarcode (PdfCanvas canvas, Color barColor, Color textColor) |
Places the barcode in a PdfCanvas . More... |
|
virtual float | GetInkSpreading () |
Gets the amount of ink spreading. More... |
|
virtual void | SetInkSpreading (float inkSpreading) |
Sets the amount of ink spreading. More... |
|
virtual String | GetAltText () |
Gets the alternate text. More... |
|
virtual void | SetAltText (String altText) |
Sets the alternate text. More... |
|
virtual PdfFormXObject | CreateFormXObject (PdfDocument document) |
Creates a PdfFormXObject with the barcode. More... |
|
virtual PdfFormXObject | CreateFormXObject (Color barColor, Color textColor, PdfDocument document) |
Creates a PdfFormXObject with the barcode. More... |
|
virtual void | FitWidth (float width) |
Make the barcode occupy the specified width. More... |
|
Static Public Attributes |
|
const int | ALIGN_LEFT = 1 |
Constant that defines left alignment. More... |
|
const int | ALIGN_RIGHT = 2 |
Constant that defines right alignment. More... |
|
const int | ALIGN_CENTER = 3 |
Constant that defines center alignment. More... |
|
Package Functions |
|
Barcode1D (PdfDocument document) | |
Creates new Barcode1D instance. More... |
|
virtual float | GetDescender () |
Gets the descender value of the font. More... |
|
Package Attributes |
|
PdfDocument | document |
float | x |
The minimum bar width. More... |
|
float | n |
The bar multiplier for wide bars or the distance between bars for Postnet and Planet. More... |
|
PdfFont | font |
The text font. More... |
|
float | size |
The size of the text or the height of the shorter bar in Postnet. More... |
|
float | baseline |
If positive, the text distance under the bars. More... |
|
float | barHeight |
The height of the bars. More... |
|
int | textAlignment |
The text alignment. More... |
|
bool | generateChecksum |
The optional checksum generation. More... |
|
bool | checksumText |
Shows the generated checksum in the the text. More... |
|
bool | startStopText |
Show the start and stop character '*' in the text for the barcode 39 or 'ABCD' for codabar. More... |
|
bool | extended |
Generates extended barcode 39. More... |
|
String | code = "" |
The code to generate. More... |
|
bool | guardBars |
Show the guard bars for barcode EAN. More... |
|
int | codeType |
The code type. More... |
|
float | inkSpreading = 0 |
The ink spreading. More... |
|
String | altText |
The alternate text to be used, if present. More... |
|
Base class for the barcode types that have 1D representation.
Base class for the barcode types that have 1D representation. This means all data is encoded in the width of the bars. And the height of the bars is constant.
|
inlinepackage |
Creates new Barcode1D instance.
document | The document |
|
inlinevirtual |
Creates a PdfFormXObject with the barcode.
barColor | The color of the bars. It can be null |
textColor | The color of the text. It can be null |
document | The document |
|
inlinevirtual |
Creates a PdfFormXObject with the barcode.
Creates a PdfFormXObject with the barcode. Default bar color and text color will be used.
document | The document |
|
inlinevirtual |
Make the barcode occupy the specified width.
Make the barcode occupy the specified width. Usually this is achieved by adjusting bar widths.
width | The width |
Reimplemented in iText.Barcodes.BarcodePostnet.
|
inlinevirtual |
Gets the alternate text.
|
pure virtual |
Gets the maximum area that the barcode and the text, if any, will occupy.
Gets the maximum area that the barcode and the text, if any, will occupy. The lower left corner is always (0, 0).
Implemented in iText.Barcodes.BarcodeEAN, iText.Barcodes.Barcode128, iText.Barcodes.Barcode39, iText.Barcodes.BarcodeCodabar, iText.Barcodes.BarcodeInter25, iText.Barcodes.BarcodeMSI, iText.Barcodes.BarcodePostnet, and iText.Barcodes.BarcodeEANSUPP.
|
inlinevirtual |
Gets the height of the bars.
|
inlinevirtual |
Gets the text baseline.
Gets the text baseline. If positive, the text distance under the bars. If zero or negative, the text distance above the bars.
|
inlinevirtual |
Gets the code to generate.
|
inlinevirtual |
Gets the code type.
|
inlinepackagevirtual |
Gets the descender value of the font.
|
inlinevirtual |
Gets the text font.
Gets the text font. null
if no text.
null
if no text
|
inlinevirtual |
Gets the amount of ink spreading.
|
inlinevirtual |
Gets the bar multiplier for wide bars.
|
inlinevirtual |
Gets the size of the text.
|
inlinevirtual |
Gets the text alignment.
|
inlinevirtual |
Gets the minimum bar width.
|
inlinevirtual |
Gets the property to show the generated checksum in the the text.
|
inlinevirtual |
Gets the property to generate extended barcode 39.
|
inlinevirtual |
Gets the optional checksum generation.
|
inlinevirtual |
Gets the property to show the guard bars for barcode EAN.
|
inlinevirtual |
Sets the property to show the start and stop character '*' in the text for the barcode 39.
|
pure virtual |
Places the barcode in a PdfCanvas
.
Places the barcode in a PdfCanvas
. The barcode is always placed at coordinates (0, 0). Use the translation matrix to move it elsewhere.
The bars and text are written in the following colors:
barColor |
textColor |
Result |
---|---|---|
null |
null |
bars and text painted with current fill color |
barColor |
null |
bars and text painted with barColor |
null |
textColor |
bars painted with current color text painted with textColor |
barColor |
textColor |
bars painted with barColor text painted with textColor |
canvas | the PdfCanvas where the barcode will be placed |
barColor | the color of the bars. It can be null |
textColor | the color of the text. It can be null |
Implemented in iText.Barcodes.BarcodeEAN, iText.Barcodes.Barcode128, iText.Barcodes.Barcode39, iText.Barcodes.BarcodeCodabar, iText.Barcodes.BarcodeInter25, iText.Barcodes.BarcodeMSI, iText.Barcodes.BarcodeEANSUPP, and iText.Barcodes.BarcodePostnet.
|
inlinevirtual |
Sets the alternate text.
Sets the alternate text. If present, this text will be used instead of the text derived from the supplied code.
altText | the alternate text |
|
inlinevirtual |
Sets the height of the bars.
barHeight | the height of the bars |
|
inlinevirtual |
Sets the text baseline.
Sets the text baseline. If positive, the text distance under the bars. If zero or negative, the text distance above the bars.
baseline | the baseline. |
|
inlinevirtual |
Sets the property to show the generated checksum in the the text.
checksumText | new value of property checksumText |
|
inlinevirtual |
Sets the code to generate.
code | the code to generate |
Reimplemented in iText.Barcodes.Barcode128.
|
inlinevirtual |
Sets the code type.
codeType | the code type |
|
inlinevirtual |
Sets the property to generate extended barcode 39.
extended | new value of property extended |
|
inlinevirtual |
Sets the text font.
font | the text font. Set to null to suppress any text |
|
inlinevirtual |
Setter for property generateChecksum.
generateChecksum | New value of property generateChecksum. |
|
inlinevirtual |
Sets the property to show the guard bars for barcode EAN.
guardBars | new value of property guardBars |
|
inlinevirtual |
Sets the amount of ink spreading.
Sets the amount of ink spreading. This value will be subtracted to the width of each bar. The actual value will depend on the ink and the printing medium.
inkSpreading | the ink spreading |
|
inlinevirtual |
Sets the bar multiplier for wide bars.
n | the bar multiplier for wide bars |
|
inlinevirtual |
Sets the size of the text.
size | the size of the text |
|
inlinevirtual |
Gets the property to show the start and stop character '*' in the text for the barcode 39.
startStopText | new value of property startStopText |
|
inlinevirtual |
Sets the text alignment.
textAlignment | the text alignment |
|
inlinevirtual |
Sets the minimum bar width.
x | the minimum bar width |
|
static |
Constant that defines center alignment.
|
static |
Constant that defines left alignment.
|
static |
Constant that defines right alignment.
|
package |
The alternate text to be used, if present.
|
package |
The height of the bars.
|
package |
If positive, the text distance under the bars.
If positive, the text distance under the bars. If zero or negative, the text distance above the bars.
|
package |
Shows the generated checksum in the the text.
|
package |
The code to generate.
|
package |
The code type.
|
package |
Generates extended barcode 39.
|
package |
The text font.
The text font. null
if no text.
|
package |
The optional checksum generation.
|
package |
Show the guard bars for barcode EAN.
|
package |
The ink spreading.
|
package |
The bar multiplier for wide bars or the distance between bars for Postnet and Planet.
|
package |
The size of the text or the height of the shorter bar in Postnet.
|
package |
Show the start and stop character '*' in the text for the barcode 39 or 'ABCD' for codabar.
|
package |
The text alignment.
|
package |
The minimum bar width.