I have an SOE that creates a pdf and streams it back in the response and it works great. Now how can I call it using dojo or the esriRequest object to call the SOE and display the resulting pdf in a new window? I see the esriRequest has a handleAs that can be set to document, but I fail to see how it is implemented. I have seen examples of using dojo.io.iframe, but I prefer not to use a deprecated library.
var downloadPdfIframeName = "downloadPdfIframe";
var iframe = dojo.io.iframe.create(downloadPdfIframeName);
dojo.io.iframe.setSrc(iframe, url, true);
I would be nice if I could just use straight javascript and do something like window.open(encodeURIComponent(url)), but the url would be too long after I add all the parameters to the querystring and it would have to be a post request.
Any help piecing it together would be appreciated.
Thanks
Solved! Go to Solution.
In case anybody else comes across a similar problem, this is what I ended up doing:
In case anybody else comes across a similar problem, this is what I ended up doing: