Skip to main content

getPDFPageCount

  • Type : (file: string) => Promise<number>

The parameter should be a valid Object URL of type string. If you have an object of type File ( typically generated by file upload libraries) in hand you must use URL.createObjectURL() to generate a valid URL object.

getPDFPageCount(file).then((pageCount) => {  // Do something with the page count})