I have a large PDF file that contains data for invoices. I'm using a pdf splitter, but it will only split based on the number of pages of the invoice, so each invoice must be the same number of pages. Is there a way to scan through the pdf, looking for a specific word then count how many pages there are in each invoice looking for the invoice with the most number of pages and then add blank pages to the invoices that don't have meet that maximum?
You can get the words in the file using the getPageNthWord method. Then when you find it save the page number to an array and continue to the next match. At the end of that process you'll have an array with the first page numbers of all the invoices (the last item in that array should be the last page in the file). Deduct the values from one another to get the length of each invoice. The largest value is the one to use. Then go back and insert the blank pages (using the newPage method) where needed.
If finally you would prefer to hire someone to do it for you, feel free to contact me privately (try6767 at gmail.com), to discuss it further.