title: How to render a pdf from bytestream in ajax response
body: <p>I am working on a mobile application.we are using jquery-mobile.  </p>
  
  <p>we have an option to view or download the records in pdf format. I dont have the control on backend. I will get the pdf data in json object as an ajax response.I want to read that data and display in a pdf. I have next and previous links are also in the page so we need to display pdf in a div.</p>
  
  <pre><code>var data = {  
      .... : ....,  
      .... : ....,  
      "pdfstream" : "KioqKioqKioqKioq......",  
      ..... : ....  
  }  
  </code></pre>
  
  <p>am able to read all the data but not sure how can i read that bytestream and display as an pdf in the page.</p>
  
  <p><strong>UPDATE:</strong>
  My code is working fine. But the bytestream which am getting from server is wrong.  </p>
  
  <pre><code>    var obj = $('&lt;object type="application/pdf" width="100%" height="100%" border="2"&gt;&lt;/object&gt;'); 
          obj.attr('data','data:application/pdf;base64,'+bytestream);  
          $('#divContainer').append(obj);  
  </code></pre>
  
  <p>its working fine in all browsers expect in IE. Need to verify why its not working in IE.</p>