       setAnnotationsTransform "scale(#{1/dpiScale},#{1/dpiScale}) matrix(#{scaledViewport.transform.join ','})"
       ## Annotation links, based loosely on
       ## https://stackoverflow.com/a/20141227/7797661
-      page.getAnnotations().then (annotationsLoaded) -> setAnnotations(
+      setAnnotations(
         for annotation in annotationsLoaded
           if annotation.dest  # local link
             ## Refer to https://github.com/mozilla/pdf.js/blob/master/web/pdf_link_service.js goToDestination & _goToDestinationHelper

    renderTask = page.render
      canvasContext: context
      viewport: scaledViewport
    renderTask.promise.then ->
      replaceCanvas canvasRef, canvas
      setRendering false
      ## Clear existing annotations, and load this page's annotations

              annotation.explicitPage = 1 + await pdf.getPageIndex annotation.explicit[0]
          annotation
      )
    -> try renderTask.cancel()  # suppress pdfjs's error message
  , [page, windowWidth, fit, inView]

  onChangePage = (delta) -> (e) ->
