Giter Club home page Giter Club logo

vite-vue3pdf's People

Contributors

jbtje avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vite-vue3pdf's Issues

Fatal error in iOS 15.3 and below

Hi
I have an issue that occurs in browsers in iOS devices (Safari and WebViews), version iOS 15.3 and lower.

TypeError: Ee.split("+").at is not a function. (In 'Ee.split("+").at(-1)', 'Ee.split("+").at' is undefined)

That breaks all other scripts execution.

 - vue3pdf version: 0.2.0
 - vue.js version: 3.2.45
 - vite version: 4.0.0
 - browser version: 15.3 (same a iOS version I guess)
 - OS version: iOS 15.3 and lower

Any chance for quick fix? I tried to go over it but no luck so far, and my deadline for it is just now.
Thanks in advance!

Error: No "GlobalWorkerOptions.workerSrc" specified.

This error occurs when using createLoadingTask.

pdf.js?v=3922a56a:15917 Uncaught (in promise) Error: No "GlobalWorkerOptions.workerSrc" specified.
    at get workerSrc [as workerSrc] (pdf.js?v=3922a56a:15917:12)
    at PDFWorker._initialize (pdf.js?v=3922a56a:15757:10)
    at new PDFWorker (pdf.js?v=3922a56a:15730:11)
    at Object.getDocument (pdf.js?v=3922a56a:14676:70)
    at Object.createLoadingTask (pdfjsWrapper.js?v=3922a56a:34:54)

@jbtje/vite-vue3pdf v0.2.0
vite v4.5.0
vue v3.3.6

Allow for text selection.

An idea. It would be nice to expose the option to make text selectable. Doesn't seem very hard to implement.

Page-loaded event triggers before file data is available on the canvas

Hi,

We are using your library as we had to upgrade an app from vue2 to vue3 and needed a version of vue-pdf that was compatible.

I am encountering an intermittent issue - It is more noticeable on the firefox browser but it has happened on both chrome and edge also, unfortunately there is no pattern to the issue. We use your library to "view" a PDF data on the canvas and then take snaps (canvas.toDataURL) of this canvas to store as an image each time a page is loaded.

Below is the pdf component that we use in our app

 <div ref="capture" id="pdfPlaceholder" v-if="fileData && fileDataLoadedAndAvailable === true">
    <pdf :src="fileData" :page="pageToShow" worker-src="/tools/vue-claims/pdfjs/pdf.worker.js"
      @num-pages="listenNumPages" @error="handlePDFLoadError" @page-loaded="handlePDFPageLoaded">
    </pdf>
  </div> 

I am noticing intermittently, that page-loaded event is triggered - and I can see the canvas on the screen but it has a height and width of 0 - there is no data on the canvas. Image attached showing blank canvas in the dom.

IMG_1826

Sometimes, on second attempt of the file upload, the canvas will be populated.

We have tried a number of fixes :

  1. A timeout
  2. Checking the fileData (:src) is both available and readable

Is there anyway to re-try the page-loaded step if the data is blank first time around? Is there something we are missing in our setup to make this work consistently?

More info can be provided if needed, any help appreciated. Thanks!

Edit : just to add some more info, on multipage documents - the first canvas might be blank but the subsequent pages are populated in the canvas.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.