Is it possible to programmatically delete pages in a multiple page pdf file if a specific text string appears on the page? If so, how hard is this and what approach should I take?
Programmatically through the Acrobat API? Yes, it's difficult. In particular, the "search" method performs a search, but returns nothing in the way of usable results to the programmer. For example, you don't know how many results, on what pages the results were found, or even when the search is complete. Real handy, huh?
I have done this, but in a very round-about way, using Search and ExecuteMenuItem, and had to prompt the user at least once. Acrobat's API is horrible, I would highly suggest working either upstream with the source documents, or with a robust PDF toolkit such as activePDF Toolkit.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.