def Run(cls):
        api_instance = groupdocs_comparison_cloud.CompareApi.from_config(Common.GetConfig())
        
        source = groupdocs_comparison_cloud.FileInfo()
        source.file_path = "source_files/word/source.docx"
        target = groupdocs_comparison_cloud.FileInfo()
        target.file_path = "target_files/word/target.docx"              
        options = groupdocs_comparison_cloud.ComparisonOptions()
        options.source_file = source
        options.target_files = [target] 
        options.output_path = "output/result.docx"
        settings = groupdocs_comparison_cloud.Settings()
        settings.inserted_items_style = groupdocs_comparison_cloud.ItemsStyle()
        settings.inserted_items_style.highlight_color = "14297642"
        settings.inserted_items_style.font_color = "16711680"
        settings.inserted_items_style.underline = True
        settings.deleted_items_style = groupdocs_comparison_cloud.ItemsStyle()        
        settings.deleted_items_style.font_color = "14166746"
        settings.deleted_items_style.bold = True
        settings.changed_items_style = groupdocs_comparison_cloud.ItemsStyle()        
        settings.changed_items_style.font_color = "14320170"
        settings.changed_items_style.italic = True        
        options.settings = settings

        request = groupdocs_comparison_cloud.ComparisonsRequest(options)
        response = api_instance.comparisons(request)
        print("Output file link: " + response.href)
Esempio n. 2
0
    def Run(cls):
        api_instance = groupdocs_comparison_cloud.CompareApi.from_config(Common.GetConfig())
        
        source = groupdocs_comparison_cloud.FileInfo()
        source.file_path = "source_files/word/source.docx"
        target = groupdocs_comparison_cloud.FileInfo()
        target.file_path = "target_files/word/target.docx"  
        options = groupdocs_comparison_cloud.ComparisonOptions()
        options.source_file = source
        options.target_files = [target] 
        options.output_path = "output/result.docx"

        request = groupdocs_comparison_cloud.ComparisonsRequest(options)
        response = api_instance.comparisons(request)
        print("Output file link: " + response.href)
Esempio n. 3
0
    def Run(cls):
        api_instance = groupdocs_comparison_cloud.CompareApi.from_config(
            Common.GetConfig())

        source = groupdocs_comparison_cloud.FileInfo()
        source.file_path = "source_files/word/source.docx"
        target = groupdocs_comparison_cloud.FileInfo()
        target.file_path = "target_files/word/target.docx"
        options = groupdocs_comparison_cloud.ComparisonOptions()
        options.source_file = source
        options.target_files = [target]
        options.output_path = "output/result.docx"
        settings = groupdocs_comparison_cloud.Settings()
        settings.meta_data = groupdocs_comparison_cloud.Metadata()
        settings.meta_data.author = "Tom"
        settings.meta_data.company = "GroupDocs"
        settings.meta_data.last_save_by = "Jack"
        options.settings = settings

        request = groupdocs_comparison_cloud.ComparisonsRequest(options)
        response = api_instance.comparisons(request)
        print("Output file link: " + response.href)
Esempio n. 4
0
    def Run(cls):
        api_instance = groupdocs_comparison_cloud.CompareApi.from_config(
            Common.GetConfig())

        source = groupdocs_comparison_cloud.FileInfo()
        source.file_path = "source_files/word/source.docx"
        target = groupdocs_comparison_cloud.FileInfo()
        target.file_path = "target_files/word/target.docx"
        target1 = groupdocs_comparison_cloud.FileInfo()
        target1.file_path = "target_files/word/target_1.docx"
        target2 = groupdocs_comparison_cloud.FileInfo()
        target2.file_path = "target_files/word/target_2.docx"
        options = groupdocs_comparison_cloud.ComparisonOptions()
        options.source_file = source
        options.target_files = [target, target1, target2]
        options.output_path = "output/result.docx"
        settings = groupdocs_comparison_cloud.Settings()
        settings.inserted_items_style = groupdocs_comparison_cloud.ItemsStyle()
        settings.inserted_items_style.font_color = "16711680"
        options.settings = settings

        request = groupdocs_comparison_cloud.ComparisonsRequest(options)
        response = api_instance.comparisons(request)
        print("Output file link: " + response.href)
