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.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

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

Gereksinimler
Bağımlılıklar
SDK aşağıdaki gem’leri gerektirir:
| Package | Constraint |
|---|
| addressable | ~> 2.8.0, >= 2.8.0 |
| faraday | ~> 0.14.0 |
Hızlı Başlangıç
API kimlik bilgilerinizi alın
GroupDocs.Viewer 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.Viewer Cloud SDK for Ruby kullanmaya başlamak için aşağıdaki kodu kullanın.
require 'groupdocs_viewer_cloud'
# Get your client id and client secret at https://dashboard.groupdocs.cloud
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsViewerCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
apiInstance = GroupDocsViewerCloud::ViewApi.from_config(config)
Tam örneği RunExamples.rb içinde görün.
Belgeyi dönüştürün ve indirin
Başlatıldıktan sonra, yerel bir belgeyi bulut depolamaya yüklemeden JPG olarak işlemek için bu temel örneği kullanın.
require 'groupdocs_viewer_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsViewerCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
apiInstance = GroupDocsViewerCloud::ViewApi.from_config(config)
format = "jpg"
file = File.open("Resources/SampleFiles/sample.docx", "r")
request = GroupDocsViewerCloud::ConvertAndDownloadRequest.new format, file
response = apiInstance.convert_and_download(request)
puts("ConvertAndDownload completed: " + response.length.to_s)
Tam örneği ConvertAndDownload.rb içinde görün.
Belgeyi duyarlı HTML olarak işleyin
Bu örnek duyarlı bir düzene sahip bir HTML görünümü oluşturur.
require 'groupdocs_viewer_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsViewerCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
apiInstance = GroupDocsViewerCloud::ViewApi.from_config(config)
viewOptions = GroupDocsViewerCloud::ViewOptions.new
viewOptions.file_info = GroupDocsViewerCloud::FileInfo.new
viewOptions.file_info.file_path = "SampleFiles/sample.docx"
viewOptions.view_format = "HTML"
viewOptions.render_options = GroupDocsViewerCloud::HtmlOptions.new
viewOptions.render_options.is_responsive = true
request = GroupDocsViewerCloud::CreateViewRequest.new(viewOptions)
response = apiInstance.create_view(request)
puts("HtmlViewerResponsiveLayout completed: " + response.pages.length.to_s)
Tam örneği HtmlViewerResponsiveLayout.rb içinde görün.
Seçilen sayfaları işleyin
Bu örnek bir belgenin 2 ve 3. sayfalarını HTML olarak işler.
require 'groupdocs_viewer_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsViewerCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
apiInstance = GroupDocsViewerCloud::ViewApi.from_config(config)
viewOptions = GroupDocsViewerCloud::ViewOptions.new
viewOptions.file_info = GroupDocsViewerCloud::FileInfo.new
viewOptions.file_info.file_path = "SampleFiles/sample.docx"
viewOptions.view_format = "HTML"
viewOptions.render_options = GroupDocsViewerCloud::HtmlOptions.new
viewOptions.render_options.pages_to_render = [2, 3]
request = GroupDocsViewerCloud::CreateViewRequest.new(viewOptions)
response = apiInstance.create_view(request)
puts("RenderSelectedPages completed: " + response.pages.length.to_s)
Tam örneği RenderSelectedPages.rb içinde görün.
Parola korumalı bir belgeyi görüntüleyin
Bu örnek parola korumalı bir Word belgesini HTML olarak işler.
require 'groupdocs_viewer_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsViewerCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
apiInstance = GroupDocsViewerCloud::ViewApi.from_config(config)
viewOptions = GroupDocsViewerCloud::ViewOptions.new
viewOptions.file_info = GroupDocsViewerCloud::FileInfo.new
viewOptions.file_info.file_path = "SampleFiles/password_protected.docx"
viewOptions.file_info.password = "12345"
viewOptions.view_format = "HTML"
request = GroupDocsViewerCloud::CreateViewRequest.new(viewOptions)
response = apiInstance.create_view(request)
puts("ViewProtectedDocument completed: " + response.pages.length.to_s)
Tam örneği ViewProtectedDocument.rb içinde görün.
Desteklenen görüntüleme biçimlerini alın
API’nin işleyebileceği belge biçimlerini alın.
require 'groupdocs_viewer_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsViewerCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
infoApi = GroupDocsViewerCloud::InfoApi.from_config(config)
result = infoApi.get_supported_file_formats()
puts("Formats count: " + result.formats.length.to_s)
Tam örneği GetSupportedFormats.rb içinde görün.
GitHub’daki örnekler
GroupDocs.Viewer Cloud Ruby Examples deposu şunları kapsayan çalıştırmaya hazır örnekler içerir:
| Category | Examples |
|---|
| Basic Usage | Dönüştürme ve indirme, HTML görüntüleyici, görüntü görüntüleyici, PDF görüntüleyici, belge bilgileri, ekler, desteklenen biçimler |
| Rendering Options | Seçilen sayfalar, ardışık sayfalar, filigranlar, notlar, yorumlar, özel yazı tipleri |
| Loading Options | Parola korumalı belgeler, kodlama |
| File Types | Arşiv, CAD, e-posta, PDF, elektronik tablo, Visio, Word, Outlook ve proje dosyaları |
Örnekleri çalıştırma
- örnek deposunu klonlayın veya indirin
Examples/RunExamples.rb dosyasını düzenleyin ve client_id ile client_secret değerlerini ayarlayınExamples dizinine gidingem install groupdocs_viewer_cloud komutunu çalıştırınruby RunExamples.rb komutunu çalıştırın
Ayrıntılar için Getting Started sayfasını ziyaret edin.

Document Rendering API | Ruby Cloud API | GroupDocs.Viewer Cloud | REST API | HTML Rendering | PDF Conversion | Image Rendering | Document Viewing | Multi-Page Rendering | Document Streaming | CAD Rendering | E-Mail Message Rendering | Visio Rendering | MS Project Rendering | Outlook Data Rendering | Spreadsheet Rendering | Word Processing Rendering | Custom View Options | Responsive HTML | Attachment Rendering | Secure API Access | Cloud Storage Integration