public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);
// ExStart:FitContentsToCellSize
Project project = new Project(dataDir + "CreateProject2.mpp");
SaveOptions saveOptions = new PdfSaveOptions();
// Set option fit content to true
saveOptions.FitContent = true;
saveOptions.Timescale = Timescale.Months;
saveOptions.PresentationFormat = PresentationFormat.TaskUsage;
project.Save(dataDir + "FitContentsToCellSize_out.pdf", saveOptions);
// ExEnd:FitContentsToCellSize
}
}