Esempio n. 5
0
    def Run(self):
        # Create instance of the API
        api = Common_Utilities.Get_CompareApi_Instance()
        
        try:
            options = groupdocs_comparison_cloud.Options()
            
            # Source file
            sourceFileInfo = groupdocs_comparison_cloud.FileInfo()
            sourceFileInfo.file_path = "Comparisondocs\\source_protected.docx"
            sourceFileInfo.password = "******"
            sourceFileInfo.storage_name = Common_Utilities.myStorage
            
            options.source_file = sourceFileInfo    
            options.output_path = "Comparisondocs\\result_multi_protected.docx"
            
            options.settings = groupdocs_comparison_cloud.Settings()
            options.settings.generate_summary_page = True
            options.settings.show_deleted_content = True
            options.settings.style_change_detection = True
            options.settings.use_frames_for_del_ins_elements = False
            options.settings.meta_data = None
            options.settings.detail_level = "Low"
            options.settings.diagram_master_setting = None
            options.settings.calculate_component_coordinates = False
            options.settings.clone_metadata = "Default"
            options.settings.mark_deleted_inserted_content_deep = False
            options.settings.password = "******"
            options.settings.password_save_option = "User"
            
            options.settings.deleted_items_style = groupdocs_comparison_cloud.ItemsStyle()        
            options.settings.deleted_items_style.begin_separator_string = ""
            options.settings.deleted_items_style.end_separator_string = ""
            options.settings.deleted_items_style.font_color = "16711680"
            options.settings.deleted_items_style.highlight_color = "16711680"
            options.settings.deleted_items_style.bold = False
            options.settings.deleted_items_style.italic = False
            options.settings.deleted_items_style.strike_through = False
            
            options.settings.inserted_items_style = groupdocs_comparison_cloud.ItemsStyle()        
            options.settings.inserted_items_style.begin_separator_string = ""
            options.settings.inserted_items_style.end_separator_string = ""
            options.settings.inserted_items_style.font_color = "255"
            options.settings.inserted_items_style.highlight_color = "255"
            options.settings.inserted_items_style.bold = False
            options.settings.inserted_items_style.italic = False
            options.settings.inserted_items_style.strike_through = False
            
            options.settings.style_changed_items_style = groupdocs_comparison_cloud.ItemsStyle()
            options.settings.style_changed_items_style.begin_separator_string = ""
            options.settings.style_changed_items_style.end_separator_string = ""
            options.settings.style_changed_items_style.font_color = "65280"
            options.settings.style_changed_items_style.highlight_color = "65280"
            options.settings.style_changed_items_style.bold = False
            options.settings.style_changed_items_style.italic = False
            options.settings.style_changed_items_style.strike_through = False
            
            # First target file
            targetFileInfo1 = groupdocs_comparison_cloud.FileInfo()
            targetFileInfo1.file_path = "Comparisondocs\\target_protected.docx"
            targetFileInfo1.password = "******"
            targetFileInfo1.storage_name = Common_Utilities.myStorage
            
            # Second target file
            targetFileInfo2 = groupdocs_comparison_cloud.FileInfo()
            targetFileInfo2.file_path = "Comparisondocs\\target_2_protected.docx"
            targetFileInfo2.password = "******"
            targetFileInfo2.storage_name = Common_Utilities.myStorage

            options.target_files = [targetFileInfo1, targetFileInfo2]
            
            request = groupdocs_comparison_cloud.ComparisonsRequest(options)
            response = api.comparisons(request)
            
            print("Expected response type is Link: " + response.href)
        except groupdocs_comparison_cloud.ApiException as e:
            print("Exception while calling API: {0}".format(e.message))