No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Error messages in console using QPdfviewer

    [v1] App Extensions
    3
    9
    875
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SB
      SB last edited by

      Currently installed QPdfviewer v1.0.0-beta.5

      Used example code from https://github.com/quasarframework/app-extension-qpdfviewer

      <div class="container q-pa-sm">
        <q-pdfviewer
          v-model="showPdf"
          :src="currentPdf"
          type="html5"
          content-class="fit container"
          inner-content-class="fit container"
        />
      </div>
      
      ...
      
      <style scoped>
        .container {
          max-width: 100%;
          max-height: 100%;
          min-width: 400px;
          min-height: 600px;
          width: 94vw;
          height: 75vh;
        }
      </style>
      

      PDF is shown as it should be.

      Got this console output:

      [Vue warn]: Error in v-on handler: "TypeError: handler.apply is not a function"
      
      found in
      
      ---> <QPdfviewer>
      
      ...
      
      TypeError: "handler.apply is not a function"
          VueJS 3
              invokeWithErrorHandling
              invoker
              _wrapper
      vue.runtime.esm.js:1888
          VueJS 6
              logError
              globalHandleError
              handleError
              invokeWithErrorHandling
              invoker
              _wrapper
      
      ...
      
      offsetParent is not set -- cannot scroll viewer.js:2538:13
          scrollIntoView resource://pdf.js/web/viewer.js:2538
          _scrollIntoView resource://pdf.js/web/viewer.js:8801
          _scrollIntoView resource://pdf.js/web/viewer.js:8273
          _resetCurrentPageView resource://pdf.js/web/viewer.js:8915
          _setCurrentPageNumber resource://pdf.js/web/viewer.js:8478
          scrollPageIntoView resource://pdf.js/web/viewer.js:8937
          _setScaleUpdatePages resource://pdf.js/web/viewer.js:8836
          _setScale resource://pdf.js/web/viewer.js:8904
          set currentScaleValue resource://pdf.js/web/viewer.js:8551
          setInitialView resource://pdf.js/web/viewer.js:1348
          load resource://pdf.js/web/viewer.js:1114
      
      1 Reply Last reply Reply Quote 0
      • Hawkeye64
        Hawkeye64 last edited by Hawkeye64

        @SB
        A couple of things I noticed:

        1. There is an error is on your v-on handler (ie: :)
        2. type="html5" but the second window is showing PDFjs and not the HTML5 viewer.

        What OS, browser and all that?

        SB 1 Reply Last reply Reply Quote 0
        • SB
          SB @Hawkeye64 last edited by

          @Hawkeye64
          Windows 10 Version 1809

          Same on Firefox 70.0.1 and Chromium 78.0.3904.108

          1 Reply Last reply Reply Quote 0
          • SB
            SB last edited by

            quasar 1.5.1 / quasar/app1.3.1

            SB 1 Reply Last reply Reply Quote 0
            • SB
              SB @SB last edited by

              @Hawkeye64
              Here are some additional infos:

              There was an older version of QPdfviewer installed in my project.
              After reading your hints on installing QPdfviewer in this case I performed uninstall and re-install of QPdfviewer.
              This didn’t solve the problem.

              1 Reply Last reply Reply Quote 0
              • SB
                SB last edited by

                @Hawkeye64

                After removing yarn.lock, node_modules and yarn install I still got the same error messages.

                quasar v1.5.3 / quasar/app v1.3.1

                1 Reply Last reply Reply Quote 0
                • SB
                  SB last edited by

                  @Hawkeye64

                  I created a new project with quasar create <project>.
                  Then I added QPdfviewer with quasar ext add @quasar/qpdfviewer.
                  Still the same.

                  quasar v1.5.4 / quasar/app v1.3.3

                  1 Reply Last reply Reply Quote 0
                  • M
                    Mickey58 last edited by

                    I get the same error message when using type=“html5” and Chrome, newest Quasar and QpdfViewer levels.

                    Apart from these error messages, QpdfViewer works without issues.

                    1 Reply Last reply Reply Quote 0
                    • Hawkeye64
                      Hawkeye64 last edited by

                      I will be looking into this over the weekend.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post