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