Creating indexes array from pdf file