public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Conversion();
using (Presentation presentation = new Presentation(dataDir + "HiddingSlides.pptx"))
{
// Instantiate the PdfOptions class
PdfOptions pdfOptions = new PdfOptions();
// Specify that the generated document should include hidden slides
pdfOptions.ShowHiddenSlides = true;
// Save the presentation to PDF with specified options
presentation.Save(dataDir + "PDFWithHiddenSlides_out.pdf", SaveFormat.Pdf, pdfOptions);
}
}
}