The business rules for the app I'm working on, that loads downloaded PDF's, state that a new highlight that over-laps with an existing highlight, is to merge with it, thus creating a new single hi-light that is the same size as the total space of the original two.
I figured there was no easy way to do it, so I'm using some of the same code from an answer to another post I put up here a week ago, that in essance detects if a new highlight's Rect overlaps and existing highlight. I'm then modifying it so that that both the existing Annot and the new Annot get passed to a MergeAnnots(Annot existing, Annot new) method, where the greater values (or lesser value depending on direction I guess) between the two for each of x1, y1, x2, y2 get used to create a new third Annot, and the properties of the existing annot are applied (color, notes etc.), and then the existing and new annots are deleted, leaving the "merged annot" as the one I want. It should work just fine, but I thought I'd see if there was a "canned" way to do it already.
Thanks,