Free Support Forum - aspose.com

"Parameter is not valid" error message

Hi.

I am getting an exception when I go to create the Powerpoint file and download it. It is at Line 236

Line 234: If dsVisualAsset.Tables(0).Rows.Count > 0 Then
Line 235: If File.Exists(MapPath("…\SlideVisualAssets" + dsVisualAsset.Tables(0).Rows(0)(“vcVisualAssetFileName”))) Then
Line 236: pic = New Picture(pres, MapPath("…\SlideVisualAssets" + dsVisualAsset.Tables(0).Rows(0)(“vcVisualAssetFileName”)))
Line 237: Dim picid As Integer = pres.Pictures.Add(pic)
Line 238: objAsposeSlide.Shapes.AddPictureFrame(picid, CInt(dr(“nSlideItemX”).ToString()), CInt(dr(“nSlideItemY”).ToString()), CInt(dr(“nSlideItemWidth”).ToString()), CInt(dr(“nSlideItemHeight”).ToString()))

The error message is:

"Parameter is not valid"

At first I thought that maybe someone had removed or renamed the physical file, but we are checking first if the physical file exists.

Do you know what would cause this?



Aspose.Slides shouldn’t throw exception with such text from Picture constructor.
Is it Ppt*Exception or standard .Net exception? Does it have any nested exceptions?