public static void SetPageSetupAndSectionFormatting(string dataDir)
{
// ExStart:DocumentBuilderSetPageSetupAndSectionFormatting
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Set page properties
builder.PageSetup.Orientation = Orientation.Landscape;
builder.PageSetup.LeftMargin = 50;
builder.PageSetup.PaperSize = PaperSize.Paper10x14;
dataDir = dataDir + "DocumentBuilderSetPageSetupAndSectionFormatting_out.doc";
doc.Save(dataDir);
// ExEnd:DocumentBuilderSetPageSetupAndSectionFormatting
Console.WriteLine("\nPage setup and section formatting using DocumentBuilder set successfully.\nFile saved at " + dataDir);
}
public static void ApplyParagraphStyle(string dataDir)