Пример #1
0
        public void Words_DrawingObjects_Tests()
        {
            try
            {
                WordsDrawingObjectsResponse wordsDrawingObjectsResponse = wordsService.WordsDrawingObjects.ReadDocumentDrawingObjectsCommonInfo("doc-sample.doc", Utils.CloudStorage_Input_Folder);
                WordsDrawingObjectResponse  wordsDrawingObjectResponse  = wordsService.WordsDrawingObjects.ReadDrawingObjectCommonInfoByItsIndex("doc-sample.doc", 1, Utils.CloudStorage_Input_Folder);
                wordsService.WordsDrawingObjects.ConvertToFormatSpecified("doc-sample.doc", 1, WordDrawingObjectsFormat.Png, Utils.Local_Output_Path + "word-drawing-out.png", Utils.CloudStorage_Input_Folder);

                wordsService.WordsDrawingObjects.ReadDrawingObjectImageData("doc-sample.doc", 1, Utils.CloudStorage_Input_Folder, Utils.Local_Output_Path + "word-out2.png");
                wordsService.WordsDrawingObjects.GetDrawingObjectOleData("doc-sample.doc", 18, Utils.CloudStorage_Input_Folder, Utils.Local_Output_Path + "word-out3.png");
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }
Пример #2
0
        public static void Run()
        {
            string subdirectory = "Drawing";

            // The path to the documents directory.
            string dataDir = Common.GetDataDir() + subdirectory + "\\";

            string inputfile = "testfile.doc";

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

            // Get All Drawing Objects
            WordsDrawingObjectsResponse wordsDrawingObjectsResponse = Common.WordsService.WordsDrawingObjects.ReadDocumentDrawingObjectsCommonInfo(inputfile, Common.FOLDER);

            Console.WriteLine("\n" + inputfile + " have " + wordsDrawingObjectsResponse.DrawingObjects.List.Count + " drawing objects.");
        }