PDF: parse link annotations on every page, not just page 1
Annotations are now parsed for every page. This is cheap (a dict lookup per
annotation); walking the page content streams stays page-1-only, so the
existing optimization is preserved. That walk exists to feed ImageCount,
ImageArea/ImageRatio and the image extraction used for OCR.
ClickArea is still accumulated only for page 1, to stay consistent with
PageArea, both of which are used to calculate ClickRatio. LinkCount and the
URI list still cover every page.
Since links are now read from the whole document, add a pdf_max_uris setting
(default 30, 0 disables) capping the number of distinct URIs retained per
PDF, so a PDF stuffed with link annotations cannot flood the URI list and the
URIBL lookups that follow. Duplicate links to an already-seen URI do not
consume the cap, and LinkCount still counts every link.
git-svn-id: https://svn.apache.org/repos/asf/spamassassin/trunk@1936882 13f79535-47bb-0310-9956-ffa450edef68
8 files changed