Preserving PDF/A compliance after PDF editing


I'm trying to add an e_signature field to a valid PDF/A document.

Using the following code:

Field sigField = pdfDocument.FieldCreate("Signature1", Field.Type.e_signature);
Widget widgetAnnot = Widget.Create(pdfDocument.GetSDFDoc(), new Rect(85, 458, 503, 502), sigField);

checking resulting PDF with a customer's pdf/a validation tool I get:

The appearance dictionary doesn't contain an entry.
The document does not conform to the requested standard.
The document contains annotations or form fields with ambiguous or without appropriate appearances.

I tried to use annotation.SetAppereance() but I got a lot of different validation error.

My goal is to add an e_signature field to PDF/A document preserving PDF/A compliance: is there a sample code to do this? 
I check SDK samples but I can't find this case..

Another question: shall I convert modified pdf in pdf/a each time that I add a widget or if initial pdf is PDF/a could I avoid re-conversion?


If you look at the InteractiveFormsTest sample there is a call to doc.RefreshFieldAppearances(), 
I think this will correct the issue. If not, please read the note just before the call to 
doc.RefreshFieldAppearances(), as it explains some of the options regarding appearances.

Alternatively you can use ‘pdftron.PDF.PDFA.PDFACompliance’ on the generated document. This will 
convert a generic PDF to PDF/A (or will resolve the remaining PDF/A compatibility issues). 
Please keep in mind that PDF/A files are intended for editing so you should minimize (or 
eliminate) further editing once the file is normalized to PDF/A.