jqueryimageprintthis

Image not found when print document using jquery PrintThis


I'm print a web page using the jqueryThis plugin.

We are going to print the image and text, but when we are click print button, everything is fine, but still the image is not found on the print page.

How can I solve this problem?

enter image description here

<?php include("header.php");?>
<br /><br /> 
<li><a href="" onClick="return print_student()" >Print</a></li>
<div class="container " id="print_this" style=" color:black; ">
    <div class="container">
        <img src='images/as.jpg' width='50' height='50' />
    </div> 
    <div class="container">Mohsin Mushtaq</div> 
</div>
<script type="text/javascript">
function print_student(){
    $('#print_this').printThis({
        debug: false,
        printContainer:false,
        importCSS: true,
        loadCSS: "http://localhost/erp/css/bootstrap.min.css", 
        canvas: true, 
        base: true,            
        formValues: true,          
    });
    return false;
}
</script>
<?php include("footer.php");?>

Solution

  • You should add full url within the tag example http://domain/path/image.jpg