This almost works but does not give me the cell borders. I found a working solution over here: Swapping out our Syntax Highlighter. And here is another try with mapping because a for loop is not accepted. Does Improved Abjuration affect spells that have a circumstantial ability check? The following code creates a static table and works properly: I tried putting all data in an array and call it. Client/server side PDF printing in pure JavaScriptFiled under miscellaneous. I’m trying to create an PDF with a dynamic created table in pdfmake.js. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. Earth was suddenly teleported away from the sun. Pass in an array of Deferreds to $.when(). Check out the playground and examples. The following code creates a static table and works properly: Generate PDF from HTML using pdfMake in Angularjs, How to convert html table to pdf using pdfmake. bower install pdfmake or copy them directly from the build directory from the repository. line-wrapping, text-alignments (left, right, centered, justified), numbered and bulleted lists, tables and columns It gives however the same result as the previous try: This topic was automatically closed 91 days after the last reply. How could the US Congress reduce the size of the US Supreme Court? If you have a main container div with a id="test", with this set of functions you just need to call pdfForElement('test').download(); Thanks for contributing an answer to Stack Overflow! Can physics be done without the use of time? This is unstable master branch for version 0.2.x, for stable version 0.1.x see branch 0.1. support for complex, multi-level (nested) structures. Can someone help me with a function that converts the html table into an object so that it can be pushed into a PDF file through pdfmake? Can it be done? Where should I put