title: printing image using window.print() in codeigniter php
body: <p>This is my script.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
       $(document).ready(function(){
  
            $('#pdf').click(function(){
                 printDiv();
                 function printDiv() {
                      var printContents = $(".right_content").text();
                      var originalContents = document.body.innerHTML;
                      document.body.innerHTML = printContents;
                      window.print();
                      document.body.innerHTML = originalContents;
                 }
            });
        });
  &lt;/script&gt;
  </code></pre>
  
  <p>This is my html code:</p>
  
  <pre><code>&lt;div class="right_content"&gt;
       &lt;img src="&lt;?php echo base_url()."images/12masi.png";?&gt;" alt="12masi" 
            title="image"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my button:</p>
  
  <pre><code>&lt;input type='submit'  value='Generate PDF' id="pdf"/&gt;
  </code></pre>
  
  <p>Problem is that Image is not displaying in print-preview.I m using google chrome.
  Is this a browser issue or something else??</p>