I am trying to use the pdf.js library in a pre-compiled Angular 9 project.
I install using
npm i --save pdfjs-dist and
npm i --save @types/pdfjs-dist
Then from what I see online, I should be able to use
import * as pdfjsLib from 'pdfjs-dist'; to access it within my component. The problem is I get this error in my compiler:
I have tried many other ways to get a reference, but they either can't get the reference, or throw the same error message.
I have also tried what is suggested here: Importing namespace and interface with methods in TypeScript (TSX) in pdfjs-dist (PDFJS) however, I get errors telling me that PDFJSStatic is not an exported member.
Any help at all would be appreciated!
My goal is to be able to use the getDocument() function.