Ürünlerimize göz atın

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

Kurulum

Paket rubygems.org adresinde mevcuttur ve aşağıdaki komut çalıştırılarak gem ile kurulabilir:

gem install groupdocs_editor_cloud

Gem Version Gem Total Downloads Ruby-GroupDocsCloud


Gereksinimler

Bağımlılıklar

SDK aşağıdaki gem’leri gerektirir:

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

Hızlı Başlangıç

API kimlik bilgilerinizi alın

GroupDocs.Editor Cloud kullanmak için GroupDocs.Cloud Dashboard adresinden kaydolun ve Client ID ile Client Secret değerlerinizi alın.

API’yi başlatın

GroupDocs.Editor Cloud SDK for Ruby kullanmaya başlamak için aşağıdaki kodu kullanın.

require 'groupdocs_editor_cloud'

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

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

editApi = GroupDocsEditorCloud::EditApi.from_config(config)

Tam örneği RunExamples.rb içinde görün.

Sözcük işlem belgesini düzenleyin

Başlatıldıktan sonra, parola korumalı bir belgeyi yüklemek, HTML’ini değiştirmek ve yeniden DOCX olarak kaydetmek için bu temel örneği kullanın.

require 'groupdocs_editor_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

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

fileApi = GroupDocsEditorCloud::FileApi.from_config(config)
editApi = GroupDocsEditorCloud::EditApi.from_config(config)

fileInfo = GroupDocsEditorCloud::FileInfo.new
fileInfo.file_path = 'WordProcessing/password-protected.docx'
fileInfo.password = 'password'

loadOptions = GroupDocsEditorCloud::WordProcessingLoadOptions.new
loadOptions.file_info = fileInfo
loadOptions.output_path = "output"

loadRequest = GroupDocsEditorCloud::LoadRequest.new(loadOptions)
loadResult = editApi.load(loadRequest)

htmlFile = fileApi.download_file(GroupDocsEditorCloud::DownloadFileRequest.new loadResult.html_path)
htmlFile.open
html = htmlFile.read
htmlFile.close

html = html.gsub("Sample test text", "Hello world")

htmlFile = File.open(htmlFile.path, "w")
htmlFile.write(html)
htmlFile.close
uploadRequest = GroupDocsEditorCloud::UploadFileRequest.new loadResult.html_path, File.open(htmlFile.path, "r")
fileApi.upload_file(uploadRequest)

saveOptions = GroupDocsEditorCloud::WordProcessingSaveOptions.new
saveOptions.file_info = fileInfo
saveOptions.output_path = "output/edited.docx"
saveOptions.html_path = loadResult.html_path
saveOptions.resources_path = loadResult.resources_path

saveRequest = GroupDocsEditorCloud::SaveRequest.new(saveOptions)
saveResult = editApi.save(saveRequest)

puts("Document edited: " + saveResult.path)

Tam örneği EditWordProcessingDocument.rb içinde görün.

Elektronik tabloyu düzenleyin

Bu örnek ilk çalışma sayfasını yükler, HTML’i düzenler ve yeniden XLSX olarak kaydeder.

require 'groupdocs_editor_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

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

fileApi = GroupDocsEditorCloud::FileApi.from_config(config)
editApi = GroupDocsEditorCloud::EditApi.from_config(config)

fileInfo = GroupDocsEditorCloud::FileInfo.new
fileInfo.file_path = 'Spreadsheet/four-sheets.xlsx'

loadOptions = GroupDocsEditorCloud::SpreadsheetLoadOptions.new
loadOptions.file_info = fileInfo
loadOptions.output_path = "output"
loadOptions.worksheet_index = 0

loadRequest = GroupDocsEditorCloud::LoadRequest.new(loadOptions)
loadResult = editApi.load(loadRequest)

htmlFile = fileApi.download_file(GroupDocsEditorCloud::DownloadFileRequest.new loadResult.html_path)
htmlFile.open
html = htmlFile.read
htmlFile.close

html = html.gsub("This is sample sheet", "This is sample sheep")

htmlFile = File.open(htmlFile.path, "w")
htmlFile.write(html)
htmlFile.close
uploadRequest = GroupDocsEditorCloud::UploadFileRequest.new loadResult.html_path, File.open(htmlFile.path, "r")
fileApi.upload_file(uploadRequest)

saveOptions = GroupDocsEditorCloud::SpreadsheetSaveOptions.new
saveOptions.file_info = fileInfo
saveOptions.output_path = "output/edited.xlsx"
saveOptions.html_path = loadResult.html_path
saveOptions.resources_path = loadResult.resources_path

saveRequest = GroupDocsEditorCloud::SaveRequest.new(saveOptions)
saveResult = editApi.save(saveRequest)

puts("Document edited: " + saveResult.path)

Tam örneği EditSpreadsheetDocument.rb içinde görün.

Belge bilgilerini alın

Bu örnek parola korumalı bir belgenin sayfa sayısını okur.

require 'groupdocs_editor_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

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

infoApi = GroupDocsEditorCloud::InfoApi.from_config(config)
fileInfo = GroupDocsEditorCloud::FileInfo.new
fileInfo.file_path = 'WordProcessing/password-protected.docx'
fileInfo.password = 'password'
request = GroupDocsEditorCloud::GetInfoRequest.new(fileInfo)
response = infoApi.get_info(request)
puts("Pages count = " + response.page_count.to_s)

Tam örneği GetDocumentInformation.rb içinde görün.

Desteklenen düzenleme biçimlerini alın

API’nin düzenleyebileceği belge biçimlerini alın.

require 'groupdocs_editor_cloud'

client_id = "YourClientId"
client_secret = "YourClientSecret"

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

infoApi = GroupDocsEditorCloud::InfoApi.from_config(config)
result = infoApi.get_supported_file_formats()
result.formats.each do |format|
    puts(format.file_format)
end

Tam örneği GetSupportedFileTypes.rb içinde görün.

GitHub’daki örnekler

GroupDocs.Editor Cloud Ruby Examples deposu şunları kapsayan çalıştırmaya hazır örnekler içerir:

CategoryExamples
Edit OperationsSözcük işleme, elektronik tablo, sunu, metin ve sınırlanmış dosyalar
InfoBelge bilgileri, lisans tüketimi, desteklenen dosya türleri

Örnekleri çalıştırma

  1. örnek deposunu klonlayın veya indirin
  2. Examples/RunExamples.rb dosyasını düzenleyin ve client_id ile client_secret değerlerini ayarlayın
  3. Examples dizinine gidin
  4. gem install groupdocs_editor_cloud komutunu çalıştırın
  5. ruby RunExamples.rb komutunu çalıştırın

Ayrıntılar için Getting Started sayfasını ziyaret edin.


Product Docs Swagger Examples Blog Support Dashboard


Tags

Document Editing API | Ruby Cloud API | GroupDocs.Editor Cloud | REST API | Word Processing Formats | Spreadsheet Formats | Presentation Formats | Text Formats | CSV Files | DOCX Documents | XLSX Documents | PPTX Presentations | Password-Protected Files | Cloud Storage Integration | Document Info Retrieval | File Operations | WYSIWYG Editing | Multi-Platform Support | Secure API Access | HTML Editing | Cross-platform API



 Türkçe