如何在 Azure 中将 pdf 转换为 base64

How to convert pdf to base64 in Azure

我想将 pdf 文件转换为 base64,以便我可以在我的 Power BI 上查看它。我已经尝试 javascript 在 Logic 应用程序中内联,但它需要集成帐户,这可能会增加我的账单。有没有什么想法可以在 azure 中将 pdf 转换为 base64?

我不确定你的 pdf 存储在哪里。如果你没有将它存储在 azure blob 存储中,我认为你可以将它存储在 blob 存储中。然后我们可以从逻辑应用程序中的 blob 存储中获取 pdf,如下所示:

在 运行 逻辑应用程序后,它将在 base64 中得到 $content

顺便说一句:

如果您使用 javascript 内联,您可以在免费套餐中创建一个集成帐户。

将集成账号添加到逻辑应用后,您需要等待几分钟。如果您立即 运行 逻辑应用程序,它可能会显示错误消息 The integration account 'xxxxxxxxx' is still being provisioned. Please try again later.