te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>javascript - Unable to make widgetfield appearance showing in Acrobat(works with pdf-x change, foxit) - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Unable to make widgetfield appearance showing in Acrobat(works with pdf-x change, foxit) - Stack Overflow

programmeradmin3浏览0评论

Appearances for signature are not showing properly in Adobe Acrobat. The 'thumbnail' shows up on the thumbnail panel but its not showing on the actually PDF.

This pdf has a certification digital signature and revision one. The signature field appearance is set between the two digital signatures. If I click the 'view signed version', there is a report with an error 4000 about invalid appearance.

15 0 obj
<<
/Type /XObject
/Subtype /Image
/BitsPerComponent 8
/Width 125
/Height 132
/ColorSpace /DeviceRGB
/SMask 21 0 R
/Filter /FlateDecode
/Length 70
>>
stream
...
endobj
16 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont /Courier
/Encoding /WinAnsiEncoding
>>
endobj
17 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 17
>>
stream
...
endstream
endobj
18 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/Im1 15 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 34
>>
stream
...
endstream
endobj
19 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/n0 17 0 R
/n2 18 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 42
>>
stream
...
endstream
endobj
20 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/FRM 19 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 22
>>
stream
...
endstream
endobj
21 0 obj
<<
/Type /XObject
/Subtype /Image
/Height 132
/Width 125
/BitsPerComponent 8
/ColorSpace /DeviceGray
/Decode [ 0 1 ]
/Filter /FlateDecode
/Length 1824
>>
stream
...
endstream
endobj

I'm using pdf-lib to manage every step of the workflow. Right now, I'm just trying to check other/similar post and test other ways to structure the pdf objects.

pdf and its signatures should be valid in any pdf reader.

result after certification, signature field filled, 2nd digital signature

signed version, click view report shows this

Appearances for signature are not showing properly in Adobe Acrobat. The 'thumbnail' shows up on the thumbnail panel but its not showing on the actually PDF.

This pdf has a certification digital signature and revision one. The signature field appearance is set between the two digital signatures. If I click the 'view signed version', there is a report with an error 4000 about invalid appearance.

15 0 obj
<<
/Type /XObject
/Subtype /Image
/BitsPerComponent 8
/Width 125
/Height 132
/ColorSpace /DeviceRGB
/SMask 21 0 R
/Filter /FlateDecode
/Length 70
>>
stream
...
endobj
16 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont /Courier
/Encoding /WinAnsiEncoding
>>
endobj
17 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 17
>>
stream
...
endstream
endobj
18 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/Im1 15 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 34
>>
stream
...
endstream
endobj
19 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/n0 17 0 R
/n2 18 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 42
>>
stream
...
endstream
endobj
20 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/FRM 19 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 22
>>
stream
...
endstream
endobj
21 0 obj
<<
/Type /XObject
/Subtype /Image
/Height 132
/Width 125
/BitsPerComponent 8
/ColorSpace /DeviceGray
/Decode [ 0 1 ]
/Filter /FlateDecode
/Length 1824
>>
stream
...
endstream
endobj

I'm using pdf-lib to manage every step of the workflow. Right now, I'm just trying to check other/similar post and test other ways to structure the pdf objects.

pdf and its signatures should be valid in any pdf reader.

result after certification, signature field filled, 2nd digital signature

signed version, click view report shows this

Share Improve this question edited 2 days ago stm 6881 gold badge6 silver badges24 bronze badges asked Feb 17 at 14:10 Bobby-1995Bobby-1995 134 bronze badges New contributor Bobby-1995 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 9
  • Just like @KJ says, to analyze that we'd need the full PDF. Also I see that you try to copy Adobe's "layers" XObjects hierarchy. Please be aware that doing so makes Acrobat expect you to fully implement all aspects of it, even potentially unpublished ones. – mkl Commented Feb 17 at 14:38
  • @KJ Here are the files : easyupload.io/m/7iofak empty.pdf : input pdf output0.pdf : previous + signature field output1.pdf : previous + certification outpuf2.pdf : signed field + 2nd digital signature – Bobby-1995 Commented Feb 17 at 14:55
  • I don't know if this changes anything but I'm adding signature1 field right before 1st digital signature (certification) to 'link' it to the certification. aftetward im adding the appearance to UserSignature750 then 2nd digital signature – Bobby-1995 Commented Feb 17 at 15:40
  • I'll try and take a look tomorrow. – mkl Commented Feb 17 at 17:09
  • 1 I just did. My tab wasn't refresh and didnt see your post/solution. Your proposition fixed the issue instantly. – Bobby-1995 Commented 2 days ago
 |  Show 4 more comments

1 Answer 1

Reset to default 0

Your approval signature dictionaries have Reference entries whose values are empty dictionaries:

14 0 obj
<<
/ByteRange [0 6449 9903 4059]                                       
/Contents ...
/Filter /Adobe.PPKLite
/Prop_Build <<
/App <<
/Name /SPDF.js
>>
>>
/Reference <<
>>
/SubFilter /adbe.pkcs7.detached
/Type /Sig
/Location (Test, Local)
/Reason (signing documents)
/ContactInfo ([email protected])
/Date ()
>>
...
23 0 obj
<<
/ByteRange [0 14176 17636 645]                                
/Contents ...
/Filter /Adobe.PPKLite
/Prop_Build <<
/App <<
/Name /SPDF.js
>>
>>
/Reference <<
>>
/SubFilter /adbe.pkcs7.detached
/Type /Sig
/Location (Test, Local)
/Reason (signing documents)
/ContactInfo ([email protected])
/Date ()
>>

But Reference is documented to have an array value:

Key Type Value
Reference array (Optional; PDF 1.5) An array of signature reference dictionaries (see "Table 256 — Entries in a signature reference dictionary"). If SubFilter is ETSI.RFC3161, this entry shall not be used.

(ISO 32000-2, Table 255 — Entries in a signature dictionary)

Usually approval signatures don't have a Reference entry at all, but if you need one, make it an empty array.

(There are some other issues in the PDFs, too, but this appears to be the one that causes Acrobat to ignore those signatures and their appearance.)

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论