Document with hundreds of dates give spinning beachball

Normally the parameter - If "Contents contain match.. Date" works fine with all my documents.
I normally check that it is finding the right date by using "Preview rule" and clicking on the green tick next to the parammeter. the date appears at the bottom of the pop-up box.
With one type of pdf document in particular "Tax Report", the above parameter will seemingly find a date, but I don't know which one (it has the green tick), but clicking on the green tick produces the spinning beachball, requiring me to force quit Hazel.
It's not just the date variable which is a problem. Other variables such as If "Contents contain match.. Page Number 123" will also prodiuce the spinning beachball if I click on the green tick.
There is no problem with the rule which works fine with every other pdf document. Trying other rules on the same document produces the same result, so it's definitely a problem with the document and not the rule.
The pdf document in question is about 70 pages long and there are up to 30 dates per page. The pdf is in Landscape mode. Every line of the document seems to be OCR readable. Could this be due to the size of the doucment, or because it is in Landscape mode, or some other reason?
Update: If I shorten the document to just the first 5 pages, there is no problem.
I normally check that it is finding the right date by using "Preview rule" and clicking on the green tick next to the parammeter. the date appears at the bottom of the pop-up box.
With one type of pdf document in particular "Tax Report", the above parameter will seemingly find a date, but I don't know which one (it has the green tick), but clicking on the green tick produces the spinning beachball, requiring me to force quit Hazel.
It's not just the date variable which is a problem. Other variables such as If "Contents contain match.. Page Number 123" will also prodiuce the spinning beachball if I click on the green tick.
There is no problem with the rule which works fine with every other pdf document. Trying other rules on the same document produces the same result, so it's definitely a problem with the document and not the rule.
The pdf document in question is about 70 pages long and there are up to 30 dates per page. The pdf is in Landscape mode. Every line of the document seems to be OCR readable. Could this be due to the size of the doucment, or because it is in Landscape mode, or some other reason?
Update: If I shorten the document to just the first 5 pages, there is no problem.