Skip to content
Snippets Groups Projects
Unverified Commit a4fc7864 authored by gabriellsh's avatar gabriellsh Committed by Diego Sampaio
Browse files

[FIX] PDF not rendering (#18956)

parent 7301fc4f
No related branches found
No related tags found
No related merge requests found
......@@ -42,10 +42,10 @@ async function renderPdfToCanvas(canvasId, pdfLink) {
loader.style.display = 'block';
}
const pdf = await pdfjsLib.getDocument(pdfLink);
const pdf = await pdfjsLib.getDocument(pdfLink).promise;
const page = await pdf.getPage(1);
const scale = 0.5;
const viewport = page.getViewport(scale);
const viewport = page.getViewport({ scale });
const context = canvas.getContext('2d');
canvas.height = viewport.height;
canvas.width = viewport.width;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment