title: Export pdf UTF-8 encoding
body: <p>I have some trouble with exporting data to pdf with arabic characters
  , <strong>the encoding is incorrect</strong></p>
  
  <p>I tried <a href="https://parall.ax/products/jspdf" rel="nofollow noreferrer">jsPDF</a> with <a href="https://github.com/simonbengtsson/jsPDF-AutoTable" rel="nofollow noreferrer">jsPDF-AutoTable</a> plugin, and i tried <a href="https://pdfmake.github.io/docs/" rel="nofollow noreferrer">pdfMake</a> But the problem still exists</p>
  
  <p>In addition, I am using ASP.Net Boilerplate v3.2.4 as a backend, Angularjs v1.7.5</p>
  
  <p>i want to export ui-grid data to PDF</p>
  
  <p>Here look at my angularjs code:</p>
  
  <pre><code>vm.exportPdf = function () {
              var columns = [];
              var rows = [];
  
              // copy ui-grid's titles to pdf's table definition:
              var allColumnDefs = vm.gridOptions.columnDefs;
              for (var columnIdx in allColumnDefs) {
                  var columnDef = allColumnDefs[columnIdx];
                  if (columnDef.name !== 'actions') {
                      var newColumnDef = {
                          title: columnDef.displayName,
                          dataKey: columnDef.name
                      };
                      columns.push(newColumnDef); 
                  }
              }
  
              // copy ui-grid's actual data to pdf's table:       
              var allRecords = vm.gridOptions.data;
              for (var recordIdx in allRecords) {
                  var record = allRecords[recordIdx];
                  var newRow = {};
                  for (var columnIdx1 in allColumnDefs) {
                      var columnDef1 = allColumnDefs[columnIdx1];
                      var value = record[columnDef1.name];
                      if (value !== null) {
                          newRow[columnDef1.name] = value;
                      }
                  }
                  rows.push(newRow);
              }
  
              var docName = 'myFile.pdf';
              var doc = new jsPDF('p', 'pt');
              doc.autoTable(columns, rows, { styles: { fontSize: 8.5 } });
              doc.save(docName);
          };
  </code></pre>
  
  <p><strong>OUTPUT arabic characters look like this:</strong> </p>
  
  <pre><code>þÿ41C) 'DG1E DD-H'D'
  </code></pre>
  
  <p>so my question here is whether anyone has experienced this problem and what is the solution for it.</p>
  
  <p>or are there other libraries or plugins to exporting to PDF but support UTF-8 and arabic characters.</p>
  
  <p>Thanks.</p>