How pdf.js loads all the pdf pages in one canvas, showing how many pages create several canvas

now it"s like this, how to implement a canvas that loads pdf, and then scrolls, otherwise the browser will slide down for a long time if there are too many pdf pages

/ / programs can only run on the server

window.onload = function () {
    //
    function createPdfContainer(id, className) {
        var pdfContainer = document.getElementById("pdf-container");
        var canvasNew = document.createElement("canvas");
        canvasNew.id = id;
        canvasNew.className = className;
        pdfContainer.appendChild(canvasNew);
    };

    //pdf
    //pdf
    function renderPDF(pdf, i, id) {
        pdf.getPage(i).then(function (page) {

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

            //
            //   canvas 
            //

            var canvas = document.getElementById(id);
            var context = canvas.getContext("2d");
            canvas.height = viewport.height;
            canvas.width = "825";

            //
            //  PDF  canvas 
            //
            var renderContext = {
                canvasContext: context,
                viewport: viewport
            };
            page.render(renderContext);
        });
    };
    //pdfcanvas
    function createSeriesCanvas(num, template) {
        var id = "";
        for (var j = 1; j <= num; jPP) {
            id = template + j;
            createPdfContainer(id, "pdfClass");
        }
        $("-sharppdf-container").append("<a href="javaScript:closePDF()" class="closeP"></a>");
    }
    //pdf
    function loadPDF(fileURL) {
        PDFJS.getDocument(fileURL).then(function (pdf) {
            // promise 
            var id = "";
            var idTemplate = "cw-pdf-";
            var pageNum = pdf.numPages;
            //
            createSeriesCanvas(pageNum, idTemplate);
            //pdf
            for (var i = 1; i <= pageNum; iPP) {
                id = idTemplate + i;
                renderPDF(pdf, i, id);
            }

        });
        

    }
    //pdf
    loadPDF("@(imgUrl)Script/PDF/tzzn.pdf");
    //pdf
    //loadPDF("Script/PDF/tzzn.pdf");

};

Apr.18,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb6bc5-25f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb6bc5-25f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?