Problems encountered in the implementation of pdf online Preview with pdf.js

 var url = ".pdf";
 pdfjsLib.GlobalWorkerOptions.workerSrc = "../../asset/lib/goldenstand/pdf/pdf.worker.js";
 pdfjsLib.getDocument(url).then(function getPdfHelloWorld(pdf) {
        pdf.getPage(1).then(function getPageHelloWorld(page) {
                                var scale = 1;
                                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);
                            });
                        });

is that the undefined problem shown in the figure has not been solved in use. I don"t know what caused it

.

Note: require.js should not introduce pdf.js correctly

Apr.09,2021

has it been solved? I also encountered import pdfjsLib from 'pdfjs-dist' but printed pdfjsLib as underfind

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-1b42306-2c5da.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-1b42306-2c5da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?