hymhub / pdf-vue3

vue3 pdf viewer
https://hymhub.github.io/pdf-vue3/
MIT License
76 stars 15 forks source link

InvalidCharacterError when using URL in src #1

Closed BorisDelprat closed 1 year ago

BorisDelprat commented 1 year ago

Hello,

I'm trying to use this package to dynamically display many pdfs, but as soon as I try to display my remote pdfs I get this error : "InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."

`

<PDF v-if="docu.extension === 'pdf'" :id="vuePdf${docu.id}" :key="docu.id" class="vue-pdf" :src="docu.downloadPath" @on-complete="onLoadedContent()" />

`

The link is a S3 presigned url.

I tried with a local PDF file (the one you used as the example) but I get another error "Invalid Pdf Structure" (I need it to work with remote URLs tho).

I'm using Vue3 with Nuxt3.

Is this an issue or am I doing something wrong ?

hymhub commented 1 year ago

Hey, try the new version, it's now v1.0.4

npm update pdf-vue3

or

npm i pdf-vue3@1.0.4
TrendyTim commented 5 months ago

I am getting the same issue on v1.0.12 as the URL has a - in it and atob doesnt like it.

lm2343635 commented 5 days ago

I am getting the same issue on v1.0.12 as the URL has a - in it and atob doesnt like it.