
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="PDF Viewer"/>

    <title>PDF Viewer</title>
</head>
123
<body>
  <div id="page">
    <canvas id="canvas"></canvas>
  </div>
  <div id="pdf-container">

</div>

<!--   <script type="text/javascript">
    alert(1);
  </script> -->


  <script src="<?php echo base_url();?>assets/js/pdf.js"></script>
  <script src="<?php echo base_url();?>assets/js/pdf.worker.js"></script>
  <script>
PDFJS.getDocument('/upload/3576eda0a4a6b0d87505cc2bef961f40.pdf').then(function(pdf) {
  for (var pageNum = 1; pageNum < pdf.numPages; ++pageNum) {
    pdf.getPage(pageNum).then(function(page) {
      // you can now use *page* here

      var scale = 1.5;
      var viewport = page.getViewport(1);

      var canvas = document.createElement('canvas');
      var context = canvas.getContext('2d');
      canvas.height = viewport.height;
      canvas.width = viewport.width;

      var renderContext = {
        canvasContext: context,
        viewport: viewport
      };
      page.render(renderContext);

      document.getElementById('pdf-container').appendChild(canvas);
    });
  }
})
</script>
  <!-- <script src="<?php echo base_url();?>assets/js/main.js"></script> -->
</body>
</html>
