跳到主要内容

1 篇博文 含有标签「extract-text-from-pdf」

查看所有标签

在 Power Automate 中将 PDF 转换为文本文件:使用 PDF4me 将扫描的合同转换为可搜索的 SharePoint 语料库

· 阅读需 27 分钟
SEO and Content Writer

PDF4me 提取文本和图像 这是一个 Power Automate 操作,它将 PDF 的文本层作为数组返回。结合上游的 OCR 和下游的 Compose 连接,此流程可将 SharePoint 库中的每个 PDF 转换为匹配的文本。 .txt 文件已准备好进行人工智能搜索。

搜索如何操作,第一个结果是微软自己的 PDF 操作参考,其中描述了 Power Automate 桌面 操作。它们并不存在于云流中。正是因为这个细节,接下来的两个结果分别是 Reddit 帖子和 Power Platform 社区帖子,人们都在问同样的问题,却没有得到明确的答案。这个流就是直接的答案,它完全在云端使用标准层连接器运行。

流程概览
1. When a file is created (properties only)
SharePoint trigger on the library, scoped to the RagInput folder. Returns metadata, not bytes.
2. Get file content
Fetches the actual PDF bytes using the identifier the trigger handed over.
3. Convert PDF to editable PDF using OCR
Adds a text layer to scans. OCR Only When Needed skips PDFs that already have one.
4. Extract Text and Images
Returns the text as an array. Extract Images stays No.
5. Compose
join() flattens the texts array into one newline separated string.
6. Create file
SharePoint writes the string to /Shared Documents/RagText as .txt.