Skip to content
Discussion options

You must be logged in to vote

Currently I'm implementing a better solution, but in the meantime, let's fix your bug. Luckily, that's easy. With version 21 I've removed PDFViewerApplication from the window object. Polluting the global namespace was a dirty hack that has severe disadvantages.

Nowadays, you can use the PDFNoticationService to get the instance of the PDFViewerApplication:

constructor(notificationService: PDFNotificationService) {
    effect(() => this.PDFViewerApplication = notificationService.onPDFJSInitSignal());
}

Update: I've added the missing constructor to the showcase page.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rmdorsey
Comment options

Answer selected by rmdorsey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Solved user support You've got a question, or a misconfiguration, or simply need a hint how to get things up and running 21
2 participants