[]
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
Gets a value indicating whether the CMap is predefined and is specified by name in a PDF file.
public abstract bool IsPredefined { get; }
Gets or sets the CMap name.
public string Name { get; }
Gets a value indicating whether the CMapTable defines the vertical font.
public abstract bool Vertical { get; }
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)
stream
System.IO.StreamThe stream containing the CMap definition.
Loads a CMapTable from a specified file.
See the PDF spec for the description of the CMap format.
Ifcompressed
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)
fileName
stringThe file containing the CMap definition.
compressed
boolIndicates whether the stream content is compressed and System.IO.Compression.DeflateStream should be used to decompress.
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)
stream
System.IO.StreamThe stream containing the CMap definition.
Saves the CMapTable to the stream.
public abstract void Save(Stream stream)
stream
System.IO.StreamThe output stream.