title: Creating a dynamically PDF with jSPDF
body: <p>I need to create a dynamic PDF.
  The text content could change so their positions also.</p>
  <p>The header cols is an object array like this:</p>
  <pre><code>[
      {
          &quot;title&quot;: &quot;Vagas Ocupadas&quot;,
          &quot;dataKey&quot;: &quot;occupiedVacancies&quot;
      },
      {
          &quot;title&quot;: &quot;Total de pés&quot;,
          &quot;dataKey&quot;: &quot;totalFeet&quot;
      },
      {
          &quot;title&quot;: &quot;ID&quot;,
          &quot;dataKey&quot;: &quot;id&quot;
      },
      {
          &quot;title&quot;: &quot;Local&quot;,
          &quot;dataKey&quot;: &quot;movementLocation&quot;
      }
  ];
  </code></pre>
  <p>And the content is also an object array like this:</p>
  <pre><code>[
      {
          &quot;occupiedVacancies&quot;: &quot;---&quot;,
          &quot;totalFeet&quot;: &quot;---&quot;,
          &quot;id&quot;: 1,
          &quot;movementLocation&quot;: &quot;Poita&quot;
      },
      
      {
          &quot;occupiedVacancies&quot;: &quot;---&quot;,
          &quot;totalFeet&quot;: &quot;---&quot;,
          &quot;id&quot;: 8,
          &quot;movementLocation&quot;: &quot;Garagem2&quot;
      },
      {
          &quot;occupiedVacancies&quot;: 6,
          &quot;totalFeet&quot;: 471,
          &quot;id&quot;: 9,
          &quot;movementLocation&quot;: &quot;Garagem&quot;
      }
  ];
  </code></pre>
  <p>It needs to be downloaded to the client, and I've tried using this:</p>
  <pre><code>    let doc = new jsPDF({ orientation: 'landscape', unit: 'px', floatPrecision: 2 });
      doc.setFont('Courier');
      doc.table(20, 30, this.exportData, this.cols, {printHeaders: true, autoSize: true});
      doc.save();
  </code></pre>
  <p>But without success... It gives me this error:</p>
  <blockquote>
  <p>getTextDimensions expects text-parameter to be of type String or type
  Number or an Array of Strings.</p>
  </blockquote>