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?
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With