Code Monkey home page Code Monkey logo

Comments (12)

ciriac avatar ciriac commented on July 18, 2024 7

@bw7432 This needs to be done in the source file of pdf.js. The library does not expose this option. It's just checking if the window parent is not equal to window and this does not play nicely with Angular's ui-router.

Search for this line (should be around line number 16301):
isViewerEmbedded: (window.parent !== window)

And change it to:
isViewerEmbedded: true

from angular-pdfjs-viewer.

ciriac avatar ciriac commented on July 18, 2024 1

Managed to do a quick fix for now.

I'm preventing the pdf viewer to update the window title by manually setting PDFViewerApplication.isViewerEmbedded to true. This works for my current configuration.

from angular-pdfjs-viewer.

bw7432 avatar bw7432 commented on July 18, 2024 1

@ciriac, thanks for clarifying. Works perfectly, thanks so much!

from angular-pdfjs-viewer.

jasny avatar jasny commented on July 18, 2024

@gerob311 We're using ui-router as well, but aren't experiencing these issues.

Please create a jsfiddle which demonstrates the problem.

from angular-pdfjs-viewer.

paulthegeek avatar paulthegeek commented on July 18, 2024

@gerob311 Have you tested this in other browsers? I am seeing a similar issue, but it seems to only happen in Chrome? Safari and Firefox seems to work fine.

from angular-pdfjs-viewer.

ciriac avatar ciriac commented on July 18, 2024

I'm encountering this same exact issue. Seems to only be happening in Chrome. Any update regarding this?

from angular-pdfjs-viewer.

josh256 avatar josh256 commented on July 18, 2024

@ciriac so far, your quick fix in Chrome seems to work, thanks!

from angular-pdfjs-viewer.

bw7432 avatar bw7432 commented on July 18, 2024

Managed to do a quick fix for now.

I'm preventing the pdf viewer to update the window title by manually setting PDFViewerApplication.isViewerEmbedded to true. This works for my current configuration.

Where should this be put? I'm having the same issue. Routes are not working correctly.

from angular-pdfjs-viewer.

alexburkhay avatar alexburkhay commented on July 18, 2024

any updates on this? Could we set it to true in pdf.js-viewer or pass some config somehow. (This library is a bower component in my project and all components ignored in git). Thanks.

from angular-pdfjs-viewer.

jasny avatar jasny commented on July 18, 2024

Added it to our TODO list.

from angular-pdfjs-viewer.

Matcrash avatar Matcrash commented on July 18, 2024

Any news on this issue ? Same situation than @alexburkhay ... Thanks

from angular-pdfjs-viewer.

rvmladenov avatar rvmladenov commented on July 18, 2024

Hi there ... is that option available now ? I am experiencing this same thing and I do not want to edit the vendor file.

from angular-pdfjs-viewer.

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.