Convert the first slide to PDF

I am currently using Aspose.Slides.Presentation.Save and Aspose.Slides.Pptx.PresentationEx.Save to convert a completed document to PDF. How can I convert only the first slide to PDF (so I end up with a 1 page PDF)

Hi Leigh,


I have observed the requirements shared by you and like to share that Aspose.Slides allows you to export the individual presentation slides to PDF by using slide cloning. Please try using following sample on your end to serve the purpose.

public static void GenerateSlidePdf(Presentation pres, int SlideIndex)
{
Presentation destPres = new Presentation();
Slide slide = pres.GetSlideByPosition(SlideIndex);

//Creating SortedList object that is used to store the temporary information
//about the masters of PPT file. No value should be added to it.
System.Collections.SortedList sList = new System.Collections.SortedList();

//Cloning the selected slide at the end of another presentation file
pres.CloneSlide(slide, destPres.Slides.LastSlidePosition + 1, pres, sList);

//Rremoving defult empty slide
destPres.Slides.Remove(destPres.GetSlideByPosition(1));

destPres.Save(“D:\Aspose Data\Slide_” + SlideIndex.ToString() + “.pdf”, SaveFormat.Pdf);

}

Please share, if I may help you further in this regard.

Many Thanks,