예제 #1
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Presentations();

            //creating instance of load options to set the presentation access password
            Aspose.Slides.LoadOptions loadOptions = new Aspose.Slides.LoadOptions();

            //Setting the access password
            loadOptions.Password = "******";

            //Opening the presentation file by passing the file path and load options to the constructor of Presentation class
            Presentation pres = new Presentation(dataDir + "OpenPasswordPresentation.pptx", loadOptions);

            //Printing the total number of slides present in the presentation
            System.Console.WriteLine(pres.Slides.Count.ToString());
        }
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Presentations();

            //Accessing the Document Properties of a Password Protected Presentation without Password
            //creating instance of load options to set the presentation access password
            Aspose.Slides.LoadOptions loadOptions = new Aspose.Slides.LoadOptions();

            //Setting the access password to null
            loadOptions.Password = null;

            //Setting the access to document properties
            loadOptions.OnlyLoadDocumentProperties = true;

            //Opening the presentation file by passing the file path and load options to the constructor of Presentation class
            Presentation pres = new Presentation(dataDir + "AccessProperties.pptx", loadOptions);

            //Getting Document Properties
            IDocumentProperties docProps = pres.DocumentProperties;

            System.Console.WriteLine("Name of Application : " + docProps.NameOfApplication);
        }
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Presentations();

            //Accessing the Document Properties of a Password Protected Presentation without Password
            //creating instance of load options to set the presentation access password
            Aspose.Slides.LoadOptions loadOptions = new Aspose.Slides.LoadOptions();

            //Setting the access password to null
            loadOptions.Password = null;

            //Setting the access to document properties
            loadOptions.OnlyLoadDocumentProperties = true;

            //Opening the presentation file by passing the file path and load options to the constructor of Presentation class
            Presentation pres = new Presentation(dataDir + "AccessProperties.pptx", loadOptions);

            //Getting Document Properties
            IDocumentProperties docProps = pres.DocumentProperties;

            System.Console.WriteLine("Name of Application : " + docProps.NameOfApplication);
        }