arkokoley / pdfvuer

A PDF viewer for Vue using Mozilla's PDF.js that supports both Vue2 and Vue3
https://arkokoley.github.io/pdfvuer
MIT License
918 stars 131 forks source link

ArrayBuffer is not supported #114

Closed maximiliannocker closed 2 years ago

maximiliannocker commented 2 years ago

It is not possible to pass an arraybuffer to the createLoadingTask method

valh1996 commented 2 years ago

It is not possible to pass an arraybuffer to the createLoadingTask method

Hi, can you tell a little more about what you want to achieve?

If you have an arrayBuffer, you can turn it into a Uint8Array and pass it to the reader directly :

const dataArray = new Uint8Array(yourArrayBuffer);

And pass it directly:

<pdf src="{ data: dataArray }">