I'm trying to use use PDFTron library "@pdftron/webviewer": "^6.2.3" , starting with this sample - https://github.com/PDFTron/webviewer-angular-sample
They have CoreControls namespace, described like this:
export declare namespace CoreControls {}
In my app.component.ts I'm using
import {CoreControls} from '@pdftron/webviewer';
Next I want to use this one:
ngOnInit() {
CoreControls.createDocument('blabla');
}
And got this error
"ERROR TypeError: Cannot read property 'createDocument' of undefined".
In general I need to use their API without WebViewer, like here - https://www.pdftron.com/documentation/web/guides/get-file-data-without-viewer/ . But something is really wrong, maybe I don't understand angular right, or TS, or maybe PDFTron is not optimised for angular.
I don't understand what I don't understand.