HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.BarcodePostnet Class Reference
Inheritance diagram for iTextSharp.text.pdf.BarcodePostnet:
iTextSharp.text.pdf.Barcode

Public Member Functions

 BarcodePostnet ()
 
override Rectangle PlaceBarcode (PdfContentByte cb, Color barColor, Color textColor)
 
override System.Drawing.Image CreateDrawingImage (System.Drawing.Color foreground, System.Drawing.Color background)
 
- Public Member Functions inherited from iTextSharp.text.pdf.Barcode
PdfTemplate CreateTemplateWithBarcode (PdfContentByte cb, Color barColor, Color textColor)
 
Image CreateImageWithBarcode (PdfContentByte cb, Color barColor, Color textColor)
 

Static Public Member Functions

static byte[] GetBarsPostnet (string text)
 

Properties

override Rectangle BarcodeSize [get]
 
- Properties inherited from iTextSharp.text.pdf.Barcode
float X [get, set]
 
float N [get, set]
 
BaseFont Font [get, set]
 
float Size [get, set]
 
float Baseline [get, set]
 
float BarHeight [get, set]
 
int TextAlignment [get, set]
 
bool GenerateChecksum [get, set]
 
bool ChecksumText [get, set]
 
bool StartStopText [get, set]
 
bool Extended [get, set]
 
virtual string Code [get, set]
 
bool GuardBars [get, set]
 
int CodeType [get, set]
 
abstract Rectangle BarcodeSize [get]
 
float InkSpreading [get, set]
 
String AltText [get, set]
 

Additional Inherited Members

- Static Public Attributes inherited from iTextSharp.text.pdf.Barcode
const int EAN13 = 1
 
const int EAN8 = 2
 
const int UPCA = 3
 
const int UPCE = 4
 
const int SUPP2 = 5
 
const int SUPP5 = 6
 
const int POSTNET = 7
 
const int PLANET = 8
 
const int CODE128 = 9
 
const int CODE128_UCC = 10
 
const int CODE128_RAW = 11
 
const int CODABAR = 12
 
- Protected Attributes inherited from iTextSharp.text.pdf.Barcode
float x
 
float n
 
BaseFont font
 
float size
 
float baseline
 
float barHeight
 
int textAlignment
 
bool generateChecksum
 
bool checksumText
 
bool startStopText
 
bool extended
 
string code = ""
 
bool guardBars
 
int codeType
 
float inkSpreading = 0
 
String altText
 

Detailed Description

Implements the Postnet and Planet barcodes. The default parameters are:

*n = 72f / 22f; // distance between bars
*x = 0.02f * 72f; // bar width
*barHeight = 0.125f * 72f; // height of the tall bars
*size = 0.05f * 72f; // height of the short bars
*codeType = POSTNET; // type of code
  
Author
Paulo Soares (psoar.nosp@m.es@c.nosp@m.onsis.nosp@m.te.p.nosp@m.t)

Constructor & Destructor Documentation

◆ BarcodePostnet()

iTextSharp.text.pdf.BarcodePostnet.BarcodePostnet ( )

Creates new BarcodePostnet

Member Function Documentation

◆ CreateDrawingImage()

override System.Drawing.Image iTextSharp.text.pdf.BarcodePostnet.CreateDrawingImage ( System.Drawing.Color  foreground,
System.Drawing.Color  background 
)
virtual

◆ GetBarsPostnet()

static byte [] iTextSharp.text.pdf.BarcodePostnet.GetBarsPostnet ( string  text)
static

Creates the bars for Postnet.

Parameters
textthe code to be created without checksum
Returns
the bars

◆ PlaceBarcode()

override Rectangle iTextSharp.text.pdf.BarcodePostnet.PlaceBarcode ( PdfContentByte  cb,
Color  barColor,
Color  textColor 
)
virtual

Places the barcode in a PdfContentByte. The barcode is always placed at coodinates (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

Parameters
cbthe PdfContentByte where the barcode will be placed
barColorthe color of the bars. It can be null
textColorthe color of the text. It can be null
Returns
the dimensions the barcode occupies

Implements iTextSharp.text.pdf.Barcode.

Property Documentation

◆ BarcodeSize

override Rectangle iTextSharp.text.pdf.BarcodePostnet.BarcodeSize
get

Gets the maximum area that the barcode and the text, if any, will occupy. The lower left corner is always (0, 0).

Returns
the size the barcode occupies.

The documentation for this class was generated from the following file: