PDFsharp-net6

PdfString

Namespace: PdfSharp.Pdf

Represents a direct text string value.

public sealed class PdfString : PdfItem, System.ICloneable

Inheritance ObjectPdfItemPdfString
Implements ICloneable

Properties

Length

Gets the number of characters in this string.

public int Length { get; }

Property Value

Int32

Encoding

Gets the encoding.

public PdfStringEncoding Encoding { get; }

Property Value

PdfStringEncoding

HexLiteral

Gets a value indicating whether the string is a hexadecimal literal.

public bool HexLiteral { get; }

Property Value

Boolean

Value

Gets the string value.

public string Value { get; }

Property Value

String

Constructors

PdfString()

Initializes a new instance of the PdfString class.

public PdfString()

PdfString(String)

Initializes a new instance of the PdfString class.

public PdfString(string value)

Parameters

value String
The value.

PdfString(String, PdfStringEncoding)

Initializes a new instance of the PdfString class.

public PdfString(string value, PdfStringEncoding encoding)

Parameters

value String
The value.

encoding PdfStringEncoding
The encoding.

Methods

ToString()

Returns the string.

public string ToString()

Returns

String

ToStringFromPdfDocEncoded()

Hack for document encoded bookmarks.

public string ToStringFromPdfDocEncoded()

Returns

String

WriteObject(PdfWriter)

Writes the string DocEncoded.

internal void WriteObject(PdfWriter writer)

Parameters

writer PdfWriter