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.

Fri Feb 16, 2018 5:56 pm

Hi,

I am using the free version of Spire.PDF (Spire.Pdf.dll 3.2.52.56040) and I trying to replace an image in PDF document but ReplaceImage function is not working.


Code: Select all
        Dim doc As PdfDocument = New PdfDocument
        doc.LoadFromFile("C:\_ftp\B\pdf.pdf")
        'Dim inf = doc.Pages(0).ImagesInfo
        'Dim image = inf(0).Image
        'replace image
        doc.Pages(0).ReplaceImage(0, PdfImage.FromFile("C:\_ftp\B\tmp.jpg"))
        doc.SaveToFile("C:\_ftp\B\pdf_new.pdf", FileFormat.PDF)


pdf_new.pdf file has the old image and the same size as original

Any help would be greatly appreciated.

usered
 
Posts: 1
Joined: Fri Feb 16, 2018 5:16 pm

Mon Feb 19, 2018 4:34 am

Hello,

Thanks for your inquiry.
Sorry for the inconvenience caused by the issue existed in Free version. I have confirmed ReplaceImage function worked well with your pdf file using Spire.PDF Pack(Hot Fix) Version:4.2.4. Please use it and try again.
We can offer 1-month free license of Spire.Pdf to help remove the warning message. Please contact sales@e-iceblue.com if you need it.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Thu Feb 22, 2018 10:10 am

Hi,

Has your issue been resolved by Spire.PDF Pack(Hot Fix) Version:4.2.4?
Looking forward to your feedback.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF