studio-web
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Studio Web 用户指南

上次更新日期 2025年12月18日

文档查看器

使用“文档查看器”控件呈现文档并在您的应用程序中内联显示。 例如,您可以使用“文档查看器”控件来显示可能位于各种来源(例如存储桶、实体或公共链接)中的发票文档或收据。

将文件分配给应用程序变量时,请确保变量的类型为IResource

如果只想显示图像,建议使用“图像”控件。

重要提示:

The Document Viewer uses a built-in PDF.js viewer, which works consistently across browsers. No browser configuration is required.

Working with IResource

If you obtain a file as an ILocalResource, it is automatically converted into an IResource using:
JobAttachment.fromResource(file) // file is a ILocalResourceJobAttachment.fromResource(file) // file is a ILocalResource
重要提示:

The following functions have been deprecated and should no longer be used:

  • .toLocalResource
  • .toAppsFile

Page Navigation

You can programmatically navigate to a specific page inside the Document Viewer using:

appsFile.NavigateToPage(pageNumber)appsFile.NavigateToPage(pageNumber)

常规

  • “来源” - 要显示的文档的来源。 支持的文件类型为图像( JPEGPNGBMPGIFWEBP )。
  • 隐藏 - 如果为 True,则在 Runtime 隐藏该控件。
  • “已禁用”- 如果为 True,则在 Runtime 禁用该控件。

Events

无事件。

样式

  • “控件对齐”- 默认情况下,继承父级对齐方式。可以设置与父级对齐方式不同的对齐方式。要默认返回到父级对齐方式,请取消选择覆盖的选项。

    注意:对齐方式取决于为父元素选择的布局(垂直水平)。
  • “边框”- 控件的边框。可以配置边框粗细颜色半径

  • “边距”- 控件的边距。默认情况下,边距设置为 4 像素。“上/下”和“左/右”边距属性结合使用。可以使用“边距”部分右侧的“链接”按钮分离这些属性。

  • “大小” - 控件的宽度和高度。 默认情况下,大小设置为auto ,这意味着320 x 410px 。 要设置最小值或最大值,请选择三点图标 (...)。

VB 属性

VB 属性

数据类型

描述

Source

IResource

当前查看的源文件。

Value

IResource

文档查看器控件附加或输出的值。

Hidden

布尔值

如果为 True,则在 Runtime 隐藏该控件。

Disabled

布尔值

如果为 True,则在 Runtime 禁用该控件。
  • Working with IResource
  • 常规
  • Events
  • 样式
  • VB 属性

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。