<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="show.aspx.cs" Inherits="webpage.show" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="utf-8" />
    <title></title>
    <script src="Scripts/pdf.js" type="text/javascript"></script>
    <script type="text/javascript">
        window.onload= function showPdf() {
            var container = document.getElementById("container");
            container.style.display = "block";
            var url = '<%=urls%>';
            PDFJS.workerSrc = 'Scripts/pdf.worker.js';
            PDFJS.getDocument(url).then(function getPdfHelloWorld(pdf) {
                    pdf.getPage(1).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(2).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas1');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(3).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas2');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(4).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas3');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(5).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas4');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(6).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas5');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(7).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas6');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(8).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas7');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(9).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas8');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
                    pdf.getPage(10).then(function getPageHelloWorld(page) {
                        var scale = 2;
                        var viewport = page.getViewport(scale);
                        var canvas = document.getElementById('the-canvas9');
                        var context = canvas.getContext('2d');
                        canvas.height = viewport.height;
                        canvas.width = viewport.width;
                        var renderContext = {
                            canvasContext: context,
                            viewport: viewport
                        };
                        page.render(renderContext);
                    });
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="container">
        <div id="pop" style="width:100%">
            <canvas id="the-canvas"></canvas>
            <canvas id="the-canvas1"></canvas>
            <canvas id="the-canvas2"></canvas>
            <canvas id="the-canvas3"></canvas>
            <canvas id="the-canvas4"></canvas>
            <canvas id="the-canvas5"></canvas>
            <canvas id="the-canvas6"></canvas>
            <canvas id="the-canvas7"></canvas>
            <canvas id="the-canvas8"></canvas>
            <canvas id="the-canvas9"></canvas>
        </div>
    </div>
    </form>
</body>
</html>
