Sorry if this has been asked before, I couldn’t find anything relevant.
I have table on my page that when a row is clicked it calls a Server Connect which does a GET request, passing the ID to an API which returns a response with a pdf stream.
{
"status": 200,
"headers": {
"content-type": "application/pdf",
"content-length": "14027",
"server": "nginx",
"expires": "Fri, 11 Nov 2022 16:31:54 GMT",
"cache-control": "max-age=0, no-cache, no-store",
"pragma": "no-cache",
"date": "Fri, 11 Nov 2022 16:31:54 GMT",
"connection": "close"
},
"data": "%PDF-1.7\r%�������\r1 0 obj\n .......... and so on
How would I go about getting the PDF to preview on the page in an iframe?
Thanks in advance
I know this has been talked about recently, but I’ve come to another hurdle.
I have a Server Connect that retrieves an invoice and I want to at least be able to download the generated pdf. (NodeJS)
Notice the very first character of what you see in the text editor is a ", and I bet in the end you’ll find another "
This means the PDF contents are being wrapped in a string, and you’re essentially downloading a JSON object containing the PDF file instead of the PDF file itself (this is just a technical explanation, you’re not required to understand it)
Unfortunately, I’m not familiar with Wappler’s download functionality, so I can’t really help you. But, check this topic, it might be the same issue: