Περιηγηθείτε στα Προϊόντα μας

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.


Product Docs Swagger Examples Blog Support Dashboard

Εγκατάσταση

Το πακέτο είναι διαθέσιμο στο rubygems.org και μπορεί να εγκατασταθεί μέσω gem εκτελώντας την παρακάτω εντολή:

gem install groupdocs_comparison_cloud

Gem Version Gem Total Downloads Ruby-GroupDocsCloud


Απαιτήσεις

  • Ruby ~> 2.3
  • RubyGems
  • Διαπιστευτήρια GroupDocs Cloud — Client ID and Client Secret από τον Πίνακα ελέγχου

Εξαρτήσεις

Το SDK απαιτεί τα ακόλουθα gems:

PackageConstraint
addressable~> 2.8.4, >= 2.8.4
faraday~> 0.14.0

Γρήγορη εκκίνηση

Λάβετε τα διαπιστευτήρια API

Για να χρησιμοποιήσετε το GroupDocs.Comparison Cloud, εγγραφείτε στον GroupDocs.Cloud Dashboard και λάβετε το Client ID και το Client Secret σας.

Αρχικοποίηση του API

Χρησιμοποιήστε τον παρακάτω κώδικα για να ξεκινήσετε να χρησιμοποιείτε το GroupDocs.Comparison Cloud SDK for Ruby.

require 'groupdocs_comparison_cloud'

# Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
client_id = "YourClientId"
client_secret = "YourClientSecret"

config = GroupDocsComparisonCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"

compare_api = GroupDocsComparisonCloud::CompareApi.from_config(config)

Δείτε το πλήρες παράδειγμα στο RunExamples.rb.

Σύγκριση δύο εγγράφων

Μετά την αρχικοποίηση, χρησιμοποιήστε αυτό το βασικό παράδειγμα για να συγκρίνετε ένα έγγραφο προέλευσης με ένα έγγραφο προορισμού στον χώρο αποθήκευσης cloud.

require 'groupdocs_comparison_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

config = GroupDocsComparisonCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"

apiInstance = GroupDocsComparisonCloud::CompareApi.from_config(config)
source = GroupDocsComparisonCloud::FileInfo.new
source.file_path = "source_files/word/source.docx"
target = GroupDocsComparisonCloud::FileInfo.new
target.file_path = "target_files/word/target.docx"
options = GroupDocsComparisonCloud::ComparisonOptions.new
options.source_file = source
options.target_files = [target]
options.output_path = "output/result.docx"

request = GroupDocsComparisonCloud::ComparisonsRequest.new(options)
response = apiInstance.comparisons(request)

puts("Output file link: " + response.href)

Δείτε το πλήρες παράδειγμα στο CompareDocuments.rb.

Λήψη της λίστας αλλαγών

Αυτό το παράδειγμα επιστρέφει τις αλλαγές ανάμεσα σε δύο έγγραφα Word.

require 'groupdocs_comparison_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

config = GroupDocsComparisonCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"

apiInstance = GroupDocsComparisonCloud::CompareApi.from_config(config)
source = GroupDocsComparisonCloud::FileInfo.new
source.file_path = "source_files/word/source.docx"
target = GroupDocsComparisonCloud::FileInfo.new
target.file_path = "target_files/word/target.docx"
options = GroupDocsComparisonCloud::ComparisonOptions.new
options.source_file = source
options.target_files = [target]
options.output_path = "output/result.docx"
settings = GroupDocsComparisonCloud::Settings.new
settings.calculate_component_coordinates = 100
options.settings = settings

request = GroupDocsComparisonCloud::PostChangesRequest.new(options)
changes = apiInstance.post_changes(request)
puts("Changes count: " + changes.length.to_s)

Δείτε το πλήρες παράδειγμα στο GetListOfChanges.rb.

Λήψη πληροφοριών εγγράφου

Αυτό το παράδειγμα διαβάζει πληροφορίες σελίδων για ένα έγγραφο στον χώρο αποθήκευσης cloud.

require 'groupdocs_comparison_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

config = GroupDocsComparisonCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"

infoApi = GroupDocsComparisonCloud::InfoApi.from_config(config)
file_info = GroupDocsComparisonCloud::FileInfo.new
file_info.file_path = "source_files/word/source.docx"

request = GroupDocsComparisonCloud::GetDocumentInfoRequest.new(file_info)
response = infoApi.get_document_info(request)

puts("GetDocumentInformation completed: " + response.page_count.to_s)

Δείτε το πλήρες παράδειγμα στο GetDocumentInformation.rb.

Λήψη υποστηριζόμενων μορφών σύγκρισης

Ανακτήστε τις μορφές εγγράφων που μπορεί να συγκρίνει το API.

require 'groupdocs_comparison_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

config = GroupDocsComparisonCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"

infoApi = GroupDocsComparisonCloud::InfoApi.from_config(config)
result = infoApi.get_supported_file_formats()
puts("Formats count: " + result.formats.length.to_s)

Δείτε το πλήρες παράδειγμα στο GetSupportedFormats.rb.

Παραδείγματα στο GitHub

Το αποθετήριο GroupDocs.Comparison Cloud Ruby Examples περιλαμβάνει έτοιμα προς εκτέλεση παραδείγματα που καλύπτουν:

CategoryExamples
Basic UsageΣύγκριση εγγράφων, σύγκριση εγγράφων PDF, πληροφορίες εγγράφου, υποστηριζόμενες μορφές, προεπισκόπηση, κατανάλωση άδειας
Advanced UsageΠολλαπλά έγγραφα, προστατευμένα έγγραφα, ευαισθησία, στυλ αλλαγών, λίστα αλλαγών, αναθεωρήσεις, επιλογές αποθήκευσης

Τρόπος εκτέλεσης των παραδειγμάτων

  1. Κλωνοποιήστε ή κατεβάστε το αποθετήριο παραδειγμάτων
  2. Επεξεργαστείτε το Examples/RunExamples.rb και ορίστε τα client_id και client_secret
  3. Μεταβείτε στον κατάλογο Examples
  4. Εκτελέστε gem install groupdocs_comparison_cloud
  5. Εκτελέστε ruby RunExamples.rb

Για περισσότερες λεπτομέρειες, επισκεφθείτε το Getting Started.


Product Docs Swagger Examples Blog Support Dashboard


Tags

Document Comparison API | Ruby Cloud API | GroupDocs.Comparison Cloud | REST API | Document Comparison | Folder Comparison | Revision Control | Track Changes | Preview Generation | Multi-format Support | Password Protected Documents | Source Code Comparison | Change Tracking | Customization | Document Merging | Change Coordinates | Metadata Extraction | Document Security | Document Review | Secure API Access | Cloud Storage Integration | Cross-platform API



 Ελληνικά