简体   繁体   English

如何使用逻辑应用程序从二进制输出中将文件另存为pdf

[英]how to save file as pdf from binary output using logic app

I have HTTP output for body('HTTP') is - 我的body('HTTP')的HTTP输出是-

    {"statusCode":200,"headers":{"dataserviceversion":"2.0","sap-metadata-last-modified":"Fri, 09 Aug 2019 10:41:57 GMT",
"Cache-Control":"no-store, no-cache","Date":"Fri, 
09 Aug 2019 11:26:58 GMT","Content-Type":"application/atom+xml; type=feed; charset=utf-8","Content-Length":"1365811"},
"body":{"$content-type":"application/atom+xml; type=feed; charset=utf-8","$content":"PGZlZWQgeG1sbn

note - content-type is application/atom+xml 注意-内容类型为application / atom + xml

$content is having binary data which is nothing but pdf file. $ content具有二进制数据,仅是pdf文件。

I want to get this data and convert it into pdf file 我想获取此数据并将其转换为pdf文件

into sharepoint connector while create pdf file i send body('HTTP')?['content'] still unable to create a valid pdf file. 创建PDF文件时将其插入sharepoint连接器,但我发送body('HTTP')?['content']仍无法创建有效的PDF文件。 even tried only body('HTTP') same error. 甚至只尝试了body('HTTP')相同的错误。

在此处输入图片说明

while opening file it throws error - 打开文件时会引发错误- 在此处输入图片说明

in sharepoint create file connector i'm passing that binary string like - base64ToBinary(thatBinaryValue) but in sharepoint type is 在sharepoint创建文件连接器中,我正在传递该二进制字符串,例如base64ToBinary(thatBinaryValue)但在sharepoint类型中为

 "$content-type": "application/octet-stream",

在此处输入图片说明

I tried with HTTP trigger to process PDF, and I suppose it's caused by the content expression. 我尝试使用HTTP触发器来处理PDF,我想这是由内容表达式引起的。 If I use the @triggerBody()['$content'] to process pdf content, the file couldn't be open too. 如果我使用@triggerBody()['$content']处理pdf内容,则文件也无法打开。

So I change it to @triggerBody() to get the content and it works, so yours should be just body('HTTP') . 所以我将其更改为@triggerBody()以获取内容并且它可以工作,因此您的应该只是body('HTTP') You could have a try, hope this could help you. 您可以尝试一下,希望对您有所帮助。

Update : I tried with HTTP action, and got the same result, it's the expression problem. 更新 :我尝试使用HTTP操作,并得到了相同的结果,这是表达问题。 So just change the expression. 因此,只需更改表达式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用逻辑应用从网站下载文件? - How to download a file from website by using logic app? 使用Azure Logic App将响应从HTTP保存到Blob存储 - Save the Response from HTTP to Blob Storage using Azure Logic App 如何使用文件服务将二进制文件 (PDF) 上传到 Azure - How to upload a binary file (PDF) to Azure using File Services 如何从Logic App发送文件到功能应用程序? - How to send File from Logic App to function App? 我们如何使用Azure Logic App将数据从Sharpoint上载的CSV文件导入到CRM实体中? - How can we import data from CSV file uploaded on Sharpoint to the CRM entities using Azure Logic App? 如何使用 Azure 逻辑应用程序将 Json 文件从 Azure Blob 存储解析到 Azure Sql - How do I parse Json file from azure blob storage to Azure Sql using Azure logic app 如何从 azure blob 获取 csv 文件并使用逻辑应用程序将端点摄取到 Azure 事件中心? - How to get csv file from azure blob and ingest endpoint into Azure Event Hub using logic app? 如何将数组输出分配给逻辑应用程序变量? - How to assign array output to Logic app variable? 如何从Azure Logic App将文件传递给API - How to pass a file to an API from Azure Logic App Azure Logic App:如何将 HTTP 连接器的正文内容保存到 OneDrive 文件? - Azure Logic App: How to save HTTP Connector's body content to OneDrive file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM