public static void Run()
        {
            string inputfile    = "doc-sample.doc";
            string subdirection = "PageSetup";

            // Upload input file from local directory to Cloud Storage
            Common.UploadFile(inputfile, subdirection);

            // Extract Page Setup Information from a Word Document
            PageSetupResponse pageSetupResponse = Common.WordsService.WordsSections.GetPageSetupOfSection(inputfile, 0, Common.FOLDER);

            Console.WriteLine("\nPage setup informations from " + inputfile + " file extracted successfully.");
        }
Ejemplo n.º 2
0
        public void Words_Sections_Tests()
        {
            try
            {
                storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/doc-sample.doc", Utils.CloudStorage_Output_Folder + "/doc-sample.doc");

                WordsSectionsResponse wordsSectionsResponse = wordsService.WordsSections.GetSectionsList("doc-sample.doc", Utils.CloudStorage_Output_Folder);
                WordsSectionResponse  wordsSectionResponse  = wordsService.WordsSections.GetSectionByIndex("doc-sample.doc", 0, Utils.CloudStorage_Output_Folder);
                PageSetupResponse     pageSetupResponse     = wordsService.WordsSections.GetPageSetupOfSection("doc-sample.doc", 0, Utils.CloudStorage_Output_Folder);
                wordsService.WordsSections.UpdatePageSetupOfSection("doc-sample.doc", 0, string.Empty, pageSetupResponse.PageSetup, Utils.CloudStorage_Output_Folder);

                //storageService.File.DownloadFile(Utils.CloudStorage_Output_Folder + "/doc-sample.doc", Utils.Local_Output_Path + "/doc-sample.doc");
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }