I have attached an image into a signed pdf document using itext7, but the signature became invalid. Is there any solution for this
string source = @"D:\SampleProjects\itext\file\test.pdf";
string target = @"D:\SampleProjects\itext\file\tests.pdf";
string img = @"D:\SampleProjects\itext\file\sign_valid.png";
PdfDocument pdfDocument = new PdfDocument(new PdfReader(source), new PdfWriter(target));
// Document to add layout elements: paragraphs, images etc
Document document = new Document(pdfDocument);
var noofpages = pdfDocument.GetNumberOfPages();
// Load image from disk
ImageData imageData = ImageDataFactory.Create(img);
// Create layout image object and provide parameters. Page number = 1
Image image = new Image(imageData).ScaleAbsolute(100, 100).SetFixedPosition(1, 25, 25);
document.Add(image);
document.Close();