pdf generation - PDF Line Annotation confusion - Stack Overflow

admin2025-04-17  2

I'm looking at a PDF Annotation whose type is line (clarify: it's the big red line in the middle between the circle and the text). It looks like below:

(Please look at the line in the middle)

Now when I use PDFBox to print out their COS values. Here's how they look like:

COSName{Border}: COSArray{[COSInt{0}, COSInt{0}, COSFloat{2.821204}]}
  COSName{C}: COSArray{[COSInt{1}, COSFloat{0.1491314}, COSInt{0}]}
  COSName{L}: COSArray{[COSFloat{516.9559}, COSFloat{438.1117}, COSFloat{585.4388}, COSFloat{437.9156}]}
  COSName{LE}: COSArray{[COSName{None}, COSName{None}]}
  COSName{Rect}: COSArray{[COSFloat{467.3483}, COSFloat{432.3077}, COSFloat{522.7586}, COSFloat{478.6829}]}

Rect makes sense. However, L doesn't make sense at all. y1 and y2 differs by only 1-2 pixel. Also, x1 and x2 are outside Rect.

I have other line annotations on the same page, and others' coordinates make sense.

I wonder if anyone can shed the light what is going on. Did I miss some transformation?

转载请注明原文地址:http://anycun.com/QandA/1744886540a89021.html