We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9890f35 commit 86e57bdCopy full SHA for 86e57bd
examples/components/simpleviewer.js
@@ -92,10 +92,12 @@ const loadingTask = pdfjsLib.getDocument({
92
cMapPacked: CMAP_PACKED,
93
enableXfa: ENABLE_XFA,
94
});
95
-loadingTask.promise.then(function (pdfDocument) {
+
96
+(async function () {
97
+ const pdfDocument = await loadingTask.promise;
98
// Document loaded, specifying document for the viewer and
99
// the (optional) linkService.
100
pdfViewer.setDocument(pdfDocument);
101
102
pdfLinkService.setDocument(pdfDocument, null);
-});
103
+})();
package.json
0 commit comments