public static void Run() { string inputfile = "doc-sample.doc"; // Upload input file from local directory to Cloud Storage Common.UploadFile(inputfile, string.Empty); // Get a Specific Bookmark from a Word WordsBookmarkRequest wordsBookmarkRequest = new WordsBookmarkRequest("AsposePdf", "Aspose.Pdf for .NET"); WordsBookmarkResponse wordsBookmarkResponse = Common.WordsService.WordsBookmarks.ReadDocumentBookmarkDataByItsName(inputfile, wordsBookmarkRequest.Name, Common.FOLDER); Console.WriteLine("\n" + inputfile + " have " + wordsBookmarkResponse.Bookmark.Name + " bookmark"); }
public void Words_Bookmarks_Tests() { try { storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/doc-sample.doc", Utils.CloudStorage_Output_Folder + "/doc-sample.doc"); WordsBookmarkRequest wordsBookmarkRequest = new WordsBookmarkRequest("AsposePdf", "Aspose.Pdf for .NET"); wordsService.WordsBookmarks.UpdateDocumentBookmark("doc-sample.doc", wordsBookmarkRequest.Name, wordsBookmarkRequest, string.Empty, Utils.CloudStorage_Output_Folder); WordsBookmarksResponse wordsBookmarksResponse = wordsService.WordsBookmarks.ReadDocumentBookmarksCommonInfo("doc-sample.doc", Utils.CloudStorage_Output_Folder); WordsBookmarkResponse wordsBookmarkResponse = wordsService.WordsBookmarks.ReadDocumentBookmarkDataByItsName("doc-sample.doc", wordsBookmarkRequest.Name, Utils.CloudStorage_Output_Folder); } catch (Exception ex) { Assert.Fail(ex.Message); } }