android - How to correctly add signature fields in a PDF/A document with iText -


i'm trying add n signature fields in pdf/a document itext api. these fields have been correctly added using addannotation of pdfstamper, document no longer pdf/a compliant. in pdf validation following error:

the xmp property 'xmp:modifydate' not synchronized document information entry 'moddate'

how can document conforms pdf/a standard?

update: i'm using pdfastamper (itext-pdfa-5.5.1) , itextg (itextg-5.5.1) android. same validation error-

some code here:

string pdffilename = pdffile.getabsolutepath(); pdfreader pdf = new pdfreader(pdffilename);  tempfile = new file(pdffilename.substring(0, pdffilename.lastindexof(file.separator)) + "/_pdfsignfieldtemp_" + pdffile.getname()); tempoutstream = new fileoutputstream(tempfile.getabsolutepath()); pdfstamper stp = new pdfstamper(pdf, tempoutstream);           pdfformfield sig = pdfformfield.createsignature(stp.getwriter());  (...cut...)  sig.setwidget(new rectangle(llx, lly, urx, ury), null);  sig.setappearance(pdfannotation.appearance_normal,pdftemplate.createtemplate(stp.getwriter(), 0, 0)); sig.setflags(pdfannotation.flags_print); sig.setfieldflags(pdfformfield.ff_required);  sig.put(pdfname.da, new pdfstring("/arial 0 tf 0 g"));  sig.setfieldname(signaturename);  stp.addannotation(sig, intpage); stp.close(); pdf.close();   tempoutstream.close();  pdffile.delete(); file pdfwithfield = new file(pdffilename.substring(0, pdffilename.lastindexof(file.separator)) + "/_pdfsignfieldtemp_" + pdffile.getname()); pdfwithfield.renameto(new file(pdffilename)); 


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -