diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue index e63997bcd..a7c222cce 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue @@ -277,8 +277,8 @@ const signature = window.signature; console.log(signature); -const mountPdf = async (url: string) => { - const loadingTask = pdfjsLib.getDocument(url); +const mountPdf = async (doc: ArrayBuffer) => { + const loadingTask = pdfjsLib.getDocument(doc); pdf = await loadingTask.promise; pageCount.value = pdf.numPages; await setPage(page.value); @@ -317,7 +317,8 @@ async function downloadAndOpen(): Promise { console.error("error while downloading and decrypting document", e); throw e; } - await mountPdf(URL.createObjectURL(raw)); + const doc = await raw.arrayBuffer(); + await mountPdf(doc); return raw; }