Display a pdf file in mashup
hi,
I want to display a pdf file in a mashup (webframe), I Set the good url, but the problem is that when i click on a grid i download the pdf file instead of display it in a webframe.
help please.
hi,
I want to display a pdf file in a mashup (webframe), I Set the good url, but the problem is that when i click on a grid i download the pdf file instead of display it in a webframe.
help please.
Hello
The browser's behavior is determined by Content-Disposition HTTP header, see details here: https://stackoverflow.com/questions/6293893/how-do-i-force-files-to-open-in-the-browser-instead-of-downloading-pdf
Depending on how your ThingWorx is hosted, you'll have different options of configuring it. For exampl, if you have Nginx reverse proxy in front of your ThingWorx, then this config will make PDFs render inside browser instead of making it downloading them:
location ~* /(.*\.pdf) {
proxy_hide_header Content-Disposition;
add_header Content-Disposition "inline";
... the rest of redirect config ...
}
Regards,
Constantine
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.