title: Send PDF file from AngularJS to NodeJS
body: <p>i need to send a PDF file from angularjs client to NodeJS service.
  I did the angularjs service, and when i receive the file its a string like this:</p>
  
  <pre><code>%PDF-1.3
  3 0 obj
  &lt;&lt;/Type /Page
  /Parent 1 0 R
  /Reso
  </code></pre>
  
  <p>How can i reconvert this string to PDF in NodeJS?</p>
  
  <p>This is the client code:</p>
  
  <pre><code>var sendByEmail = function () {
                  $scope.generatingPdf = true;
                  $('#budget').show();
                  var pdf = new JsPDF('p', 'pt', 'letter');
                  var source = $('#budget')[0];
                  pdf.addHTML(source, 0, 0, function () {
                      var resultPdf = pdf.output();
                      BillService.sendByEmail("rbrlnx@gmail.com", resultPdf).then(function () {
  
                      });
                      $('#budget').hide();
                  });
              };
  
   var sendByEmail = function (email, file) {
              var deferred = $q.defer();
              var data = {
                  email: email,
                  file: file
              };
              BillService.sendByEmail(data, function (result) {
                  deferred.resolve(result);
              }, function () {
                  deferred.reject();
              });
  
              return deferred.promise;
          };
  </code></pre>
  
  <p>The server code controller its empty:</p>
  
  <pre><code> var sendByEmail = function (req, res, next) {
  
          var file = req.body.file;
  
   };
  </code></pre>