PDF Spec vs Acrobat creation (QuadPoints)

百般思念 提交于 2019-11-26 17:06:35

问题


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?


回答1:


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!



来源:https://stackoverflow.com/questions/9855814/pdf-spec-vs-acrobat-creation-quadpoints

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!