This has been possible in Acronat Pro for a while though I have not really tried it out myself - please check out this help article (scroll towards the bottom and look for "Find and remove hidden content"):
Hi Olaf, thanks for your reply.
The redaction option is the problem, actually. It is not precise enough. It removes all kinds of hidden text at once (doesn't allow specific choices) and after that it converts the PDF into an image. It would be a huge improvement if you could specify that only text that is hidden by a mask could be removed.
When you scan a paper into PDF and have an OCR function applied to it, it also has hidden text. But in this case it helps to make the content searchable: then it's Okay to leave it. There the redaction tools help you to erase text that was visible on paper AND was added as invisible text in the OCR layer.
If you would continue the redaction process and delete all hidden text, you would lose your OCR-text again. You don't want to do that either, because then your PDF wouldn't be searchable at all anymore.
Found it! :-)
I just managed to compose a preflight action that removes objects that are outside the current clipping area. This doesn't remove the invisible ocr text: that text has no color, is on top of the image of the page, and is NOT inside a clipping area. The text (as well as other objects) that is found outside any clipping area and therefore invisible will be removed.
- Make a new preflightprofile
- Go to the section of Custom Fixups
- Click on the plus sign at the bottom to make a new one
- Give your fixup a proper name like 'remove masked objects' (top left)
- Type 'Remove' in the search field (top right)
- Choose Remove Objects, from the list
- At the bottom, click on the plus sign to the right of 'apply only to objects defined by a check'. Because removing clipped objects isn't predefined.
- You get a new window, in which you should give a name again (top left).
- enter a new search phrase (top right): Clipping.
- Choose 'Object is outside current clipping area'
- Set it to be true (bottom)
- Click OK (bottom right)
- Make sure that your new check with your name (8) is chosen where it says to remove objects that are defined by a check.
- Click OK again (bottom right)
- And again.
- And you're good to go. Execute the name of the preflight profile which you gave a name (4). Choose it, an click Analyse and Fix (bottom right). Done.