Power Automate Desktop 无法识别 pdf 表单元素

问题描述 投票:0回答:1

我正在开发一个过程,需要从一些 pdf 中提取一些数据。问题是 pdf 是使用 Adobe Livecycle Forms 8.2 创建的,因此它们具有交互元素,例如复选框、文本框等。

显然 Power Automate Desktop (PAD) 在检测这些元素时存在某种问题,因为当我尝试映射它们时却无法做到。我可以映射的唯一元素是“窗格”,它就像所有元素的顶部容器。这是该“窗格”的选择器结构

 > group[Class="AVL_AVView"] > pane[Class="AVL_AVView"] > group[Class="AVL_AVView"] > pane[Class="AVL_AVView"] > pane[Class="AVL_AVView"] > pane[Class="AVL_AVView"] > pane[Class="AVL_AVView"][Name="Panel de documentos"] > pane[Class="AVL_AVView"] > pane[Class="AVL_AVView"][Name="AVPageView"]

但是,我尝试使用另一个 RPA 工具 (UiPath),并且能够正确映射所有元素,但我无法在 Power Automate Desktop 中复制这些选择器。这是我能够使用 UiPath 映射的复选框选择器的示例:

<wnd app='acrobat.exe' cls='AcrobatSDIWindow' title='* - Adobe Acrobat Reader (64-bit)' /> <wnd aaname='Panel de documentos' cls='AVL_AVView' title='AVScrolledPageView' /> <wnd cls='AVL_AVView' title='AVPageView' /> <ctrl name='req_per_2_rdogrp' role='check box' />

所以,我的问题是是否有办法让 Power Automate Desktop 处理这些类型的文档?或者我可以以某种方式使用 UiPath 获取选择器并在 Power Automate 中复制它(选择器的结构不一样,所以我不知道如何正确执行)?

谢谢。

我尝试在网络浏览器中打开文件,但它显示以下消息:

*Please wait...   If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document.   You can upgrade to the latest version of Adobe Reader for Windows®, Mac, or Linux® by visiting  http://www.adobe.com/go/reader_download.   For more assistance with Adobe Reader visit  http://www.adobe.com/go/acrreader.   Windows is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. Mac is a trademark of Apple Inc., registered in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.*

或者这个:

*To view the full contents of this document, you need a later version of the PDF viewer. You can upgrade  to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html  For further support, go to www.adobe.com/support/products/acrreader.htm*

所以我也尝试为浏览器获取 Adobe Acrobat 的扩展或插件,但它不起作用(我尝试使用 Chrome、Edge 和 Mozilla)。

然后,我尝试将 pdf 转换为 Word、Excel 或 Power Point,但转换后的结构不一样,我也无法正确检测每个元素(复选框、文本框等)。

我尝试使用 itextsharp.dll 通过 powershell 阅读 pdf,但得到了与浏览器中相同的消息(但我并没有深入研究此选项)。

正如我提到的,它与 UiPath 配合得很好,我能够获取选择器并使用它们,但我不知道如何在 Power Automate 中复制它们(为此我需要使用 PAD)。

如果可能的话,我也愿意使用脚本来获取数据。

ui-automation uipath rpa pdf-form power-automate-desktop
1个回答
0
投票

可以在python中尝试提取pdf。 由于Python中有很多包可以用来阅读pdf文档。 例如:Pypdf2、tabula、fitz 等。 可以使用 RUN DOS 操作与电源自动化桌面集成。它具有调用Python脚本的能力。

尝试使用 python pdf 阅读。

© www.soinside.com 2019 - 2024. All rights reserved.