Reader extensions not needed anymore for digital signature in Acrobat Reader DC?

走远了吗. 提交于 2019-12-06 13:47:53

问题


In a business environment we have Adobe LiveCycle ES for several years. A key feature is to enable "Reader extensions" in PDFs, which unlocks some features in Adobe Reader for reader extended PDFs. One of them was allowing user to digitally sign empty signature fields in Adobe Reader.

I remember nothing happened when clicking on the signature field in Adobe Reader if the PDF was not "reader extended". This is the case e.g. if the PDF was generated using iText. This limitation is still confirmed in iText FAQ which is supposed to be up-to-date as the project is active.

I recently reexecuted some old code and surprisingly the empty signature field could be signed in Acrobat Reader DC.

The code generating the PDF is the following :

Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream(filename));
document.open();
document.add(new Paragraph("Hello World!"));
document.close();

The code for adding the signature field :

PdfReader pdf = new PdfReader(inputstream);
PdfStamper stp = new PdfStamper(pdf, new FileOutputStream(filename));
PdfFormField sig = PdfFormField.createSignature(stp.getWriter());
sig.setWidget(new Rectangle(100, 100, 200, 200), null);
sig.setFlags(PdfAnnotation.FLAGS_PRINT);
sig.put(PdfName.DA, new PdfString("/Helv 0 Tf 0 g"));
sig.setFieldName("Signature1");
sig.setPage(1);
stp.addAnnotation(sig, 1);
stp.close();

What changed ? I guess Adobe Acrobat DC has removed some reader extensions requirements, but I could not find any release note explaining this.

来源:https://stackoverflow.com/questions/40634083/reader-extensions-not-needed-anymore-for-digital-signature-in-acrobat-reader-dc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!