Table of Contents

Class PdfString

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

A PdfString -class is the PDF-equivalent of a JAVA- string -object. A string is a sequence of characters delimited by parenthesis. If a string is too long to be conveniently placed on a single line, it may be split across multiple lines by using the backslash character () at the end of a line to indicate that the string continues on the following line. Within a string, the backslash character is used as an escape to specify unbalanced parenthesis, non-printing ASCII characters, and the backslash character itself. Use of the <I>ddd escape sequence is the preferred way to represent characters outside the printable ASCII character set. This object is described in the 'Portable Document Format Reference Manual version 1.3' section 4.4 (page 37-39). @see PdfObject @see BadPdfFormatException

public class PdfString : PdfObject
Inheritance
PdfString
Derived
Inherited Members

Constructors

PdfString()

constructors

public PdfString()

PdfString(byte[])

Constructs a PdfString -object.

public PdfString(byte[] bytes)

Parameters

bytes byte[]

an array of byte

PdfString(string)

Constructs a PdfString -object.

public PdfString(string value)

Parameters

value string

the content of the string

PdfString(string, string)

Constructs a PdfString -object.

public PdfString(string value, string encoding)

Parameters

value string

the content of the string

encoding string

an encoding

Fields

HexWriting

protected bool HexWriting

Field Value

bool

ObjGen

protected int ObjGen

Field Value

int

ObjNum

protected int ObjNum

Field Value

int

OriginalValue

protected string OriginalValue

Field Value

string

Value

The value of this object.

protected string Value

Field Value

string

encoding

membervariables

protected string encoding

Field Value

string

Properties

Encoding

methods overriding some methods in PdfObject

public string Encoding { get; }

Property Value

string

an array of byte s

Methods

GetBytes()

public override byte[] GetBytes()

Returns

byte[]

GetOriginalBytes()

public byte[] GetOriginalBytes()

Returns

byte[]

IsHexWriting()

public bool IsHexWriting()

Returns

bool

SetHexWriting(bool)

public PdfString SetHexWriting(bool hexWriting)

Parameters

hexWriting bool

Returns

PdfString

ToPdf(PdfWriter, Stream)

public override void ToPdf(PdfWriter writer, Stream os)

Parameters

writer PdfWriter
os Stream

ToString()

Returns the string value of the PdfString -object.

public override string ToString()

Returns

string

a string

ToUnicodeString()

other methods

public string ToUnicodeString()

Returns

string

a string