Thank you, Nigel, that seems the direction I need to go.
Chris, if Adobe Acrobat Pro had more scripting options, I would not even need to have this step. I could just open the 20,000 page PDF and use the Acrobat Split option at 800 page increments to make new 800 page documents from the original. The reason I cannot do that is, like I said, I need the page breaks near the 800 page mark to end with a series of the bar codes. In my list example, you see that tho the page numbers change, the barcodes stay the same for a certain amount of lines (this changes in the big doc also; some codes run for 6 lines, some for 12, some for 14, some for 8. The script does not know what it will find in this regard.).
Page 799 090001501
Page 800 090001501
Page 801 090001501
Page 802 090001501
Page 803 090001501
Page 804 090001501
Page 805 090001856
I could use Acrobat to split the 20000 page PDF doc into the first 800 page section. However, The bar code 090001501 at page 800 does not change until Page 805, where it becomes 090001856. So the 800 page pdf file is not what I need for the later step of breaking it out further into page levels. This is the need for my text file. My actual text file has 20000 lines. It is a key-pair list of the PDF page numbers and the respective 11-digit code that falls on that page. My script will break out the PDF into new PDFs depending on the page counts associated with the barcodes, but that is not my question here, that part is done.
I am trying to find an efficient way for my script to hit every 800 lines in the text list and at that point determine where the bar code series changes in the vicinity of lines 800, 1600, 2400, 3200, 4000, 4800, 5600, 6400, 7200, 8000, 8800, 9600, 10400, 11200, 12000, 12800, 13600, 14400, 15200, 16000, 16800, 17600, 18400, 19200, and 20000 in the text file. From there I will know exactly where the 11-digit codes change for each increment. Obviously, the bar code will not change exactly at line 14400. So I need the script to read forward from that point and find, for example, that the bar code with line 14400 will actually change at line 14408. Simple, right? Then the script goes to the next increment, 15200 and does the same thing. Maybe that 11-digit code change is at 15203. From that I get a list of the exact page breaks I want to split out the 20000 PDF into 800 page pdfs. I do not want to do all this manually; hence the need to script it.