itext7:定位签名的矩形

itext7: positioning the signature's rectangle

关于传递给 PdfSignatureAppearance 的矩形,有人能告诉我为什么 y 似乎从页面底部向顶部增长吗?例如,用 (10, 10, 200, 50) 创建的矩形位于页面底部附近,用 (10, 750, 200, 50) 创建的矩形位于页面顶部附近。

还有一个问题:在使用GRAPHIC_AND_DESCRIPTION模式时,有没有办法将图像放在矩形的左侧附近,而不是放在矩形的右半边附近?

谢谢。

why the y seems to be growing from the bottom to the top of the page?

因为这就是 pdf 中坐标系的指定方式。与许多相反的位图图像 API 相比,pdf 使用数学中众所周知的坐标系。

when using the GRAPHIC_AND_DESCRIPTION mode, is there a way to place the image near the left side of the rectangle instead of placing it near the its right half?

itext 提供的模式使用严格的布局。但另一种选择是自己设计整个外观!在这里查看许多其他问题,例如 , this question, or .