Table of Contents

Class LineSeparator

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

Element that draws a solid line from left to right. Can be added directly to a document or column. Can also be used to create a separator chunk. @author Paulo Soares @since 2.1.2

public class LineSeparator : VerticalPositionMark, IDrawInterface, IElement
Inheritance
LineSeparator
Implements
Derived
Inherited Members

Constructors

LineSeparator()

Creates a new instance of the LineSeparator class with default values: lineWidth 1 user unit, width 100%, centered with offset 0.

public LineSeparator()

LineSeparator(float, float, BaseColor, int, float)

Creates a new instance of the LineSeparator class.

public LineSeparator(float lineWidth, float percentage, BaseColor lineColor, int align, float offset)

Parameters

lineWidth float

the thickness of the line

percentage float

the width of the line as a percentage of the available page width

lineColor BaseColor

the color of the line

align int

the alignment

offset float

the offset of the line relative to the current baseline (negative = under the baseline)

Properties

Alignment

Setter for the alignment of the line.

public int Alignment { get; set; }

Property Value

int

LineColor

public BaseColor LineColor { get; set; }

Property Value

BaseColor

LineWidth

Setter for the line width.

public float LineWidth { get; set; }

Property Value

float

Percentage

Setter for the width as a percentage of the available width.

public float Percentage { get; set; }

Property Value

float

a width percentage

Methods

Draw(PdfContentByte, float, float, float, float, float)

@see com.lowagie.text.pdf.draw.DrawInterface#draw(com.lowagie.text.pdf.PdfContentByte, float, float, float, float, float)

public override void Draw(PdfContentByte canvas, float llx, float lly, float urx, float ury, float y)

Parameters

canvas PdfContentByte
llx float
lly float
urx float
ury float
y float

DrawLine(PdfContentByte, float, float, float)

Draws a horizontal line.

public void DrawLine(PdfContentByte canvas, float leftX, float rightX, float y)

Parameters

canvas PdfContentByte

the canvas to draw on

leftX float

the left x coordinate

rightX float

the right x coordindate

y float

the y coordinate