Set isInitialised when initialised instead of explicitly calling page rendering
Make queueRenderPage react to pageNum and isInitialised changes.
Export total page count.
This was done for our internal project (we need to control the PDF viewer from outside), however if you feel like it fits, you can pull the changes in.
This was done for our internal project (we need to control the PDF viewer from outside), however if you feel like it fits, you can pull the changes in.