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

    PDFJS in vue

    Help
    7
    9
    5917
    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.
    • D
      dwms last edited by

      How to use PDFJS in vue quasar framework?

      1 Reply Last reply Reply Quote 0
      • D
        dwms last edited by

        I would like to use this function

        https://github.com/mozilla/pdfjs-dist/blob/master/build/pdf.js#L939

        1 Reply Last reply Reply Quote 0
        • s.molinari
          s.molinari last edited by

          Out of curiosity, can you explain your use case for the PDF viewer? I mean, I know it is to view PDFs, but how does that fit in with your use of Quasar?

          Scott

          1 Reply Last reply Reply Quote 0
          • s.molinari
            s.molinari last edited by

            Good answer given in Discord from Max Matteo :

            check https://github.com/rossta/vue-pdfjs-demo

            https://rossta.net/blog/building-a-pdf-viewer-with-vue-part-1.html

            Scott

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

              Sorry for my bad English.
              I created a project with vue-cli to display pdf with this source: https://github.com/FranckFreiburger/vue-pdf
              Everything works fine.
              But when I created another project with quasar-cli and use the same code, it’s not working.
              Screenshot here:
              https://imgur.com/a/xHyKukj
              Anyone can help me?
              Thanks a lot.

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

                Well, without knowing any details about your implementation, I can say that your approach is incorrect. Your screenshot shows that you are trying to bring in webpack foo, but you cannot merely drop stuff into quasar that worked somewhere else, let alone that kind of stuff. We have a good introduction about how to do things “the quasar way” from the docs:

                https://quasar-framework.org/guide/introduction-to-quasar.html

                In particular you will want to look at integrating “plugins”.
                https://quasar-framework.org/guide/app-plugins.html

                1 Reply Last reply Reply Quote 0
                • C
                  coopersamuel last edited by

                  For anyone finding this thread trying to use PDFJS with your quasar app, see this comment/thread https://github.com/quasarframework/app-extension-qpdfviewer/issues/5#issuecomment-518041926

                  Also, don’t forget to import the webpack build from pdfjs-dist
                  const PDFJS = await import('pdfjs-dist/webpack')

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

                    At this point you could just use the app extension to view pdfs found here

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

                      So timely! I just saw this message. PDFJS has been integrated directly into QPdfviewer. You can pick which rendering engine you want to use.
                      https://forum.quasar-framework.org/topic/4244/quasar-qpdfviewer-v1-0-0-beta-4-release

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