Please, I try to replace a image and works, Spire replace the image in the index 1 with my image. But when I try to replace the image in the index 2, only replace the image in the first page.
Dim doc as PdfDocument = new PdfDocument();
doc.LoadFromFile("Test.pdf");
-- THIS WORKS OK
For i = 0 To doc.Pages.Count - 1 Step 1
Dim page as PdfPageBase = doc.Pages(i);
Dim image as PdfImage = PdfImage.FromFile("image.png");
page.ReplaceImage(0, image);
Next
-- THIS ONLY REPLACE THE IMAGE IN THE FIRST PAGE
For i = 0 To doc.Pages.Count - 1 Step 1
Dim page as PdfPageBase = doc.Pages(i);
Dim image as PdfImage = PdfImage.FromFile("image2.png");
page.ReplaceImage(1, image);
Next
doc.SaveToFile("result.pdf");
Please, help me