Table of Contents

Class BarcodeEansupp

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll

This class takes 2 barcodes, an EAN/UPC and a supplemental and creates a single barcode with both combined in the expected layout. The UPC/EAN should have a positive text baseline and the supplemental a negative one (in the supplemental the text is on the top of the barcode. The default parameters are: n = 8; // horizontal distance between the two barcodes @author Paulo Soares (psoares@consiste.pt)

public class BarcodeEansupp : Barcode
Inheritance
BarcodeEansupp
Inherited Members

Constructors

BarcodeEansupp(Barcode, Barcode)

Creates new combined barcode.

public BarcodeEansupp(Barcode ean, Barcode supp)

Parameters

ean Barcode

the EAN/UPC barcode

supp Barcode

the supplemental barcode

Fields

Ean

The barcode with the EAN/UPC.

protected Barcode Ean

Field Value

Barcode

Supp

The barcode with the supplemental.

protected Barcode Supp

Field Value

Barcode

Properties

BarcodeSize

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

public override Rectangle BarcodeSize { get; }

Property Value

Rectangle

the size the barcode occupies.

Methods

CreateDrawingImage(Color, Color)

public override SKBitmap CreateDrawingImage(Color foreground, Color background)

Parameters

foreground Color
background Color

Returns

SKBitmap

PlaceBarcode(PdfContentByte, BaseColor, BaseColor)

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

public override Rectangle PlaceBarcode(PdfContentByte cb, BaseColor barColor, BaseColor textColor)

Parameters

cb PdfContentByte

the PdfContentByte where the barcode will be placed

barColor BaseColor

the color of the bars. It can be null

textColor BaseColor

the color of the text. It can be null

Returns

Rectangle

the dimensions the barcode occupies