You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PDF可见签名获Adobe认可但签名文本未显示问题排查

PDF重签场景下可见签名文本不显示问题排查

问题背景

在PDF重签流程中,已完成签名对象的关联,Adobe可识别签名并显示可点击的签名框,但签名文本(邮箱、姓名、日期)无法正常显示。当前PDF的核心结构如下:

8 0 obj
<<
  /F 132
  /Type/Annot
  /Subtype/Widget
  /Rect[2 198 100 190]
  /FT/Sig
  /DR<<>>
  /T(Signature1)
  /V 6 0 R
  /P 3 0 R
  /AP<<
    /N 7 0 R
  >>
>>
endobj
6 0 obj
<<
  /Contents <...>
  /Type/Sig
  /SubFilter/ETSI.CAdES.detached
  /M(D:20230128131946+00'00')
  /ByteRange [0 830 60832 1714]
  /Filter/Adobe.PPKLite
>>
endobj
9 0 obj
<<
  /BaseFont/Helvetica
  /Type/Font
  /Subtype/Type1
  /Encoding/WinAnsiEncoding
  /Name/Helv
>>
endobj
10 0 obj
<<
  /BaseFont/ZapfDingbats
  /Type/Font
  /Subtype/Type1
  /Name/ZaDb
>>
endobj
12 0 obj<<
  /Font 13 0 R
>>endobj
13 0 obj<<
  /FAdESFont1 14 0 R
>>endobj
14 0 obj<<
  /Type /Font
  /Subtype /Type1
  /BaseFont /Helvetica
>>endobj
15 0 obj
<<
  /Length 90
>>stream
BT
2 194 TD
/FAdESFont1 5 Tf
(m@turboirc.com MICHAIL CHOURDAKIS 1/28/2023 15:19:46) Tj
ET

endstream
endobj
7 0 obj
<<
  /Type/XObject
  /Resources<<
    /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
  >>
  /Subtype/Form
  /BBox[2 198 100 190]
  /Length 90
  /FormType 1
  /Filter/FlateDecode
>>stream
BT
2 194 TD
/FAdESFont1 5 Tf
(m@turboirc.com MICHAIL CHOURDAKIS 1/28/2023 15:19:46) Tj
ET

endstream
endobj
3 0 obj
<<
  /Type/Page
  /Parent 2 0 R
  /Resources<<
    /Font<<
      /F1 4 0 R
    >>
  >>
  /Contents 5 0 R
  /Annots[8 0 R]
>>endobj
2 0 obj
<<
  /Type/Pages
  /MediaBox[0 0 200 200]
  /Count 1
  /Kids[3 0 R]
>>endobj
1 0 obj
<<
  /AcroForm<<
    /Fields[8 0 R]
    /DR<<
      /Font<<
        /Helv 9 0 R
        /ZaDb 10 0 R
      >>
    >>
    /DA(/Helv 0 Tf 0 g )
    /SigFlags 3
  >>
  /Type/Catalog
  /Pages 2 0 R
>>endobj
11 0 obj
<<
  /Producer(AdES Tools https://www.turboirc.com)
  /ModDate(D:20230128131946+00'00')
>>endobj
xref
0 4
0000000000 65535 f 
0000061862 00000 n 
0000061787 00000 n 
0000061681 00000 n 
6 10
0000000810 00000 n 
0000061409 00000 n 
0000000679 00000 n 
0000060958 00000 n 
0000061056 00000 n 
0000062004 00000 n 
0000061133 00000 n 
0000061165 00000 n 
0000061203 00000 n 
0000061271 00000 n 
trailer
<<
  /Root 1 0 R
  /Prev 492
  /Info 11 0 R
  /Size 20
  /ID[<6BD3BF95416A5C19FFBC464EC610875C><54ACC00AA74869363131BCC04E65417F>]
>>
startxref
62104
%%EOF

实现思路

  • 创建注释对象(ID 8),关联签名对象(/V 6 0 R)和正常状态的外观流(/AP << /N 7 0 R >>)
  • 外观流(ID 7)中包含签名文本的绘制指令,核心代码如下:
7 0 obj
<<
  /Type/XObject
  /Resources<<
    /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
  >>
  /Subtype/Form
  /BBox[2 198 100 190]
  /Length 90
  /FormType 1
  /Filter/FlateDecode
>>stream
BT
2 194 TD
/FAdESFont1 5 Tf
(m@turboirc.com MICHAIL CHOURDAKIS 1/28/2023 15:19:46) Tj
ET
endstream
endobj

问题原因与修复方案

1. 外观流未正确关联字体资源

外观流(ID 7)的/Resources字典仅声明了/ProcSet,但未引用绘制文本所需的/FAdESFont1字体。虽然单独定义了ID12、13、14的字体链,但外观流无法直接找到该字体。

修复代码:

7 0 obj
<<
  /Type/XObject
  /Resources<<
    /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
    /Font << /FAdESFont1 14 0 R >>  % 直接关联字体对象
  >>
  /Subtype/Form
  /BBox[2 198 100 190]
  /Length 90
  /FormType 1
  /Filter/FlateDecode
>>stream
BT
2 194 TD
/FAdESFont1 5 Tf
(m@turboirc.com MICHAIL CHOURDAKIS 1/28/2023 15:19:46) Tj
ET
endstream
endobj

2. 缺失文本颜色配置

外观流中未设置文本颜色,默认颜色可能与背景色一致导致文本不可见。可在文本绘制指令前添加颜色设置。

修复代码:

BT
0 g  % 设置文本为黑色
2 194 TD
/FAdESFont1 5 Tf
(m@turboirc.com MICHAIL CHOURDAKIS 1/28/2023 15:19:46) Tj
ET

3. 外观流BBox区域过小

当前外观流的/BBox[2 198 100 190]高度仅为8(198-190),虽然字体大小为5理论上可容纳,但可适当扩大区域避免文本被裁切,例如调整为:

/BBox[2 188 100 198]

内容的提问来源于stack exchange,提问作者Michael Chourdakis

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.02 19:10:20