The pdfviewer component contains inline lambdas used in promises.
This makes overrides very difficult / impossible without replacing the whole JS file due to the code being unreachable in client.
_getPage(pageNum) has a structure such as:
Instead of using inline promises, the promise could access a function defined at class level.
This would allow developers to set overrides granularly without having to replace the whole JS file.
Compile and replace the whole pdfviewer.tf source by the updated replacement.