Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
AronC
Partner - Creator II
Partner - Creator II

Display or download supplier invoice pdf from REST api as filestream

I am trying to get images of invoices from our supplier system. When using postman the pdf is rendering directly. In Qlik app automation I use the "call URL" block. It works fine getting Ids etc, but when trying to get the pdf nothing happens. I get no output from the block. I don't get any errors either. I can also get the pdf using a powershell script without any problem.

In the documentation of the API it says "The content will be a returned as a filestream."

I am using Qlik Cloud and chrome as a browser.  

Anyone that has any idea how to proceed? I dont have to solve it using automation. Using an extension directly in GUI could would also be fine if there would be any extensions for the purpose. 

Showing invoices using REST should be a quite normal case I guess.

Cheers 😄

Labels (3)
1 Solution

Accepted Solutions
Emile_Koslowski
Employee
Employee

Hi, there's no out-of-the-box solution to render a webpage from within an automation.

If you really need this approach you could maybe try to build & host a webpage that can host PDF files that are stored on an FTP server?

Then your automation would do the following:

  1. Generate the PDF
  2. Store it on the FTP server (using the Cloud storage connector)
  3. Use the Redirect block to redirect to this webpage.

I know it's not an easy fix but I think it's the best we have without using extensions. If you're interested in using extensions, I suggest you ask the question again here: Qlik Sense extensions forum

 

View solution in original post

4 Replies
Emile_Koslowski
Employee
Employee

Hi @AronC ,

It won't be possible to display the file inside of the automation. But you can use the Cloud Storage connector to send it to another storage tool or to send it as an email attachment.

First, use the Open File block from the Cloud Storage connector and set the Source to HTTP.

  • Then to copy it to another tool, use the Copy File block. 
  • If you want to send it as an email attachment, use the Send Mail block from the Mail connector.

Please let me know if this resolves your question.

Kind regards,
Emile

AronC
Partner - Creator II
Partner - Creator II
Author

Thank you for your reply. In the end the goal isn't to display the pdf in automation. I need to render the pdf in a Qlik cloud app, but I guess using automation is the best tool to get mee there. 

Using "open file"-block is getting me one step further, I think. At least I now manage to download the pdf-file. Instead of emailing or storing the pdf, is there a way in automation to open a new tab in browser where the pdf is rendered after the "open file" block?

Emile_Koslowski
Employee
Employee

Hi, there's no out-of-the-box solution to render a webpage from within an automation.

If you really need this approach you could maybe try to build & host a webpage that can host PDF files that are stored on an FTP server?

Then your automation would do the following:

  1. Generate the PDF
  2. Store it on the FTP server (using the Cloud storage connector)
  3. Use the Redirect block to redirect to this webpage.

I know it's not an easy fix but I think it's the best we have without using extensions. If you're interested in using extensions, I suggest you ask the question again here: Qlik Sense extensions forum

 

AronC
Partner - Creator II
Partner - Creator II
Author

@Emile_Koslowski 

Thanks, You are awesome!