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

Do not use PDFJS.webViewerLoad to open pdf files #4

Open
moesjarraf opened this issue Mar 13, 2017 · 0 comments
Open

Do not use PDFJS.webViewerLoad to open pdf files #4

moesjarraf opened this issue Mar 13, 2017 · 0 comments

Comments

@moesjarraf
Copy link
Collaborator

moesjarraf commented Mar 13, 2017

We added a PDFJS.webViewerLoad function so we can decide when the pdf viewer should be initialized, and to open new files, but this is not the way to go. That function is meant to initialize the pdfviewer once and only once.

Instead we should remove that patch and just use PDFViewerApplication.open(file) as stated in the FAQ, to open different files. That function allows a string or an array of bytes as parameter.

So the webviewer should just be initialized on dom load. However, to prevent the pdfviewer from loading an initial file see #3

@moesjarraf moesjarraf changed the title Use PDFViewerApplication.open(file) instead of custom PDFJS.webViewerLoad Do not use PDFJS.webViewerLoad to open pdf files Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant