Table of Contents

Class Utilities

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

A collection of convenience methods that were present in many different iText classes.

public static class Utilities
Inheritance
Utilities
Inherited Members

Methods

AddToArray(object[][], object[])

Utility method to extend an array.

public static object[][] AddToArray(object[][] original, object[] item)

Parameters

original object[][]

the original array or null

item object[]

the item to be added to the array

Returns

object[][]

a new array with the item appended

CheckTrueOrFalse(Properties, string)

Checks for a true/false value of a key in a Properties object.

public static bool CheckTrueOrFalse(Properties attributes, string key)

Parameters

attributes Properties
key string

Returns

bool

ConvertFromUtf32(int)

public static string ConvertFromUtf32(int codePoint)

Parameters

codePoint int

Returns

string

ConvertToUtf32(char, char)

public static int ConvertToUtf32(char highSurrogate, char lowSurrogate)

Parameters

highSurrogate char
lowSurrogate char

Returns

int

ConvertToUtf32(char[], int)

public static int ConvertToUtf32(char[] text, int idx)

Parameters

text char[]
idx int

Returns

int

ConvertToUtf32(string, int)

public static int ConvertToUtf32(string text, int idx)

Parameters

text string
idx int

Returns

int

GetKeySet(Properties)

public static ICollection<string> GetKeySet(Properties table)

Parameters

table Properties

Returns

ICollection<string>

InchesToMillimeters(float)

Measurement conversion from inches to millimeters. @since 2.1.2

public static float InchesToMillimeters(float value)

Parameters

value float

a value in inches

Returns

float

a value in millimeters

InchesToPoints(float)

Measurement conversion from inches to points. @since 2.1.2

public static float InchesToPoints(float value)

Parameters

value float

a value in inches

Returns

float

a value in points

IsSurrogateHigh(char)

public static bool IsSurrogateHigh(char c)

Parameters

c char

Returns

bool

IsSurrogateLow(char)

public static bool IsSurrogateLow(char c)

Parameters

c char

Returns

bool

IsSurrogatePair(char[], int)

public static bool IsSurrogatePair(char[] text, int idx)

Parameters

text char[]
idx int

Returns

bool

IsSurrogatePair(string, int)

public static bool IsSurrogatePair(string text, int idx)

Parameters

text string
idx int

Returns

bool

MillimetersToInches(float)

Measurement conversion from millimeters to inches. @since 2.1.2

public static float MillimetersToInches(float value)

Parameters

value float

a value in millimeters

Returns

float

a value in inches

MillimetersToPoints(float)

Measurement conversion from millimeters to points. @since 2.1.2

public static float MillimetersToPoints(float value)

Parameters

value float

a value in millimeters

Returns

float

a value in points

PointsToInches(float)

Measurement conversion from points to inches. @since 2.1.2

public static float PointsToInches(float value)

Parameters

value float

a value in points

Returns

float

a value in inches

PointsToMillimeters(float)

Measurement conversion from points to millimeters. @since 2.1.2

public static float PointsToMillimeters(float value)

Parameters

value float

a value in points

Returns

float

a value in millimeters

Skip(Stream, int)

This method is an alternative for the Stream.Skip()-method that doesn't seem to work properly for big values of size.

public static void Skip(Stream istr, int size)

Parameters

istr Stream

the stream

size int

the number of bytes to skip

ToUrl(string)

This method makes a valid URL from a given filename.

public static Uri ToUrl(string filename)

Parameters

filename string

a given filename

Returns

Uri

a valid URL

UnEscapeUrl(string)

Unescapes an URL. All the "%xx" are replaced by the 'xx' hex char value.

public static string UnEscapeUrl(string src)

Parameters

src string

the url to unescape

Returns

string

the eunescaped value