I digitally sign a PDF-A1a document using IText 7.15.0.
In addition to the digital signature, I also add a visual representation (image) to the document.
PdfSignatureAppearance appearance = signer.GetSignatureAppearance();
appearance.SetPageNumber(1);
Rectangle pr = new Rectangle(10 + ImageOffset, 10 + ImageOffset, 100, 100 );
appearance.SetPageRect(pr);
byte[] image = System.IO.File.ReadAllBytes(VisualAppearance);
appearance.SetRenderingMode(PdfSignatureAppearance.RenderingMode.GRAPHIC);
ImageData imageData = ImageDataFactory.Create(image);
appearance.SetSignatureGraphic(imageData);
This code works and the signature is valid. But if the document was a PDF-A1a, it is no longer a valid PDF-A1a. It only becomes invalid when I add the visual representation. If I just apply the signature without the visual representation, it remains a valid PDF-A1a.
Other PDF-A standards like A2a do remain valid when adding the visual representation.
When using foxit phantom to validate the PDF-A1a, it shows the following message:
A transparent soft mask is present. Beginning with PDF 1.4 transparency is supported. Some PDF-based ISO standards prohibit the use of transparency.
What do i need to do in order to keep a PDF-A1a valid while adding the visual representation?