             viewport: viewport
             textLayer: textLayer
 
-          page.render(renderContext).then () ->
+          page.render(renderContext).then ->
             return # Do nothing
           , (error) ->
             console.error "PDF Error", error

do () -> # To not pollute the namespace
  require = __meteor_bootstrap__.require

  canvas = require 'canvas'

        page.getTextContent().then (textContent) ->
          appendCounter = 0
          textLayer =
            beginLayout: ->
              #console.log "beginLayout"
            endLayout: ->
              #console.log "endLayout"
            appendText: (geom) ->
              width = geom.canvasWidth * geom.hScale
