Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify if web/viewer.js should be a module as well #8402

Closed
yurydelendik opened this issue May 11, 2017 · 2 comments
Closed

Verify if web/viewer.js should be a module as well #8402

yurydelendik opened this issue May 11, 2017 · 2 comments
Labels

Comments

@yurydelendik
Copy link
Contributor

See #7916.

(Converted and removed from ES6 modules project)

It's mostly blocked by our PDFViewerApplication type/global usage. We need to have application class (e.g. Application) that will accept some configuration which allow multiple instances of application to be hosted on the same page. DOM event bindings can be done via some manager (ApplicationManager).

@Snuffleupagus
Copy link
Collaborator

Given that the default viewer was written specifically for usage in Firefox (rather than standalone use), and that we in multiple places ask that people not use it as-is (see below), the question is if it's really worth the added complexity/code churn that this sort of re-factoring would bring when it's completely unnecessary in Firefox!?

Note that the default viewer is powered by various viewer components, and those can thus be used as a basis when building a custom viewer; see the basic examples at https://github.com/mozilla/pdf.js/tree/master/examples/components, or the mobile-viewer example at https://github.com/mozilla/pdf.js/tree/master/examples/mobile-viewer

All-in-all this issue is quite old, and I'm not quite sure it's worth doing this (from a general PDF.js project perspective); hence I'd suggest that we WONTFIX this issue. /cc @timvandermeij Opinions?


Please see http://mozilla.github.io/pdf.js/getting_started/#introduction (emphasis mine):

The viewer is built on the display layer and is the UI for PDF viewer in Firefox and the other browser extensions within the project. It can be a good starting point for building your own viewer. However, we do ask if you plan to embed the viewer in your own site, that it not just be an unmodified version. Please re-skin it or build upon it.

@timvandermeij
Copy link
Contributor

I agree. If this is ever necessary, we can reconsider, but for now I also don't really see the point of doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants