Free Support Forum - aspose.com

Aspose.slides migration issues


#1

Before i am using aspose.slides 4.3.0.0 ,now i’m migrated to aspose.slides 17.12.1 version, here problem is i am unable to find out a solution for following errors,would you please suggest me solution

->‘Presentation’ does not contain a definition for ‘GetSlideByPosition’ and no extension method ‘GetSlideByPosition’ accepting a first argument of type ‘Presentation’ could be found (are you missing a using directive or an assembly reference?)
->‘Slide’ does not contain a definition for ‘FindShape’ and no extension method ‘FindShape’ accepting a first argument of type ‘Slide’ could be found (are you missing a using directive or an assembly reference?)
->‘Picture’ does not contain a constructor that takes 2 arguments
->‘Presentation’ does not contain a definition for ‘Pictures’ and no extension method ‘Pictures’ accepting a first argument of type ‘Presentation’ could be found (are you missing a using
->Cannot implicitly convert type ‘Aspose.Slides.IOleObjectFrame’ to ‘Aspose.Slides.OleObjectFrame’. An explicit conversion exists (are you missing a cast?)
->‘OleObjectFrame’ does not contain a definition for ‘PictureId’ and no extension method ‘PictureId’ accepting a first argument of type ‘OleObjectFrame’ could be found (are you missing a using directive or an assembly reference?)
->The type or namespace name ‘Rectangle’ does not exist in the namespace ‘Aspose.Slides’ (are you missing an assembly reference?)
->‘Shape’ does not contain a definition for ‘TextFrame’ and no extension method ‘TextFrame’ accepting a first argument of type ‘Shape’ could be found (are you missing a using directive or an assembly reference?)
->Cannot implicitly convert type ‘Aspose.Slides.IShape’ to ‘Aspose.Slides.Shape’. An explicit conversion exists (are you missing a cast?)


#2

@asgd,

I have observed your inquiries and will respond to them individually.

In new API, the slides are always in order in SlideCollection. So whatever the index of slide is in SlideCollection, it represent the position. Please visit this documentation article for your reference.

Please visit this documentation article for finding shapes inside slide.

Please visit this documentation article for adding picture inside slide.

Please visit this documentation link for more about OleObjectFrames in slides.

Please use following sample code for setting OleObjectFrame image, where oof is OleObjectFrame object.

oof.SubstitutePictureFormat.Picture.Image = pres.Images.AddImage((System.Drawing.Image)imgChart);

There are autoshapes in new API and rectangle is one type. Please visit this documentation link for your kind reference.

Please visit this documentation link for adding and accessing TextFrame inside slide.

In new API, we have IShape interface for Shape class. So, every Slide.Shapes[index] return IShape object and you can typecast that to Shape. Please visit this documentation link for your kind reference.

I hope the shared information will be helpful. Please share, if I may help you further in this regard.


#3

Hi Team

I’m attaching my sample console application.
Before i am using aspose.slides 4.3.0.0 ,now i’m migrated to aspose.slides 17.12.1 version,
I have changes code as per your suggestions,following not getting

ReportName and ReportTitle not displaying in slides
Chart not displaying in second slide ,shows empty

my changes in ExcelToPpt method,old code is commented and new code is replaced but it is not effected.
can you please review my code and suggest me any changes in . ExcelToPpt method.


#4

@asgd,

Can you please try to use Aspose.Slides latest version 19.2 on your end share feedback with us if there is still an issue. Aspose.Slides 17.12.1 is also very old version.


#5

Hi team

we have used version 19.1 for aspose slides,still it is not working,can you please check my code in ExcelToPpt method in Program.cs .


#6

@asgd,

I am unable to find any project attached for verification. Can you please make sure if you have shared the sample project.


#8

Hi team,

Please find attachment with sample application.i have deleted dll of aspose.slides and aspose.cells due to memory issue
aspose.slides version :19.1
aspose .cells version :5.0.0.0

Please add above version dlls in application reference
Thanks.
PptSample.zip (2.6 MB)


#9

@asgd,

I have worked with sample project shared by you and resolved issues in that. I have also shared updated project with you. I like to inform that actual issue was in Aspose.Cells. You may download project from this Dropbox link. Also if there is still an issue related to Aspose.Cells, please contact Aspose.Cells forum. They will better help you out related to this issue.


#10

Hi team
we are using Aspose slides version (19.2) and Aspose Cells Version (18.4.0.0). There is no problem with aspose cells .Only problem with downloading PPT is the image not inserting in the slide(2nd slide from extracted PPT) . I am attaching sample Console application with our Licensed Aspose dlls. Please review my code rectify the mistakes in existing code. since i have requested long back,but not getting exact solution to my problem.

As this is already in Live please send us solution asap.

Thanks ,PptSample.zip (2.5 MB)


#11

@asgd,

I have worked with sample application shared by you and there are no errors in application. Can you please elaborate the requirement that what you are trying to achieve is not being done using Aspose.Slides. Please share the desired output and specific code sample region where you are facing issue.


#12

Hi Team , I am attaching Two Zip Files one is old code and other is New code after migration of Aspose Slides.

After Migration PPT not getting expected. Please compare both console applications code fix the issue in New code . We need to get PPT as Old one From the migrated code console Application.
We have Aspose.Total.lic licence for New vesion of dlls. As this is already in Live please send us solution asap.

For Old Code
Aspose.cells version - 5.0.0.0
Aspose.Slides version- 4.3.0.0

For New Code
Aspose.cells version - 18.4.0.0
Aspose.Slides version- 19.2.0.0

Please Add above Version dlls before running the application.
PptSampleNew.zip (2.5 MB)
PptSampleOld.zip (2.5 MB)


#13

@kiranreddy0228,

As I shared with you earlier that I have worked with sample application shared by you and there are no errors in application. Can you please elaborate the requirement that what you are trying to achieve is not being done using Aspose.Slides. Please share the desired output and specific code sample region where you are facing issue.


#14

Hi Team,
I know in the application there is no errors but in exported ppt 2nd slide chart not inserted. I want solution why chart not inserted ?.

Please run PptSampleOld.zip application with old aspose dlls as mentioned previous post. the exported ppt is the final expected output ppt file . the exported ppt path shown in console window please check that exported ppt.

after run migrated PptSampleNew.zip application with new aspose dlls as mentioned previous post the exported ppt in 2nd slide chart not inserted. please check this code why chart not inserted in the ppt 2nd slide.

For Reference I am attaching Exported PPts Before and after aspose Slides Migration. please check solve the problem asap.Exports.zip (5.3 MB)

thanks,
kiran


#15

@kiranreddy0228,

There have been some mistakes in setting the Ole frame position and also the logic of removing extra slides has issues. Please try using the modified sample project for your convenience.

PptSample.zip (5.0 MB)


#16

Hi Team,

Thanks for your response.

Regards,
Kiran Reddy N


#17

@kiranreddy0228,

You are very welcome.