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
| Name | Type | Access | Description |
|---|---|---|---|
code_to_text | `` | Read | Gets the code to text. |
Methods
| Signature | Description |
|---|---|
__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 | None | Calls decoded_text(code) on this CidTextCodec instance. |
encode(text: str) → bytes | None | Encode text as code bytes, or None if any part is unmappable. |