at the moment I am using itext to read the page count of a pdf. This takes quite long because the lib seems to scan the whole file.
Is the page information somewhere in the header of the pdf, or is a full filescan needed?