Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank page on Electron & Vue 3 #103

Open
elnicko opened this issue Aug 10, 2021 · 0 comments
Open

Blank page on Electron & Vue 3 #103

elnicko opened this issue Aug 10, 2021 · 0 comments

Comments

@elnicko
Copy link

elnicko commented Aug 10, 2021

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 component inside the 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant