Image download from webviewer

I want to download the image that I have viewed using the WebViewer URL in this block so that I can print it. Please provide the process for doing this. I have tried many times, but it's not working

From your URL, I see your QR creation server API is documented at
https://goqr.me/api/doc/

From your blocks, I see you expect a file to arrive within the same event where you call upon that server to make you a QR code image file.

There is no instantaneous response to a Web Get.

Let's take a moment to read the server docs, so we can we can see what kind of hoops they want you to jump through to get a file back.

Thanks for the reply. Actually, I need to download the QR code image. I need the process for this. I am getting error 908. I have tried all methods, but it’s not working. Can you help me with this?

I did a little doc reading, and reviewed your blocks, and I came to these conclusions:

  • You don't need a WebViewer for this. The Web component is all you need.
  • You have to set your Web component to expect a file response, not text.
  • You need the Web event block that catches that incoming file, and grabs its file name, then sets up the Image component to show that image file.
  • The text you send needs to be cleaned by one of the Web blocks that cleans text to allow it to ride along in a URL...Look for the URI-encoding block, as I recall.

If you export and post your aia file, that would facilitate testing.

Never mind, I whipped up my own test app for the board:




qrserver.aia (2.2 KB)
sample run

P.S. Thanks for the link to that nice web site.

1 Like

(added to FAQ)

(added to FAQ)

In this, I need to download the generated QR code to my mobile for printing and after clicking the 'Scan QR Code' button, I want to read the printed QR code and display the result in a label. Can you please help me with this?

test.aia (9.2 KB)

What kind of printer do you have connected to your phone, and what are its specifications for receiving and printing images?

I am going to use a 3" portable thermal printer to print the QR code. It has an app and I will open the generated QR code in that app and print it.

image

I'm confused.

Why aren't you using the AI2 Scanner component?

Also, where is the BlueTooth component you would most likely use to communicate with a BlueTooth printer?