你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
DocumentPage 类
从输入页中提取的内容和布局元素。
版本 2023-07-31 中的新增功能: 条形码和 公式 属性。
- 继承
-
builtins.objectDocumentPage
构造函数
DocumentPage(**kwargs: Any)
方法
from_dict |
将 DocumentPage 形状中的 dict 转换为模型本身。 |
to_dict |
返回 DocumentPage 的 dict 表示形式。 |
from_dict
将 DocumentPage 形状中的 dict 转换为模型本身。
from_dict(data: Dict) -> DocumentPage
参数
返回
DocumentPage
返回类型
to_dict
属性
angle
内容的一般方向顺时针方向,以 (-180, 180 之间的度为单位度量。
angle: float | None
barcodes
从页面中提取的条形码。
barcodes: List[DocumentBarcode]
formulas
从页面提取的公式
formulas: List[DocumentFormula]
height
图像/PDF 的高度(以像素/英寸为单位)。
height: float | None
lines
从页面中提取的行,可能同时包含文本元素和视觉元素。
lines: List[DocumentLine]
page_number
输入文档中从 1 开始的页码。
page_number: int
selection_marks
从页面中提取的选择标记。
selection_marks: List[DocumentSelectionMark]
spans
页面在阅读顺序中串联的内容的位置。
spans: List[DocumentSpan]
unit
宽度、高度和边界多边形属性使用的单位。 对于图像,单位为“像素”。 对于 PDF,单位为“英寸”。 可能的值包括:“pixel”、“inch”。
unit: str | None
width
图像/PDF 的宽度(以像素/英寸为单位)。
width: float | None
words
从页面中提取的字词。
words: List[DocumentWord]