Linkooo
Linkooo

Reputation: 11

My CSS gone after printing my modal using prinThis.js

I am using Modal and i Want to print it, but when i am trying to print it using printThis.js its Style/Css remove.

How to fix this.

The code and the example output is below:

<script>

    function PDFPrint() {

        $("#printthispdf").printThis({
            importCSS: true,
            importStyle: true,
            loadCSS: "/Content/SnapCSS/printpdf.css",
            printContainer: true,
            pageTitle: "PDF Export",
            removeInline: false,
            printDelay: 0,
            header: null,
            formValues: true,
            copyTagClasses: true, 
        });


    }
</script>

<div id="myModal" class="modal fade" role="dialog">
     <div class="modal-body" id="printthispdf">
//code here
     </div>
</div>

enter image description here enter image description here

Upvotes: 1

Views: 101

Answers (0)

Related Questions