You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: