public void SaveToPdfStreamOnePage()
{
//ExStart
//ExFor:PdfSaveOptions.PageIndex
//ExFor:PdfSaveOptions.PageCount
//ExFor:Document.Save(Stream, SaveOptions)
//ExSummary:Converts just one page (third page in this example) of the document to PDF.
Document doc = new Document(MyDir + "Rendering.doc");
using (Stream stream = File.Create(MyDir + @"\Artifacts\Rendering.SaveToPdfStreamOnePage.pdf"))
{
PdfSaveOptions options = new PdfSaveOptions();
options.PageIndex = 2;
options.PageCount = 1;
doc.Save(stream, options);
}
//ExEnd
}