Aspose.Tasks.Examples.CSharp.ConvertingProjectData.FitContentsToCellSize.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        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
        }
    }
FitContentsToCellSize