pdfvuer icon indicating copy to clipboard operation
pdfvuer copied to clipboard

Blank page on Electron & Vue 3

Open elnicko opened this issue 3 years ago • 0 comments

I'm using Vue 3, Quasar and Electron and I'd like to show the first page of a PDF file. However I'm getting a blank page.

Versions

  • pdfvuer: 2.0.1
  • electron: 13.1.5
  • quasar: 2.0.1
  • vue: 3.1.2

Template

<template>
  <div
    class="q-ma-md"
    style="height: 500px; background-color: red;"
  >
    <pdf
      :src="fileUrl"
      :page="1"
      resize
    >
      <template #loading>
        loading content here...
      </template>
    </pdf>
  </div>
</template>

The file is provided using a blob URL in the src prop. In this case the 'loading content here...' text isn't shown at all. Also the PDF itself is not visible. The internalSrc seems to be initialized as a Promise. image image Interestingly, there is a <Resize/> component inside the <Pdfvuer/> that has always the height 0. image

Using an ArrayBuffer doesn't work either, however the slot is displayed and it stays there. Also the internalSrc seems to have been initialized the same as src, so no Promise this time. image image Also, in this case I get the following error in the console: image

Ideally I'd see the PDF's first page. Any ideas? Any help would be greatly appreciated.

elnicko avatar Aug 10 '21 05:08 elnicko