12

I've created some annotations (Underline, Highlight, Strikeout, Squiggly) in Acrobat and am digging out the QuadPoints array to render with. The pdf spec PDF 32000-1:2008 says they are in counter clockwise order, and x1,y1 -> x2,y2 specifies the base of the quadrilateral.

This should look like: BottomLeft, BottomRight, TopRight, TopLeft

Unfortunately, Acrobat seems to create them in a different (and non compliant manner).

It appears as if the order is: TopLeft, TopRight, BottomLeft, BottomRight.

Anyone have insight into this phenomenon? Is it consistent? Am I missing something?

tillerstarr
  • 2,616
  • 1
  • 21
  • 35
  • 3
    I found the exact same thing about 6 months ago. The order that is documented is no correct. I double check with various browsers by creating annotations and they all create the annotations with the order of TopLeft, TopRight, BottomLeft, BottomRight. – Andrew Cash Mar 25 '12 at 02:07

1 Answers1

13

I've written a PDF annotation lib for iOS and found the same against-the-spec Acrobat behavior.

As a bit of further info, the Text Markup annotation also contains an Rect entry as well as the QuadPoints entry. The Rect entry is per the spec, [llx, lly, urx, ury]. So in Acrobat generated Text Markup annotations, the Rect point (llx,lly) is approx the same as the QuadPoints point (x3, y3) when rotation=0. Go figure.

Interesting the amount of time that can be wasted when the primary company behind a spec writes software that doesn't follow that spec!

dingo sky
  • 1,445
  • 17
  • 15
  • This was meant to be a comment, not an answer. Oh, well. – dingo sky May 24 '12 at 01:04
  • 1
    Seems like a fine answer, he asked for insight into the phenomenon. – Jim Counts May 24 '12 at 05:38
  • Any change in this issue? – seebiscuit Sep 09 '16 at 14:07
  • 1
    The PDF spec referenced by the OP hasn't been updated. As to whether Adobe has changed their Acrobat implementation, there would be compatibility issues were they to do so. Note that's the only issue here, compatibility. If they updated Acrobat to actually follow the spec (ref Table 173), a previously saved underline annotation (per the comments of this post) would be rendered above the text! – dingo sky Sep 10 '16 at 16:54
  • I wonder if it has been fixed in the final 2.0 specification. The text in mine has "voting begins on 2016-02-12". – Tilman Hausherr Jan 13 '18 at 13:15