Ejemplo n.º 1
0
        public static void Run()
        {
            string inputfile    = "doc-sample.doc";
            string subdirection = "Paragraph";

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

            // Get a specific Run of a Paragraph from a Word Document
            WordsRunResponse wordsRunResponse = Common.WordsService.WordsParagraph.GetParagraphByIndexAndRun(inputfile, 0, 0, Common.FOLDER);

            Console.WriteLine("\n" + inputfile + " have " + wordsRunResponse.Run.Text + " run text.");
        }
Ejemplo n.º 2
0
        public void Words_Paragraph_Tests()
        {
            try
            {
                storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/doc-sample.doc", Utils.CloudStorage_Output_Folder + "/doc-sample.doc");

                WordsParagraphsResponse wordsParagraphsResponse = wordsService.WordsParagraph.GetParagraphs("doc-sample.doc", Utils.CloudStorage_Output_Folder);
                WordsParagraphResponse  wordsParagraphResponse  = wordsService.WordsParagraph.GetParagraphByIndex("doc-sample.doc", 1, Utils.CloudStorage_Output_Folder);
                WordsRunResponse        wordsRunResponse        = wordsService.WordsParagraph.GetParagraphByIndexAndRun("doc-sample.doc", 1, 1, Utils.CloudStorage_Output_Folder);
                WordsFontResponse       WordsFontResponse       = wordsService.WordsParagraph.GetDocumentFontByParagraphAndRun("doc-sample.doc", 1, 1, Utils.CloudStorage_Output_Folder);
                //wordsService.WordsParagraph.UpdateDocumentFont("doc-sample.doc", 1, 1, string.Empty, WordsFontResponse.Font, Utils.CloudStorage_Output_Folder);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }