digital signature - How to digitally sign PDF files with XFA forms using iText -
itext release notes mention signing of pdfs xfa forms supported itext versions 5.4.2 , 5.4.3:
http://itextpdf.com/history/?branch=54&node=542
http://itextpdf.com/history/?branch=54&node=543
is there documentation somewhere how signing in java?
i interested in signing pdfs xfa there prepared field signature.
this small example showing how sign using xmldsig:
pdfreader reader =new pdfreader(src); fileoutputstream os =new fileoutputstream(dest); pdfstamper stamper = pdfstamper.createxmlsignature(reader, os); xmlsignatureappearance appearance = stamper.getxmlsignatureappearance(); appearance.setxmllocator(new xfaxmllocator(stamper)); appearance.setxpathconstructor(new xfaxpathconstructor(xfaxpathconstructor.xdppackage.datasets)); externalsignature signature =new privatekeysignature(pk, digestalgorithm,"bc"); //use signxmldsig or signxades makexmlsignature.signxmldsig(appearance, signature, chain); you can sign using xades, won't able validate signature in adobe software because don't think adobe supports xades (please correct me if i'm wrong).
such a imprassive blog thanks for sharing this blog
ReplyDeleteDigital Signature Software