File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,10 @@ class BaseViewer {
443
443
// starts to create the correct size canvas. Wait until one page is
444
444
// rendered so we don't tie up too many resources early on.
445
445
onePageRenderedCapability . promise . then ( ( ) => {
446
+ if ( this . findController ) {
447
+ this . findController . setDocument ( pdfDocument ) ; // Enable searching.
448
+ }
449
+
446
450
if ( pdfDocument . loadingParams [ 'disableAutoFetch' ] ) {
447
451
// XXX: Printing is semi-broken with auto fetch disabled.
448
452
pagesCapability . resolve ( ) ;
@@ -471,9 +475,6 @@ class BaseViewer {
471
475
472
476
this . eventBus . dispatch ( 'pagesinit' , { source : this , } ) ;
473
477
474
- if ( this . findController ) {
475
- this . findController . setDocument ( pdfDocument ) ; // Enable searching.
476
- }
477
478
if ( this . defaultRenderingQueue ) {
478
479
this . update ( ) ;
479
480
}
You can’t perform that action at this time.
0 commit comments