-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
In GENERIC
builds, dispatch a "webviewerloaded" event (from the webViewerLoad
function) before initializing the viewer
#10318
In GENERIC
builds, dispatch a "webviewerloaded" event (from the webViewerLoad
function) before initializing the viewer
#10318
Conversation
…s` with a `disablePreferences`, in `GENERIC` builds, `AppOption instead Rather than having a (somewhat) randomly choosen list of Preferences which `AppOptions` are allowed to override, it makes much more sense to simply add an AppOption to allow custom implementations to ignore Preferences altogether (it's also inline with the AppOption that allows the `ViewHistory` to be bypassed on load).
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/f717837fd8c65cf/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/f717837fd8c65cf/output.txt Total script time: 2.20 mins Published |
…bViewerLoad` function) before initializing the viewer With the removal of the global `PDFJS` object, in PDF.js version `2.0`, the viewer options are no longer as easily accessible as they previously were (and issues have been filed about this). In particular, since the viewer files aren't necessarily loaded *immediately*, this means that `PDFViewerApplication`/`PDFViewerApplicationOptions` aren't necessarily available directly. By dispatching an event once all viewer files are loaded but *before* the viewer initialization has run, setting `AppOptions` during load (in custom implementations of the default viewer) should hopefully become a little bit easier[1]. --- [1] In hindsight, this should probably have been implemented when the global `PDFJS` object was removed...
0ef08f9
to
0dc995c
Compare
GENERIC
builds, dispatch a "webviewerload" event (from the corresponding function) before initializing the viewerGENERIC
builds, dispatch a "webviewerloaded" event (from the webViewerLoad
function) before initializing the viewer
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/20bc7b7f0849a1e/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/20bc7b7f0849a1e/output.txt Total script time: 2.13 mins Published |
Thank you for improving this! |
Replace the
OVERRIDES
list inPDFViewerApplication._readPreferences
with adisablePreferences
, inGENERIC
builds, `AppOption insteadRather than having a (somewhat) randomly choosen list of Preferences which
AppOptions
are allowed to override, it makes much more sense to simply add an AppOption to allow custom implementations to ignore Preferences altogether (it's also inline with the AppOption that allows theViewHistory
to be bypassed on load).In
GENERIC
builds, dispatch a "webviewerloaded" event (from thewebViewerLoad
function) before initializing the viewerWith the removal of the global
PDFJS
object, in PDF.js version2.0
, the viewer options are no longer as easily accessible as they previously were (and issues have been filed about this).In particular, since the viewer files aren't necessarily loaded immediately, this means that
PDFViewerApplication
/PDFViewerApplicationOptions
aren't necessarily available directly. By dispatching an event once all viewer files are loaded but before the viewer initialization has run, settingAppOptions
during load (in custom implementations of the default viewer) should hopefully become a little bit easier[1]./cc @timvandermeij
[1] In hindsight, this should probably have been implemented when the global
PDFJS
object was removed...