Table of Contents

Class PdfRectangle

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

PdfRectangle is the PDF Rectangle object. Rectangles are used to describe locations on the page and bounding boxes for several objects in PDF, such as fonts. A rectangle is represented as an array of four numbers, specifying the lower lef x, lower left y, upper right x, and upper right y coordinates of the rectangle, in that order. This object is described in the 'Portable Document Format Reference Manual version 1.3' section 7.1 (page 183). @see iTextSharp.text.Rectangle @see PdfArray

public class PdfRectangle : PdfArray
Inheritance
PdfRectangle
Inherited Members

Constructors

PdfRectangle(float, float)

public PdfRectangle(float urx, float ury)

Parameters

urx float
ury float

PdfRectangle(float, float, int)

Constructs a PdfRectangle -object starting from the origin (0, 0).

public PdfRectangle(float urx, float ury, int rotation)

Parameters

urx float

upper right x

ury float

upper right y

rotation int

PdfRectangle(float, float, float, float)

public PdfRectangle(float llx, float lly, float urx, float ury)

Parameters

llx float
lly float
urx float
ury float

PdfRectangle(float, float, float, float, int)

constructors

public PdfRectangle(float llx, float lly, float urx, float ury, int rotation)

Parameters

llx float

lower left x

lly float

lower left y

urx float

upper right x

ury float

upper right y

rotation int

PdfRectangle(Rectangle)

public PdfRectangle(Rectangle rectangle)

Parameters

rectangle Rectangle

PdfRectangle(Rectangle, int)

Constructs a PdfRectangle -object with a Rectangle -object.

public PdfRectangle(Rectangle rectangle, int rotation)

Parameters

rectangle Rectangle

a Rectangle

rotation int

Properties

Bottom

methods

public float Bottom { get; }

Property Value

float

Height

public float Height { get; }

Property Value

float

Left

membervariables

public float Left { get; }

Property Value

float

Rectangle

Returns the high level version of this PdfRectangle

public Rectangle Rectangle { get; }

Property Value

Rectangle

this PdfRectangle translated to class Rectangle

Right

upper right x

public float Right { get; }

Property Value

float

Rotate

public PdfRectangle Rotate { get; }

Property Value

PdfRectangle

Top

upper right y

public float Top { get; }

Property Value

float

Width

public float Width { get; }

Property Value

float

Methods

Add(int[])

Block changes to the underlying PdfArray @since 2.1.5

public override bool Add(int[] values)

Parameters

values int[]

stuff we'll ignore. Ha!

Returns

bool

false. You can't add anything to a PdfRectangle

Add(float[])

Block changes to the underlying PdfArray @since 2.1.5

public override bool Add(float[] values)

Parameters

values float[]

stuff we'll ignore. Ha!

Returns

bool

false. You can't add anything to a PdfRectangle

Add(PdfObject)

public override bool Add(PdfObject obj)

Parameters

obj PdfObject

Returns

bool

AddFirst(PdfObject)

Block changes to the underlying PdfArray @since 2.1.5

public override void AddFirst(PdfObject obj)

Parameters

obj PdfObject

Ignored.

GetBottom(int)

Returns the lower left x-coordinate.

public float GetBottom(int margin)

Parameters

margin int

a margin

Returns

float

the lower left x-coordinaat

GetLeft(int)

public float GetLeft(int margin)

Parameters

margin int

Returns

float

GetRight(int)

Returns the upper right x-coordinate, considering a given margin.

public float GetRight(int margin)

Parameters

margin int

a margin

Returns

float

the upper right x-coordinate

GetTop(int)

Returns the upper right y-coordinate, considering a given margin.

public float GetTop(int margin)

Parameters

margin int

a margin

Returns

float

the upper right y-coordinate