Click here to Skip to main content
13,738,628 members
Rate this:
 
Please Sign up or sign in to vote.
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:

$(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 8-Nov-17 22:15pm
Updated 9-Nov-17 8:04am
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web05-2016 | 2.8.180920.1 | Last Updated 9 Nov 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100