title: iterating the logic to display on webpage
body: <p>I have a list of object, while getting each element of the object, I want to export each to individual pages inside the PDF.</p>
  
  <p>I am getting the data by iterating the list object(eg. <code>$scope.employees</code>). Currently when a user clicks on export button, the data is exported to the PDF. My requirement is each object while iterating should be stored in the individual pages of the PDF. Like for example the object with pageHeader "This is shown in page1" should be shown in page1, "This is shown in page2" should be shown in page2 of the PDF when opened etc...<br>
  Any suggestions on this would be appreciated.</p>
  
  <p>Please find a plunker demonstration here: <a href="https://plnkr.co/edit/HvKipjWCYsgujJOv6You?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/HvKipjWCYsgujJOv6You?p=preview</a></p>
  
  <p>Do I need to use <code>pageSplit:true</code> option while iterating the <code>$scope.employees</code>, any inputs?</p>
  
  <p>js code:</p>
  
  <pre><code>$scope.export = function(){
  alert("in pdf export");
  var pdf = new jsPDF('landscape');
  var width1 = pdf.internal.pageSize.width;
  var height = pdf.internal.pageSize.height;
  
  var source = "";
  $scope.employees.forEach(function(value){
      source+= value.pageHeader + "\n" +"\n";
  })
  specialElementHandlers = {
      // element with id of "bypass" - jQuery style selector
      '#bypassme': function (element, renderer) {
          // true = "handled elsewhere, bypass text extraction"
          return true
      }
  };
  margins = {
      top: 80,
      bottom: 60,
      left: 10,
      width: '100%'
  };
  // all coords and widths are in jsPDF instance's declared units
  // 'inches' in this case
  pdf.fromHTML(
      source, // HTML string or DOM elem ref.
      margins.left, // x coord
      margins.top, { // y coord
          'width': width1, // max width of content on PDF
          'elementHandlers': specialElementHandlers
      },
      function (dispose) {
          // dispose: object with X, Y of the last line add to the PDF
          //          this allow the insertion of new lines after html
          pdf.save('test.pdf');
      },
      margins
  );
  </code></pre>