title: failed to read XRef stream pdfworker.js
body: <p>I am new to java script.I am getting an error in console Invalid Xref Stream. Its coming from pdf.worker.js.. Any clue why we get this error?</p>
  
  <pre><code>$scope.loadPDF = function(path) {
              // /!\ Function modified from library in order to mamage error view on pdf display /!\
              console.log('loadPDF ', path);
              $scope.$parent.$parent.isPdfError = false;
              PDFJS.getDocument(path, null, null, $scope.documentProgress).then(function(_pdfDoc) {
                  $scope.pdfDoc = _pdfDoc;
                  $scope.renderPage($scope.pageNum, function(success) {
                      if ($scope.loadProgress) {
                          $scope.loadProgress({state: "finished", loaded: 0, total: 0});
                      }
                  });
              }, function(message, exception) {
                  console.log("PDF load error: " + message);
                  $scope.$parent.$parent.isPdfError = true;
                  $scope.$parent.$parent.$digest();
                  if ($scope.loadProgress) {
                       $rootScope.completeProgress();
                      $scope.loadProgress({state: "error", loaded: 0, total: 0});
                  }
              });
          };
  </code></pre>