Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
465 views
in Technique[技术] by (71.8m points)

annotations - PDF Spec vs Acrobat creation (QuadPoints)

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...