CidTextCodec

Overview

CidTextCodec is a class in Aspose.PDF FOSS for Python.

Code codec for a composite (Type0) font’s show strings.

This class provides 4 methods for working with CidTextCodec objects in Python programs. Available methods include: __init__, decode_units, decoded_text, encode. All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package. Properties: code_to_text.

Properties

NameTypeAccessDescription
code_to_text``ReadGets the code to text.

Methods

SignatureDescription
__init__(code_to_text: Mapping[bytes, str], codespaces: Iterable[tuple[bytes, bytes]] | None, valid_codes: Mapping[bytes, Any] | Iterable[bytes] | None, opaque_unknown: bool, budget: _LoadBudget | None)Calls init(code_to_text, codespaces, valid_codes, opaque_unknown, budget) on this CidTextCodec instance.
decode_units(raw: bytes, budget: _LoadBudget | None)list[tuple[int, int, str | None]]Split raw into (offset, length, text) units, one per code.
decoded_text(code: bytes | None)str | NoneCalls decoded_text(code) on this CidTextCodec instance.
encode(text: str)bytes | NoneEncode text as code bytes, or None if any part is unmappable.

See Also