on 10-22-2015 12:22 PM
Hi All ,
I am getting PDF data from backend system and showing it in iframe pdf viewer with codes below . This solution works well at Chrome or Firefox .
var srcURL = "data:application/pdf;base64," +data;
oHTML.setContent( "<iframe src='"+srcURL+"' frameborder='0' style='position: absolute; height:100%; border: none' height='100%' width='100%''></iframe>");
But if I run the application at IE browser , it is showing an empty frame .
If you have any idea about it , please let me know .
Thanks .
Hello
Did you find a solution to the pdfviewer problem with ie11? If you solve it i will glad of you be able to share your solution....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Onur,
When reviewing the browser developer tools in IE, do you see if the PDF data is loaded correctly?
in you gateway implementation, did you add the HTTP response header content-disposition?
data: ls_header type ihttpnvp.
ls_header-name = 'content-disposition'.
ls_header-value = 'inline;filename=file.pdf'.
set_header( ls_header ).
Best regards,
Maarten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PDF data is loading correctly . But I didn't add content dispotion on my response header .
I found something that " Internet Explorer does not support the use of DATA URIs as the source of IFRAMEs "
at below website .
internet explorer - Workaround of showing a base64 pdf on IE9+ - Stack Overflow
So I need to give a pdf url into iframe tag .
Does Content dispotion solve my problem ? and Can you give me an example how I can use it in my JS code at Client side ?
Thanks .
Hi Onur,
Hmm, I wasn't aware of that... Like the link states, it could be a good workaround to open the URL to get the pdf in a new tab/window.
window.open("https://server_hostname/path/to/gw/service/pdfEntity/$value")
As I said, I'm not sure the content-disposition will solve the issue you are currently having (I suppose not when reading the link you have provided). Anyway, the content-disposition http header does not have to be handled by the UI. Basically you are telling the browser to show the pdf inline (and not as a download). This is handled automatically by the browser.
Good luck!
Best regards,
Maarten
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.