How to get page number from the PDF using Javascript

We are having list of Single page PDF. The pdf are named in the order,
ISBN_Author_01.PDF  (with real page number as i)
ISBN_Author_02.PDF  (with real page number as ii)
ISBN_Author_03.PDF  (with real page number as iii)
ISBN_Author_04.PDF  (with real page number as 1)
ISBN_Author_05.PDF  (with real page number as 2)
ISBN_Author_06.PDF  (with real page number as 3)
ISBN_Author_nn.PDF  (with real page number as 500)
Here each pdf has a page number and in sequential order.
The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
To do this task, I am writing a Javascript to get the real page number from the PDF.
Can anybody help me how to get the page number from the PDF using Javascript.

The "real" page number within a PDF is the count of the physical page starting at 0, zero.
pageNum numPages
The number printed on each page is the page label.
setPageLabels  getPageLabel
You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.