UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

Document Understanding 活动

读取 XPS 文件

下一个示例说明了如何使用“读取 XPS 文本”“使用 OCR 读取 XPS”活动读取.xps文件,提取数据,并在两个消息框中提供输出。您可以在“UiPath.PDF.Activities”包中找到这些活动。

步骤

  1. 打开 Studio ,创建一个新“流程”
  2. 将“序列”容器拖动至“工作流设计器”
    • 根据下表创建变量:

      表格 1. 要创建的变量

      变量类型默认值
      ExactString字符串不适用
      ExtractWithOCRString字符串不适用
      备注:

      向项目目录添加“.xps”文件,以便能够从相同位置运行整个流程。

  3. Drag a Read XPS Text activity inside the Sequence container.
    • In the Properties panel, add the expression "XPSTextDemo.xps" in the FileName field.
    • Add the value "All" in the Range field.
    • 在“文本”字段中添加“ExactString”变量。
  4. “消息框”活动放置在“读取 XPS 文本”活动之后。
    • “属性”面板中,从“按钮”下拉列表中选择“确定”选项。
    • 在“文本”字段中添加“ExactString”变量。
    • Select the check box for the TopMost option for always having the message box displayed to the foreground.
  5. “使用 OCR 读取 XPS”活动拖动至“消息框”活动后。
    • In the Properties panel, add the expression "XPSOCRDemo.xps" in the FileName field.
    • Add the value 1 in the DegreeOfParallelism field.
    • Add the value "1" in the Range field.
    • 在“文本”字段中添加“ExtractWithOCRString”变量。
  6. Place a Microsoft OCR engine inside the Read XPS with OCR activity.
  7. “消息框”活动拖动到“使用 OCR 读取 XPS”活动之后。
    • 在“文本”字段中添加表达式 ExtractWithOCRString
    • In the Properties panel, select the Ok option from the Buttons drop-down list.
    • Select the check box for the TopMost option for always having the message box displayed to the foreground.
  8. 运行流程。 机器人使用指定流程提取数据,并在两个消息框中提供输出。

请访问以下链接,将该示例下载为ZIP格式的文件:示例

  • 步骤

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新