Download PDF from Xano - content-type:application/pdf

With some help of the Xano community I now return a PDF from Xano as application/pdf content-type.

How can I download the returned PDF in Weweb?

Hi @FHEXL

I would try to have Xano return a URL to the PDF instead of raw data, and then use the “Download file from URL” action. You can also configure Xano to return PDF data as a Base64 encoded string.

If Xano is returning Base64 encoded PDF data, you can use Weweb’s “Create URL from Base64” action, followed by the “Download file from URL” action.

You can also use a Blob if you want to work with raw data:

  1. Xano returns raw PDF data
  2. In Weweb, need custom JavaScript to:
  • Create a Blob
  • Generate a URL from the Blob
  • Trigger the download

The URL or Base64 methods are simpler.

Thank. Tried both. Eventually I decided to store de PDF in a Cloud storage bucket. I am able to download that file using navigate to external URL in Weweb