Aspose.Tasks.Examples.CSharp.ConvertingProjectData.HideLegendsDuringSave.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);
                        
            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);                    
        }
    }
HideLegendsDuringSave