title: Page footer not showing in pdfmake
body: <p>I have the following code which generates a datatable pdf upon pdf click. Inside the customize function, I have a footer code which is supposed to display page numbers. </p>
  
  <pre><code>   $(document).ready(function () {
              //SHOW EXSITING LINE ITEMS
              var id = @Model.Order.Id;
              table = $("#orders").DataTable({
                  dom: 'Bfrtip',
                  buttons: [
                   {
                      text: 'Download PDF',
                      extend: 'pdfHtml5',
                      className:'btn btn-primary',
                      orientation: 'landscape',                   
                      },
                      customize: function (doc) {               
                          //set header
                          doc.content[0].text = "SALES ORDER";
                          doc.page
                          doc.pageMargins = [10, 10, 10, 10];
                          doc.defaultStyle.fontSize = 12;
                          doc.styles.tableHeader.fontSize = 14;
                          doc.styles.title.fontSize = 14;
                          // Set page title
                          doc.content[0].text = "SALES ORDER";
                          // Create a footer
                          doc.footer = (function (page, pages) {
                              return {
                                  columns: [
                                      'This is your left footer column',
                                      {
                                          // This is the right column
                                          alignment: 'center',
                                          text: ['page ', { text: page.toString() }, ' of ', { text: pages.toString() }]
                                      }
                                  ],
                                  margin: [10, 0]
                              }
                          });
                      }
                  }
              ],
  </code></pre>
  
  <p>I have added a footer code as seen above but I cannot seem to get the footer in my pdf. What am I doing wrong here? </p>