Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have designed, basically adjusted three different tables along in such a away that it seems to be a single table. All the three tables are different nos. of column.

Actually, I'm try to print the entire html(table) section exactly it appears on webpage where the design has been done using internal css and jQuery.


I'm using printThis.js to print....the code is as:

What I have tried:

JavaScript
$(document).on("click", "#btnPrintInvoice", function (e) {
            e.preventDefault();
            e.stopPropagation();
            $("#printableContent").printThis({
                debug: false,               
                importCSS: true,            
                importStyle: true,           
                printContainer: true,      
                loadCSS: "", 
                pageTitle: "Test002",
                removeInline: false,        
                printDelay: 333,            
                header: null,               
                formValues: true            
            });

        });
Posted
Updated 9-Nov-17 8:04am
v2

1 solution

I've worked with JSPDF before and encountered similar problems; the PDF rendering is not capable of using several of the standard HTML styling elements. It's a cool product, but it does have some serious limitations.

I had the most luck using Auto-Table[^] and creating a style strictly used when creating a printable table. It's going to take a bit of research and experimentation to get the styling right.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900