I have a PDF document which had an Acroform inside it. This document has the flag NeedAppearances
set to true. When I convert this document to PDFA-1b format, then the document is invalid.
I use PDF Tools Online - Validate PDF as tool to validate the PDF document. The error message is:
Validating file “converted_file.pdf” for conformance level pdfa-1b
The value of the key NeedAppearances is True but must be False.
The document does not conform to the requested standard.
The document contains annotations or form fields with ambigous or without appropriate appearances.
Is there a way to set the flag
NeedAppearances
to false
?My test code:
PdfFormatConversionOptions options = new PdfFormatConversionOptions(“conversion-log.xml”, PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
Document pdf = new Document(“source_document.pdf”);
pdf.flatten();
pdf.convert(options);
pdf.save(“converted_document.pdf”);