We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to set Section Background Image

Hi there,

I'm using Aspose.PDF for .net (v4.5) and I'm having trouble setting a background image on a section.

I've used the example code provided in the manual and verified that the file exists, image type is set correct, etc but when I call the Save method I'm getting an ArgumentException thrown with a message of "Invalid image info array in PlaceImage method.".

Example code:

Pdf pdf = new Pdf();
Section sec1 = new Section(pdf);
sec1.BackgroundImageFile = @"C:\Temp\testbackground.jpg";
sec1.BackgroundImageType = ImageFileType.Jpeg;

sec1.Paragraphs.Add(new Text("Hello World"));


Any suggestions?



Hello Ben,

Thanks for using our products.

I have tested the scenario and I am unable to notice the problem. Can you please share the source image file that you are using so that we can test the scenario at our end.

We apologize for your inconvenience.

Hello Ben,

Please ignore my previous post. After further investigation, I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNET-18726. We will investigate this issue in details and will keep you updated on the status of a correction. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We apologize for your inconvenience.

Thanks for the update Nayyer Shahbaz.


Ben Lewis

I am having the same problem also with the latest version (v4.6) of aspose pdf for .net. I am unable to set section backgroud image.

Hello Johnny,

Thanks for using our products.

I am afraid you might not be able to set section background when using Aspose.Pdf for .NET 4.6.0. However, this issue is resolved and its correction will be included in the next release version of Aspose.Pdf for .NET which will be published by the end of this month or early next month. Please be patient and spare us little time. Once the new version becomes available, we would be pleased to update you with the status of correction.

Your cooperation and comprehension is greatly appreciated in this regard. We apologize for your inconvenience.

The issues you have found earlier (filed as 18726) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.