public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);
Project project = new Project(dataDir + "CreateProject2.mpp");
// ExStart:HideLegendsDuringSave
SaveOptions saveOptions = new PdfSaveOptions();
// Set the LegendOnEachPage property to false to hide legends
saveOptions.LegendOnEachPage = false;
// ExEnd:HideLegendsDuringSave
project.Save(dataDir + "HideLegendsDuringSave_out.pdf", saveOptions);
}
}