I’m try to display pdf file which is embedded using base64 encoding in an html.
Below is the code I have written for this. The pdf file is displayed in chrome and firefox but not internet explorer. Any Idea how to get it working in IE?
<object data="data:application/pdf;base64,Base64String =" type="application/pdf" width="100%" height="100%"/>
Base64 encoding is used to encode binary data, such as a PDF file, into an ASCII string format that is compatible with systems that can only handle text. For example, email attachments and binary uploads in HTML forms are converted and transmitted as Base64 encoded data.
Base-64 maps 3 bytes (8 x 3 = 24 bits) in 4 characters that span 6-bits (6 x 4 = 24 bits). The result looks something like "TWFuIGlzIGRpc3Rpb...".
I believe the correct answer is you can't. http://msdn.microsoft.com/en-us/library/cc848897(v=vs.85).aspx
Base64 encoding in IE only works for certain image types and not PDF.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With