I am using PdfFileInfo class to calculate the number of pages of a pdf file.
When i call the constructor as shown below, it takes around 300 ms to create that object.
PdfFileInfo pdfFileInfo = new PdfFileInfo(bais);
Can this code be made faster to work? Are there any static methods that can be used to get the number of pages? Is there any other faster API available?