Table of Contents

Class StringToken

Namespace
UglyToad.PdfPig.Tokens
Assembly
UglyToad.PdfPig.Tokens.dll

Represents a string of text contained in a PDF document.

public class StringToken : IDataToken<string>, IToken, IEquatable<IToken>
Inheritance
StringToken
Implements
Inherited Members

Constructors

StringToken(string, Encoding)

Create a new StringToken.

public StringToken(string data, StringToken.Encoding encodedWith = Encoding.Iso88591)

Parameters

data string

The string data for the token to contain.

encodedWith StringToken.Encoding

The encoding used to generate the Data.

Properties

Data

The string in the token.

public string Data { get; }

Property Value

string

EncodedWith

The encoding used to generate the string in Data from the bytes in the file.

public StringToken.Encoding EncodedWith { get; }

Property Value

StringToken.Encoding

Methods

Equals(IToken)

public bool Equals(IToken obj)

Parameters

obj IToken

Returns

bool

GetBytes()

Convert the string in Data back to bytes.

public byte[] GetBytes()

Returns

byte[]

ToString()

public override string ToString()

Returns

string