Table of Contents

Class PdfTextStrings

Namespace
PdfEngine.Vector.Objects
Assembly
PdfEngine.Vector.dll

Text strings (ISO 32000-2 7.9.2.2): UTF-16BE or UTF-16LE with a byte order mark, UTF-8 with one (PDF 2.0), else PDFDocEncoding. Language escapes (U+001B ... U+001B) inside UTF-16 text are dropped, as PDFium does.

public static class PdfTextStrings
Inheritance
PdfTextStrings
Inherited Members

Methods

Decode(PdfObject?)

Decodes a text string object; null for anything that is not a string.

public static string? Decode(PdfObject? obj)

Parameters

obj PdfObject

Returns

string

Decode(ReadOnlySpan<byte>)

public static string Decode(ReadOnlySpan<byte> bytes)

Parameters

bytes ReadOnlySpan<byte>

Returns

string

FormatDate(DateTime)

"D:YYYYMMDDHHmmSS+HH'mm'" for a local time, the form every reader shows.

public static string FormatDate(DateTime value)

Parameters

value DateTime

Returns

string

ParseDate(string?)

A PDF date (7.9.4, "D:YYYYMMDDHHmmSSOHH'mm'"), every part after the year optional. The result keeps the wall-clock time written in the file, as the viewer has always shown it.

public static DateTime? ParseDate(string? value)

Parameters

value string

Returns

DateTime?