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 Jan 26, 2018 2:27 pm

Hy,

invoking the "page.ImagesInfo", the "Image Boundary location" returns alway zero's.

We need to process images with custom function, and replace in the PDF:

To do this, de Imagesinfo must return the original image (or stream) from the pdf (like ExtractImages (false)) and the Bounds information.

Is that possible or is and another way to do this?

Spire.PDF version 3.10
thanks,
JD

aibizcore
 
Posts: 12
Joined: Fri Dec 29, 2017 12:12 pm

Mon Jan 29, 2018 3:03 am

Hello,

Thanks for your feedback. I have noticed location issue and logged it into our bug tracking system. If there is any update, we will let you know. We apologize for the inconvenience.
On the other hand, Imagesinfo could return the original image and you could use page.ReplaceImage(index,PdfImage) to replace the image. Please see below.
Code: Select all
            PdfDocument doc = new PdfDocument();
            doc.LoadFromFile("test.pdf"); ;
            var inf=doc.Pages[0].ImagesInfo;
            var image = inf[0].Image;
            //replace image
            doc.Pages[0].ReplaceImage(1, PdfImage.FromImage(image));
            doc.SaveToFile("replace.pdf",FileFormat.PDF);


Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Fri Feb 09, 2018 7:53 am

Hello JD,

Glad to inform you that the bound issue has been fixed. Welcome to download Spire.PDF Pack(Hot Fix) Version:4.2.4.

Best regards,
Simon
E-icelbue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Sun Feb 11, 2018 8:05 am

Hello,

Greeting from E-iceblue.
Has the hotfix resolved your issue?
We will appreciate it if you could give us some feedback.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Wed Mar 07, 2018 2:25 pm

Yes, but if is a scanned PDF the bound width and height of the image is always 1.

Version : 4.3.0
thanks,
JD

aibizcore
 
Posts: 12
Joined: Fri Dec 29, 2017 12:12 pm

Thu Mar 08, 2018 3:00 am

Hello JD,

Thanks for your feedback. I checked a scanned PDF file on my side and I could get the right bound. Would you please share us with your scanned PDF that has the issue?

Best regards,
Simon
E-icelbue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Tue Mar 13, 2018 3:23 am

Hello JD,

How is the issue going?
Please give us some feedback at your convenience.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.PDF