CidTextCodec
CidTextCodec
概述
CidTextCodec 是 Aspose.PDF FOSS 中用于 Python 的一个类。
用于复合(Type0)字体显示字符串的代码编解码器。
此类提供了 4 个方法,用于在 Python 程序中处理 CidTextCodec 对象。可用的方法包括:__init__、decode_units、decoded_text、encode。在安装 Aspose.PDF FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:code_to_text。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
code_to_text | `` | 读取 | 获取代码到文本。 |
方法
| 签名 | 描述 |
|---|---|
| `init(code_to_text: Mapping[bytes, str], codespaces: Iterable[tuple[bytes, bytes]] | None, valid_codes: Mapping[bytes, Any] |
| `decode_units(raw: bytes, budget: _LoadBudget | None)→list[tuple[int, int, str |
| `decoded_text(code: bytes | None)→str |
encode(text: str) → `bytes | None` |