[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Text.CMap.CMapTable

Class CMapTable

Namespace
GrapeCity.Documents.Pdf.Text.CMap
Assembly
GcDocs.Pdf.dll

Represents a CMap table.

A CMap specifies the mapping from character codes to character selectors, it is used to extract Unicode text from PDF documents. In most cases CMaps are fully embedded into the PDF document. But in rare cases a CMap in a PDF is specified by a PDF name object, where this name identifies a predefined CMap that should be known to the PDF processor.

public abstract class CMapTable
Inheritance
object
CMapTable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

IsPredefined

Gets a value indicating whether the CMap is predefined and is specified by name in a PDF file.

public abstract bool IsPredefined { get; }

Property Value

bool

Name

Gets or sets the CMap name.

public string Name { get; }

Property Value

string

Vertical

Gets a value indicating whether the CMapTable defines the vertical font.

public abstract bool Vertical { get; }

Property Value

bool

Methods

Load(Stream)

Loads a CMapTable from a specified stream.

See the PDF spec for the description of the CMap format.

This method will throw an exception if the stream content has unknown or unsupported format.

public static CMapTable Load(Stream stream)

Parameters

stream System.IO.Stream

The stream containing the CMap definition.

Returns

CMapTable

The created CMapTable object.

Load(string, bool)

Loads a CMapTable from a specified file.

See the PDF spec for the description of the CMap format.

If compressed is true then the content of the file will be decompressed using System.IO.Compression.DeflateStream.

This method will throw an exception if the file content has unknown or unsupported format.

public static CMapTable Load(string fileName, bool compressed = false)

Parameters

fileName string

The file containing the CMap definition.

compressed bool

Indicates whether the stream content is compressed and System.IO.Compression.DeflateStream should be used to decompress.

Returns

CMapTable

The created CMapTable object.

LoadCompressed(Stream)

Loads a CMapTable from a specified stream, the content of the stream will be decompressed using System.IO.Compression.DeflateStream.

See the PDF spec for the description of the CMap format.

This method will throw an exception if the stream content has unknown or unsupported format.

public static CMapTable LoadCompressed(Stream stream)

Parameters

stream System.IO.Stream

The stream containing the CMap definition.

Returns

CMapTable

The created CMapTable object.

Save(Stream)

Saves the CMapTable to the stream.

public abstract void Save(Stream stream)

Parameters

stream System.IO.Stream

The output stream.