I have a problem with printThis js plugins, it works fine on the local machine, but when I try to use it on the server the print file loses the css content and does not show the images and labels that are in the modal content. I already tried editing the plugin options, but without success.
HTML:
<div id="myModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<!-- CONTEUDO DO MODAL -->
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title text-center">Participe desta Promoção</h4>
</div>
<div class="modal-body">
<div id="print">
<input type="hidden" name="voucherId" id="voucherId" value=""/>
<img src="" alt="" class="logo-img" name="#voucherImg" id="voucherImg" width="300" height="250">
<div class="col-md-12 text-center">
<label class="texto " id="voucherName" name="voucherName"></label>
</div>
<div class="col-md-12">
<label class="texto" id="voucherDesc" name="voucherDesc"></label>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button type="button" class="btn btn-primary" id="btnPrint" >Print</button>
</div>
</div>
</div>
JS:
$(document).ready(function () {
$("#btnPrint").click(function () {
$("#print").printThis();
});
});
I'm using this plugin: link