如何在Android中签名PDF [英] How to sign a PDF in Android
问题描述
我必须在Android应用程序中实现允许我签署PDF的功能,当我说签署"时,我的意思是用户附加在文档末尾的数字签名(名字和名字). /p>
我可以访问Samsung Note 4(带有手写笔),那么在显示屏上写"就不会有问题.
问题是:是否可以使用诸如itext之类的库对文档进行签名,否则我必须编写自定义函数?
我想您想使用用户用笔的笔迹在文档上应用电子签名.正如@mkl所说,数字签名"概念通常在使用数字证书和密码学时应用.
手写电子签名要求
人们倾向于认为手写签名是由嵌入图像组成的,但是这样,在发生诉讼时,您的系统需要具有最低的法律价值:
-
R1-确保签名者的身份
-
R2-唯一附加签名和文档
-
R3-保护文档和签名的完整性
这些都是数字签名的特征.
Android上的手写签名
Android上的过程应如下所示:
-
R2)使用Canvas捕获包括生物特征(x,y,时间,压力)在内的用户图.使用PDFBox或itext(客户端或服务器端)将图像和生物识别数据嵌入文档中
-
R1)上一步中包含的生物特征数据可让专家进行潜在的签名分析
-
R3)我建议在文档和签名证据上加上时间戳,以保护完整性并确保签名时间. itext和PDFBox都支持它
如果不需要法律价值,则仅应用绘图部分.签名的质量将取决于设备的特性.例如,特定的签名板还可以提供笔的方向
Android链接
-
在画布上绘画并保存图像(请参见示例,您可以从事件中获得压力和时间)
> -
I have access to a Samsung Note 4 (with stylus) then it would not be a problem, "write" on the display.
The question is: there is the possibility to sign a document using some library like itext or I must write a custom function ?
解决方案I guess you want to apply an electronic signature on a document using a user's handwriting with a pen. As has said @mkl, 'digital signature' concept is usually applied when using digital certificates and cryptography.
Handwritten electronic signature requirements
People tend to think that the handwritten signature consists of embedding an image, but so that your system has a minimum legal value in case of litigation you will need:
R1 - ensure the identity of the signer
R2 - Uniquely attach signature and document
R3 - protect integrity of document and signature
More or less these are the characteristics of digital signatures.
Handwritten signature on Android
The process on android should be like this:
R2) capture the user graph including biometrics(x,y,time,pressure) using a Canvas. Embed image and biometrics data into document using PDFBox or itext (client or server side)
R1) included biometric data in previous step allows a potential analysis of signature by an expert
R3) I suggest to apply a timestamp over document and signature evidences to protect the integrity and ensure the time of signature. Both itext and PDFBox support it
If you do not need legal value, then apply only the drawing part. The quality of your signature will be determined by the devices characteristics. For example a specific signature tablet can provide also the orientation of the pen
Android links
Drawing on Canvas and save image (see example, you can get pressure and time from event)
You will find similar links for itext. Select the most suitable for your use case and whether you want to execute on Android or in the server side
这篇关于如何在Android中签名PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!