Giter Site home page Giter Site logo

Vue-pdf parity? about vue-pdf-embed HOT 3 CLOSED

p3v9d5ui avatar p3v9d5ui commented on August 21, 2024
Vue-pdf parity?

from vue-pdf-embed.

Comments (3)

p3v9d5ui avatar p3v9d5ui commented on August 21, 2024 1

Hi @hrynko ,

Thank you! I've tested this and it works fine.

I've submitted a small PR: #11. This just adds the ability to supply a Uint8Array to the source property. It's just a matter of declaring that type, to avoid console warnings, because otherwise it works fine. Are you able to merge it?

from vue-pdf-embed.

hrynko avatar hrynko commented on August 21, 2024

Hi @p3v9d5ui,

Thank you! I hope that the experience of using vue-pdf-embed will not disappoint you.

In vue-pdf the page property is set to 1 by default, which is pretty weird for me. In contrast, vue-pdf-embed renders the entire document if the page property is not explicitly specified. So you don't have to iterate through the document manually. However, if needed, you can still access the number of pages in the document via template ref (see example).

As for working with links, this is not yet available, as well as the text layer itself. I plan to add this over time, however a pull request for this is welcome.

from vue-pdf-embed.

hrynko avatar hrynko commented on August 21, 2024

Secondly, to navigate to the correct page, I use vue-pdf's @link-clicked event to get the page number. Is this possible with vue-pdf-embed?

It is now available in 1.1.0. This release adds text and annotation layers that make documents searchable and selectable and links clickable (these layers can be disabled by the corresponding props). External links are handled as usual, while internal links are handled with the internal-link-clicked event.

It's worth noting that in this release the canvases have been wrapped in containers and additional divs have been added for the text and annotation layers. Also, because of these layers, the component is no longer scalable as it used to be. However, the scaling can be restored by disabling the layers (if you don't need them) and adding appropriate styles. Also, pages can now be assigned width and height (by default, width is container relative as before).

Thanks for this issue, I hope the new version will meet your needs.

from vue-pdf-embed.

Related Issues (20)

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.