How to split the pdf file basis on text name

Hello @GreenTea,

I want to split a pdf file according to the following string :
“MONTANT TOTAL RESTANT A RECOUVRER A LA DATE DU”

i had tested your workflow but it did not give the expected result!!!

I had tested your code my friend it did not work for me.

I have to split PDF document and the endpage of each range should contain “MONTANT TOTAL RESTANT A RECOUVRER”