如何理解pdf表单标志?
我使用pdfbox
读取了pdf结构,但无法从流中找到一些数据:
I read pdf structure using pdfbox
and I can't find out some data from stream:
1 g
0 0 18 18 re
f
0.5 0.5 17 17 re
s
q
1 1 16 16 re
W
n
0 g
BT
/ZaDb 14.532 Tf
2.853 4.081 Td
13.9943 TL
(4) Tj
ET
Q
这是有关复选框的流信息,但是字母是什么意思? 任何人都可以向我解释,或者如果您可以与我分享我可以阅读的内容会更好吗?
It is stream information about checkbox but what does it mean that letters? Can anyone explain to me or it would be better if you can share with me where I can read about it?
1 g --- select DeviceGray WHITE as non-stroking color
0 0 18 18 re --- define a 18×18 rectangular path, lower left at 0,0
f --- fill the path with the non-stroking color
0.5 0.5 17 17 re --- define a 17×17 rectangular path, lower left at 0.5,0.5
s --- stroke the path with the stroking color
q --- save graphics state
1 1 16 16 re --- define a 16×16 rectangular path, lower left at 1,1
W --- intersect the current clip path with the just defined path
n --- don't draw the path
0 g --- select DeviceGray BLACK as non-stroking color
BT --- begin text object
/ZaDb 14.532 Tf --- select font with name ZaDb at size 14.532
2.853 4.081 Td --- move text insertion point by 2.853,4.081
13.9943 TL --- set leading to 13.9943
(4) Tj --- draw the string with one character with character code 0x34 (what you display as "4" is the byte 0x34)
ET --- end text object
Q --- restore graphics state
哪个字符的字符代码为0x34,取决于 ZaDb 的定义方式.您应该可以在您关注的XObject形式的字体资源中找到其定义.
Which character has the character code 0x34, depends on how ZaDb is defined. You should be able to find its definition in the font resources of the form XObject you focus on.
很有可能 ZaDb 是ZapfDingbats字体,并带有ZapfDingbats编码,请参见ISO 32000-2附件D.6.在这种情况下,字符代码0x34对应于✔.
Quite likely, though, ZaDb is a ZapfDingbats font with ZapfDingbats encoding, see ISO 32000-2 annex D.6. In that case the character code 0x34 corresponds to ✔.
换句话说,您的表单XObject会绘制一个带有黑色边缘和白色内部的正方形,然后在该正方形内部绘制一个黑色的勾号.
In other words, your form XObject draws a square with black edges and white insides, and then draws a black tick inside that square.