私は iText 2.1.7 でも同じ問題を抱えていました。jrubins が説明した順序はうまくいきませんでした。凹型の注釈が作成されました。最終的に、 lr > ll > ur > ul という正しい順序を見つけました。
/*
* PDF Specification Order - results in broken annotation
*
* 7,8 5, 6
* (x,y)___________(x,y)
* | |
* | |
* |___________|
* (x,y) (x,y)
* 1, 2 3, 4
*/
/*
* Concave order - results in working, but concave annotation; don't know why
*
* 5, 6 7, 8
* (x,y)___________(x,y)
* | |
* | |
* |___________|
* (x,y) (x,y)
* 1, 2 3, 4
*/
/*
* Convex order - this is the one working like expected:
*
* 7,8 5, 6
* (x,y)___________(x,y)
* | |
* | |
* |___________|
* (x,y) (x,y)
* 3, 4 1, 2
*/
float[] quad = { rect.getRight(), rect.getBottom(), rect.getLeft(),rect.getBottom(), rect.getRight(), rect.getTop(),
rect.getLeft(), rect.getTop() };