Delete selected page from pdf based on matching content?

Guidance would be appreciated here. I'll do my homework once I have some bread crumbs to lead me down the right path.
I download 12 monthly bank statements, and then append them into one sequential pdf file. Total is about 50-60 pages per year.
Each month includes several repetitive and unnecessary pages. For example, there is always a template page for balancing the checkbook (which I never use), and depending on the number of pages in the statement there will often be a blank page containing the single sentence, "This page intentionally left blank."
I am able to use content-matching tokens successfully. For example, a match for "intentionally" easily identifies the blank pages.
Once I have a match, is there any way (via Hazel, CLI, Applescript, Automator) to delete the 8-12 matched pages interspersed throughout the longer pdf file?
* Scan contents of page 1.
* IF page contains "intentionally", THEN delete page.
* Next page ...
* Continue UNTIL last page
This is a relatively trivial example because it doesn't take too long to do this manually in Preview. OTOH, we're always looking for ways to identify and eliminate repetitive (and error-prone) tasks, and this process would be invaluable for more complex situations, or much larger files.
TIA
Ed
I download 12 monthly bank statements, and then append them into one sequential pdf file. Total is about 50-60 pages per year.
Each month includes several repetitive and unnecessary pages. For example, there is always a template page for balancing the checkbook (which I never use), and depending on the number of pages in the statement there will often be a blank page containing the single sentence, "This page intentionally left blank."
I am able to use content-matching tokens successfully. For example, a match for "intentionally" easily identifies the blank pages.
Once I have a match, is there any way (via Hazel, CLI, Applescript, Automator) to delete the 8-12 matched pages interspersed throughout the longer pdf file?
* Scan contents of page 1.
* IF page contains "intentionally", THEN delete page.
* Next page ...
* Continue UNTIL last page
This is a relatively trivial example because it doesn't take too long to do this manually in Preview. OTOH, we're always looking for ways to identify and eliminate repetitive (and error-prone) tasks, and this process would be invaluable for more complex situations, or much larger files.
TIA
Ed