Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Mar 07, 2017 2:44 pm

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

ijavier.fs@gmail.com
 
Posts: 3
Joined: Fri Nov 13, 2015 8:24 am

Wed Mar 08, 2017 2:28 am

Hi,

Thanks for your inquiry.
I have tested the scenario you mentioned with Spire.PDF Pack(Hot Fix) Version:3.8.193, but didn't find any issue on my side. Please try to use this version, if the issue still happens with the version, please provide us input files for testing.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Mar 30, 2017 3:43 pm

Hi,

This is the sample files.

Here is the Original File.
ORIGINAL.zip


When I replace the first image, all it's ok. But when I replace the secong image, only replace the image in the first page.

I try with my full version v3.6.167.5041 and nothing
ORIGINAL_005_v3.6.167.5041.zip


I try again with demo version v3.9.0.2041 and it fails again.
ORIGINAL_004_v3.9.0.2041.zip


Please, can you help me?

ijavier.fs@gmail.com
 
Posts: 3
Joined: Fri Nov 13, 2015 8:24 am

Fri Mar 31, 2017 2:12 am

Hi,

Many thanks for the detailed information.
I have reproduced the issue and transfered it to our Dev team. We will inform you when it is fixed.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Apr 10, 2017 7:23 am

Hi,

Have you found a solution?.
We need to know if we should wait and renew the license or if we have to find other software to perform that functionality.

Thank you.

ijavier.fs@gmail.com
 
Posts: 3
Joined: Fri Nov 13, 2015 8:24 am

Mon Apr 10, 2017 7:56 am

Hi,

Thanks for your informtion.
The issue was fixed. We will provide you a hotfix ASAP.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Apr 11, 2017 8:10 am

Hi,

Thanks for waiting.
Now the hotfix is available, welcome to test Spire.PDF Pack(Hot Fix) Version:3.9.27.
If you have any question, please let me know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF