(2025/07/18 追記)
PDF32000_2008.pdf の 12.5.5 Appearance Streams を確認したところ、つぎのような方法論になっているようです。
- /BBox の四隅の点をそれぞれ /Matrix で変換します。
- 変換した 4 つの点を囲む最小の矩形 (The transformed appearance box) を計算します。以下 Outer と称します。
- /Rect を埋めるように Outer を展開します。縦横比率は維持しません。具体的には:
- Outer の (Left, Bottom) を減算し、原点 (0, 0) に合うように Translation します。
- /Rect の幅・高さと一致するように、Outer の幅・高さを各々 Scaling で拡大あるいは縮小します。
- /Rect の (Left, Bottom) を加算します。
ーーー
注釈 1
/Subtype /FreeText
0 Rect(451, 724, 529, 736) BBox(451, 724, 529, 736) Matrix
Rect = BBox
Matrix なし
AP/N は、BBox に収まるような描画内容
ーーー
注釈 2
/Subtype /FreeText
65 /FreeTextCallout Rect(711, 445, 1127, 542) BBox(711, 445, 1127, 542) Matrix|1.0 0.0 0.0 1.0 -711.186 -444.702|
Rect = BBox
Matrix あり。
AP/N は、BBox に収まるような描画内容
ーーー
注釈 3
/Subtype /FreeText
67 Rect(843, 413, 1145, 427) BBox(848, 375, 1151, 389) Matrix
Rect != BBox
Matrix なし。
AP/N は、BBox に収まるような描画内容
ーーー
注釈 4
/Subtype /Stamp
49 Rect(88, 484, 243, 630) BBox(0, 0, 645, 606) Matrix|1 0 0 1 0 0|
Rect != BBox
Matrix は Identity
AP/N は、BBox に収まるような描画内容
ーーー
注釈 5
/Subtype /FreeText
76 /FreeTextTypewriter Rect(842, 391, 1022, 409) BBox(860, 374, 1040, 392) Matrix|1.0 0.0 0.0 1.0 -860.438 -374.371|
Rect != BBox
Matrix あり。
AP/N は、BBox に収まるような描画内容