public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Conversion();
// Instantiate a Presentation object that represents a presentation file
using (Presentation presentation = new Presentation(dataDir + "SelectedSlides.pptx"))
{
// Setting array of slides positions
int[] slides = { 1, 3 };
// Save the presentation to PDF
presentation.Save(dataDir + "RequiredSelectedSlides_out.pdf", slides, SaveFormat.Pdf);
}
}
}