.getPage(1);
  var scale = 1.5;
  var viewport = page.getViewport({ scale: scale, });
  // Support HiDPI-screens.
  var outputScale = window.devicePixelRatio || 1;

  // Prepare canvas using PDF page dimensions.
  var canvas = document.getElementById('the-canvas');
  var context = canvas.getContext('2d');

  canvas.width = Math.floor(viewport.width * outputScale);
  canvas.height = Math.floor(viewport.height * outputScale);
  canvas.style.width = Math.floor(viewport.width) + "px";
  canvas.style.height =  M