Giter Site home page Giter Site logo

jdryg / angular-pdf-viewer Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 10.0 1.36 MB

Just another Angular directive for displaying PDF files using PDF.js

Home Page: http://jdryg.github.io/angular-pdf-viewer

License: Do What The F*ck You Want To Public License

JavaScript 0.25% HTML 0.26% CSS 0.11% Java 99.37%
angular directive pdf-viewer pdfjs

angular-pdf-viewer's People

Contributors

jdryg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-pdf-viewer's Issues

Jumping to next/prev search result

  1. Don't scroll the view if the result is already inside the viewport.
  2. If it's not in the viewport, scroll to a position a bit above the result (don't put it at the top of the page).

Text Selection

It throws error when i am trying to integrate in my ionic app. Is it mandatory to include all libraries in ionic?

pdf.worker.js needed but not that is not clearly stated

Hello,

Thanks for all this work, I am trying-out your pdf-viewer, it is very good btw.

Just a note, I think the file pdf.worker.js is needed when implementing the pdf viewer (my browser was looking for it and the issue was gone when I added it in /js/libs/) while it was not obvious (for me) that I would need it. Maybe a line in the Readme to remember us that we need it would be helpful.

Thanks again.

Search doesn't work correctly on some PDFs

Some PDFs have text divs without any text. These divs aren't inserted into the DOM by the text layer builder, but the directive is using them when searching. In other words, text div IDs are invalid when highlighting the results.

Example PDF: citygen_gdtw07.pdf (Citygen: An Interactive System for Procedural City Generation)
Search for: "city"

Line 466. $scope.$apply inside $digest

Sometimes when scrolling, updating the current page index inside $apply (line 466) reports an error. If I remove the $apply call, then the page isn't always updated!

upgrade pdf.js to latest

Please provide instruction for upgrading to later PDF.js versions, if possible.

Have you attempted to upgrade to the latest PDF.js? I swapped in 1.3.88 and 1.2.109 but the promises never seemed to fire. Are there changes that need to be made to PDF.js to make it compatible with this codebase?

Annotations

PDF.js viewer does it, so we should be able to do it too. Check pdf.js/web/annotations_layer_builder.js

Remove pages during scrolling

Since have lazy rendering in place, we might want to remove canvases and text layers for pages which aren't close to the viewport. This might speed things up with large documents.

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.