Using OCD as a pivot format SugarcubeIT implemented a dedicated tool able to detect legal advertisement from PDF documents. Below image shows ruler detection with green dashed lines while advertisement detection is highlighted thanks to straight oblique colored lines.