Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This gist exceeds the recommended number of files (~10). To access all files, please clone this gist.
This Gist contains Ruby code samples for Aspose.Words Cloud API
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
accept_request = AcceptAllRevisionsRequest.new(name: 'Sample.docx')
@words_api.accept_all_revisions(accept_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
accept_request = AcceptAllRevisionsOnlineRequest.new(document: request_document)
@words_api.accept_all_revisions_online(accept_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
remote_file_name= 'Sample.docx'
request_document_list_document_entries0 = DocumentEntry.new({:Href => remote_file_name, :ImportFormatMode => 'KeepSourceFormatting'})
request_document_list_document_entries = [request_document_list_document_entries0]
request_document_list = DocumentEntryList.new({:DocumentEntries => request_document_list_document_entries})
append_request = AppendDocumentRequest.new(name: remote_file_name, document_list: request_document_list)
@words_api.append_document(append_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request_document_list_document_entries0 = DocumentEntry.new({:Href => 'Sample.docx', :ImportFormatMode => 'KeepSourceFormatting'})
request_document_list_document_entries = [request_document_list_document_entries0]
request_document_list = DocumentEntryList.new({:DocumentEntries => request_document_list_document_entries})
append_request = AppendDocumentOnlineRequest.new(document: request_document, document_list: request_document_list)
@words_api.append_document_online(append_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_style_apply = StyleApply.new({:StyleName => 'Heading 1'})
apply_style_request = ApplyStyleToDocumentElementRequest.new(name: 'Sample.docx', styled_node_path: 'paragraphs/1/paragraphFormat', style_apply: request_style_apply)
@words_api.apply_style_to_document_element(apply_style_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request_style_apply = StyleApply.new({:StyleName => 'Heading 1'})
apply_style_request = ApplyStyleToDocumentElementOnlineRequest.new(document: request_document, styled_node_path: 'paragraphs/1/paragraphFormat', style_apply: request_style_apply)
@words_api.apply_style_to_document_element_online(apply_style_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_report_engine_settings_report_build_options = ['AllowMissingMembers', 'RemoveEmptyParagraphs']
request_report_engine_settings = ReportEngineSettings.new({:DataSourceType => 'Json', :ReportBuildOptions => request_report_engine_settings_report_build_options})
build_report_request = BuildReportRequest.new(name: 'Sample.docx', data: 'Data.json', report_engine_settings: request_report_engine_settings)
@words_api.build_report(build_report_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_template = File.open('Sample.docx')
request_report_engine_settings = ReportEngineSettings.new({:DataSourceType => 'Json', :DataSourceName => 'persons'})
build_report_request = BuildReportOnlineRequest.new(template: request_template, data: 'Data.json', report_engine_settings: request_report_engine_settings)
@words_api.build_report_online(build_report_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
classify_request = ClassifyRequest.new(text: 'Try text classification', best_classes_count: '3')
@words_api.classify(classify_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
classify_request = ClassifyDocumentRequest.new(name: 'Sample.docx', best_classes_count: '3')
@words_api.classify_document(classify_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
classify_request = ClassifyDocumentOnlineRequest.new(document: request_document, best_classes_count: '3')
@words_api.classify_document_online(classify_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_compare_data = CompareData.new({:Author => 'author', :ComparingWithDocument => 'TestCompareDocument2.doc', :DateTime => Date.iso8601('2015-10-26T00:00:00.0000000Z')})
compare_request = CompareDocumentRequest.new(name: 'TestCompareDocument1.doc', compare_data: request_compare_data, dest_file_name: 'CompareDocumentOut.doc')
@words_api.compare_document(compare_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('compareTestDoc1.doc')
request_compare_data = CompareData.new({:Author => 'author', :ComparingWithDocument => 'TestCompareDocument2.doc', :DateTime => Date.iso8601('2015-10-26T00:00:00.0000000Z')})
request_comparing_document = File.open('compareTestDoc2.doc')
compare_request = CompareDocumentOnlineRequest.new(document: request_document, compare_data: request_compare_data, comparing_document: request_comparing_document, dest_file_name: 'CompareDocumentOut.doc')
@words_api.compare_document_online(compare_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
convert_request = ConvertDocumentRequest.new(document: request_document, format: 'pdf')
@words_api.convert_document(convert_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
convert_request = ConvertDocumentRequest.new(document: request_document, format: 'pdf')
@words_api.convert_document(convert_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
convert_request = ConvertDocumentRequest.new(document: request_document, format: 'pdf')
@words_api.convert_document(convert_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
copy_request = CopyFileRequest.new(dest_path: 'Copy.docx', src_path: 'Sample.docx')
@words_api.copy_file(copy_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
folder_to_copy= '/TestCopyFolder'
copy_request = CopyFolderRequest.new(dest_path: folder_to_copy + 'Dest', src_path: folder_to_copy + 'Src')
@words_api.copy_folder(copy_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_style_copy = StyleCopy.new({:StyleName => 'Heading 1'})
copy_request = CopyStyleRequest.new(name: 'Sample.docx', style_copy: request_style_copy)
@words_api.copy_style(copy_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request_style_copy = StyleCopy.new({:StyleName => 'Heading 1'})
copy_request = CopyStyleOnlineRequest.new(document: request_document, style_copy: request_style_copy)
@words_api.copy_style_online(copy_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
create_request = CreateDocumentRequest.new(file_name: 'Sample.docx')
@words_api.create_document(create_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
create_request = CreateFolderRequest.new(path: '/TestCreateFolder')
@words_api.create_folder(create_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_property = DocumentPropertyCreateOrUpdate.new({:Value => 'John Doe'})
create_request = CreateOrUpdateDocumentPropertyRequest.new(name: 'Sample.docx', property_name: 'AsposeAuthor', property: request_property)
@words_api.create_or_update_document_property(create_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request_property = DocumentPropertyCreateOrUpdate.new({:Value => 'John Doe'})
create_request = CreateOrUpdateDocumentPropertyOnlineRequest.new(document: request_document, property_name: 'AsposeAuthor', property: request_property)
@words_api.create_or_update_document_property_online(create_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteAllParagraphTabStopsRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_all_paragraph_tab_stops(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteAllParagraphTabStopsOnlineRequest.new(document: request_document, index: 0)
@words_api.delete_all_paragraph_tab_stops_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteBorderRequest.new(name: 'Sample.docx', border_type: 'left', node_path: 'tables/1/rows/0/cells/0')
@words_api.delete_border(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteBorderOnlineRequest.new(document: request_document, border_type: 'left', node_path: 'tables/1/rows/0/cells/0')
@words_api.delete_border_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteBordersRequest.new(name: 'Sample.docx', node_path: 'tables/1/rows/0/cells/0')
@words_api.delete_borders(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteBordersOnlineRequest.new(document: request_document, node_path: 'tables/1/rows/0/cells/0')
@words_api.delete_borders_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteCommentRequest.new(name: 'Sample.docx', comment_index: 0)
@words_api.delete_comment(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteCommentOnlineRequest.new(document: request_document, comment_index: 0)
@words_api.delete_comment_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteCommentsRequest.new(name: 'Sample.docx')
@words_api.delete_comments(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteCommentsOnlineRequest.new(document: request_document)
@words_api.delete_comments_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteCustomXmlPartRequest.new(name: 'Sample.docx', custom_xml_part_index: 0)
@words_api.delete_custom_xml_part(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteCustomXmlPartOnlineRequest.new(document: request_document, custom_xml_part_index: 0)
@words_api.delete_custom_xml_part_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteCustomXmlPartsRequest.new(name: 'Sample.docx')
@words_api.delete_custom_xml_parts(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteCustomXmlPartsOnlineRequest.new(document: request_document)
@words_api.delete_custom_xml_parts_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteDocumentPropertyRequest.new(name: 'Sample.docx', property_name: 'testProp')
@words_api.delete_document_property(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteDocumentPropertyOnlineRequest.new(document: request_document, property_name: 'testProp')
@words_api.delete_document_property_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteDrawingObjectRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_drawing_object(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteDrawingObjectOnlineRequest.new(document: request_document, index: 0)
@words_api.delete_drawing_object_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteFieldRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_field(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteFieldOnlineRequest.new(document: request_document, index: 0, node_path: 'sections/0/paragraphs/0')
@words_api.delete_field_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteFieldsRequest.new(name: 'Sample.docx')
@words_api.delete_fields(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteFieldsOnlineRequest.new(document: request_document)
@words_api.delete_fields_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteFileRequest.new(path: 'Sample.docx')
@words_api.delete_file(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteFolderRequest.new(path: '')
@words_api.delete_folder(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteFootnoteRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_footnote(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.doc')
delete_request = DeleteFootnoteOnlineRequest.new(document: request_document, index: 0)
@words_api.delete_footnote_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteFormFieldRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_form_field(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteFormFieldOnlineRequest.new(document: request_document, index: 0, node_path: 'sections/0')
@words_api.delete_form_field_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteHeaderFooterRequest.new(name: 'Sample.docx', section_path: '', index: 0)
@words_api.delete_header_footer(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.doc')
delete_request = DeleteHeaderFooterOnlineRequest.new(document: request_document, section_path: '', index: 0)
@words_api.delete_header_footer_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteHeadersFootersRequest.new(name: 'Sample.docx', section_path: '')
@words_api.delete_headers_footers(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.doc')
delete_request = DeleteHeadersFootersOnlineRequest.new(document: request_document, section_path: '')
@words_api.delete_headers_footers_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteMacrosRequest.new(name: 'Sample.docx')
@words_api.delete_macros(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteMacrosOnlineRequest.new(document: request_document)
@words_api.delete_macros_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteOfficeMathObjectRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_office_math_object(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteOfficeMathObjectOnlineRequest.new(document: request_document, index: 0)
@words_api.delete_office_math_object_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteParagraphRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_paragraph(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteParagraphListFormatRequest.new(name: 'Sample.docx', index: 0)
@words_api.delete_paragraph_list_format(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.doc')
delete_request = DeleteParagraphListFormatOnlineRequest.new(document: request_document, index: 0)
@words_api.delete_paragraph_list_format_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteParagraphOnlineRequest.new(document: request_document, index: 0)
@words_api.delete_paragraph_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteParagraphTabStopRequest.new(name: 'Sample.docx', position: 72.0, index: 0)
@words_api.delete_paragraph_tab_stop(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteParagraphTabStopOnlineRequest.new(document: request_document, position: 72.0, index: 0)
@words_api.delete_paragraph_tab_stop_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteRunRequest.new(name: 'Sample.docx', paragraph_path: 'paragraphs/1', index: 0)
@words_api.delete_run(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.doc')
delete_request = DeleteRunOnlineRequest.new(document: request_document, paragraph_path: 'paragraphs/1', index: 0)
@words_api.delete_run_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteSectionRequest.new(name: 'Sample.docx', section_index: 0)
@words_api.delete_section(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteSectionOnlineRequest.new(document: request_document, section_index: 0)
@words_api.delete_section_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteTableRequest.new(name: 'Sample.docx', index: 1)
@words_api.delete_table(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteTableCellRequest.new(name: 'Sample.docx', table_row_path: 'sections/0/tables/2/rows/0', index: 0)
@words_api.delete_table_cell(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteTableCellOnlineRequest.new(document: request_document, table_row_path: 'sections/0/tables/2/rows/0', index: 0)
@words_api.delete_table_cell_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteTableOnlineRequest.new(document: request_document, index: 1)
@words_api.delete_table_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteTableRowRequest.new(name: 'Sample.docx', table_path: 'tables/1', index: 0)
@words_api.delete_table_row(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteTableRowOnlineRequest.new(document: request_document, table_path: 'tables/1', index: 0)
@words_api.delete_table_row_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
delete_request = DeleteWatermarkRequest.new(name: 'Sample.docx')
@words_api.delete_watermark(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
delete_request = DeleteWatermarkOnlineRequest.new(document: request_document)
@words_api.delete_watermark_online(delete_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
download_request = DownloadFileRequest.new(path: 'Sample.docx')
@words_api.download_file(download_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_options_current_user = UserInformation.new({:Name => 'SdkTestUser'})
request_options = FieldOptions.new({:CurrentUser => request_options_current_user})
mail_merge_request = ExecuteMailMergeRequest.new(name: 'Sample.docx', data: File.read(File.join(local_test_folder, 'TestMailMergeData.xml')), options: request_options)
@words_api.execute_mail_merge(mail_merge_request)
require 'aspose_words_cloud'
client_id = "####-####-####-####-####"
secret = "##################"
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = client_id
config.client_data['ClientSecret'] = secret
end
@words_api = WordsAPI.new
fileName = "template.doc"
destName = "Out_PostDocumentExecuteMailMergeWithHTMLData.docx"
data = File.new("TestPostDocumentExecuteMailMerge.txt", 'rb')
# Upload original document to Cloud Storage
@words_api.upload_file UploadFileRequest.new(File.new(fileName, 'rb'), fileName, nil)
request = ExecuteMailMergeRequest.new(fileName, data, nil, nil, nil, nil, nil, nil, nil, nil, destName)
result = @words_api.execute_mail_merge(request)
puts("Result " + (result).to_s)
require 'aspose_words_cloud'
client_id = "####-####-####-####-####"
secret = "##################"
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = client_id
config.client_data['ClientSecret'] = secret
end
@words_api = WordsAPI.new
fileName = "SampleMailMergeTemplate.docx"
destName = "Out_SampleMailMergeTemplate.docx"
data = File.new("SampleMailMergeTemplateData.xml", 'rb')
# Upload original document to Cloud Storage
@words_api.upload_file UploadFileRequest.new(File.new(fileName, 'rb'), fileName, nil)
request = ExecuteMailMergeRequest.new(fileName, data, nil, nil, nil, nil, nil, nil, nil, nil, destName)
result = @words_api.execute_mail_merge(request)
puts("Result " + (result).to_s)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_template = File.open('Sample.docx')
request_data = File.open(File.read(File.join(local_test_folder, 'TestMailMergeData.xml')))
request_options_current_user = UserInformation.new({:Name => 'SdkTestUser'})
request_options = FieldOptions.new({:CurrentUser => request_options_current_user})
mail_merge_request = ExecuteMailMergeOnlineRequest.new(template: request_template, data: request_data, options: request_options)
@words_api.execute_mail_merge_online(mail_merge_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_template = File.open('TestMailMergeWithImages.doc')
request_data = File.open('MailMergeData.json')
mail_merge_request = ExecuteMailMergeOnlineRequest.new(template: request_template, data: request_data, document_file_name: 'Out_TestMailMergeWithImages.doc')
@words_api.execute_mail_merge_online(mail_merge_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_template = File.open('template.doc')
request_data = File.open('TestPostDocumentExecuteMailMerge.txt')
mail_merge_request = ExecuteMailMergeOnlineRequest.new(template: request_template, data: request_data, document_file_name: 'Out_PostDocumentExecuteMailMergeWithHTMLData.docx')
@words_api.execute_mail_merge_online(mail_merge_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_template = File.open('SampleMailMergeTemplate.docx')
request_data = File.open('SampleMailMergeTemplateData.xml')
mail_merge_request = ExecuteMailMergeOnlineRequest.new(template: request_template, data: request_data, document_file_name: 'Out_SampleMailMergeTemplate.docx')
@words_api.execute_mail_merge_online(mail_merge_request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetAvailableFontsRequest.new()
@words_api.get_available_fonts(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetBookmarkByNameRequest.new(name: 'Sample.docx', bookmark_name: 'aspose')
@words_api.get_bookmark_by_name(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetBookmarkByNameOnlineRequest.new(document: request_document, bookmark_name: 'aspose')
@words_api.get_bookmark_by_name_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetBookmarksRequest.new(name: 'Sample.docx')
@words_api.get_bookmarks(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetBookmarksOnlineRequest.new(document: request_document)
@words_api.get_bookmarks_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetBorderRequest.new(name: 'Sample.docx', border_type: 'left', node_path: 'tables/1/rows/0/cells/0')
@words_api.get_border(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetBorderOnlineRequest.new(document: request_document, border_type: 'left', node_path: 'tables/1/rows/0/cells/0')
@words_api.get_border_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetBordersRequest.new(name: 'Sample.docx', node_path: 'tables/1/rows/0/cells/0')
@words_api.get_borders(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetBordersOnlineRequest.new(document: request_document, node_path: 'tables/1/rows/0/cells/0')
@words_api.get_borders_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetCommentRequest.new(name: 'Sample.docx', comment_index: 0)
@words_api.get_comment(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetCommentOnlineRequest.new(document: request_document, comment_index: 0)
@words_api.get_comment_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetCommentsRequest.new(name: 'Sample.docx')
@words_api.get_comments(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetCommentsOnlineRequest.new(document: request_document)
@words_api.get_comments_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetCustomXmlPartRequest.new(name: 'Sample.docx', custom_xml_part_index: 0)
@words_api.get_custom_xml_part(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetCustomXmlPartOnlineRequest.new(document: request_document, custom_xml_part_index: 0)
@words_api.get_custom_xml_part_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetCustomXmlPartsRequest.new(name: 'Sample.docx')
@words_api.get_custom_xml_parts(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetCustomXmlPartsOnlineRequest.new(document: request_document)
@words_api.get_custom_xml_parts_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetDocumentRequest.new(document_name: 'Sample.docx')
@words_api.get_document(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetDocumentDrawingObjectByIndexRequest.new(name: 'Sample.docx', index: 0)
@words_api.get_document_drawing_object_by_index(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetDocumentDrawingObjectByIndexOnlineRequest.new(document: request_document, index: 0, node_path: 'sections/0')
@words_api.get_document_drawing_object_by_index_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetDocumentDrawingObjectImageDataRequest.new(name: 'Sample.docx', index: 0)
@words_api.get_document_drawing_object_image_data(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetDocumentDrawingObjectImageDataOnlineRequest.new(document: request_document, index: 0, node_path: 'sections/0')
@words_api.get_document_drawing_object_image_data_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetDocumentDrawingObjectOleDataRequest.new(name: 'Sample.docx', index: 0)
@words_api.get_document_drawing_object_ole_data(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetDocumentDrawingObjectOleDataOnlineRequest.new(document: request_document, index: 0, node_path: 'sections/0')
@words_api.get_document_drawing_object_ole_data_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetDocumentDrawingObjectsRequest.new(name: 'Sample.docx')
@words_api.get_document_drawing_objects(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetDocumentDrawingObjectsOnlineRequest.new(document: request_document, node_path: 'sections/0')
@words_api.get_document_drawing_objects_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetDocumentFieldNamesRequest.new(name: 'Sample.docx')
@words_api.get_document_field_names(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_template = File.open('Sample.docx')
request = GetDocumentFieldNamesOnlineRequest.new(template: request_template, use_non_merge_fields: true)
@words_api.get_document_field_names_online(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetDocumentHyperlinkByIndexRequest.new(name: 'Sample.docx', hyperlink_index: 0)
@words_api.get_document_hyperlink_by_index(request)
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request_document = File.open('Sample.docx')
request = GetDocumentHyperlinkByIndexOnlineRequest.new(document: request_document, hyperlink_index: 0)
@words_api.get_document_hyperlink_by_index_online(request)