Skip to content

Document Class

Represents an ANSI.SYS formatted document.

C#
public class Document : IDisposable

Inheritance object

Implements IDisposable

Creates a new document from the provided file name.

C#
public Document(string file)

file string
The file to load.

Gets or sets the ANSI.SYS bytes that make up the document.

C#
public byte[] AnsiBytes { get; set; }

A string representing the AnsiBytes.

C#
public string AnsiString { get; }

A stream that points to the AnsiBytes.

C#
public MemoryStream? Stream { get; }
C#
protected ~Document()

Creates a new document from an existing string representing ANSI.SYS codes and characters.

C#
public static Document FromAsciiString(string ansiContent)

ansiContent string
The ANSI.SYS encoded string.

Document
A new document.

Creates a new document from an existing byte array representing ANSI.SYS codes and characters.

C#
public static Document FromBytes(byte[] bytes)

bytes byte[]
The ANSI.SYS encoded byte array.

Document
A new document.