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.

Instalasi
Paket tersedia di rubygems.org dan dapat diinstal melalui gem dengan menjalankan perintah berikut:
gem install groupdocs_annotation_cloud

Persyaratan
Dependensi
SDK memerlukan gem berikut:
| Package | Constraint |
|---|
| addressable | ~> 2.8.4, >= 2.8.4 |
| faraday | ~> 0.14.0 |
Mulai cepat
Dapatkan kredensial API Anda
Untuk menggunakan GroupDocs.Annotation Cloud, daftar di GroupDocs.Cloud Dashboard dan dapatkan Client ID dan Client Secret Anda.
Inisialisasi API
Gunakan kode berikut untuk mulai menggunakan GroupDocs.Annotation Cloud SDK for Ruby.
require 'groupdocs_annotation_cloud'
# Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsAnnotationCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
api = GroupDocsAnnotationCloud::AnnotateApi.from_config(config)
Lihat contoh lengkap di RunExamples.rb.
Tambahkan anotasi bidang teks
Setelah diinisialisasi, gunakan contoh dasar ini untuk menambahkan anotasi bidang teks ke dokumen Word.
require 'groupdocs_annotation_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsAnnotationCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
$api = GroupDocsAnnotationCloud::AnnotateApi.from_config(config)
$a1 = GroupDocsAnnotationCloud::AnnotationInfo.new
$a1.annotation_position = GroupDocsAnnotationCloud::Point.new
$a1.annotation_position.x = 1
$a1.annotation_position.y = 1
$a1.box = GroupDocsAnnotationCloud::Rectangle.new
$a1.box.x = 100
$a1.box.y = 100
$a1.box.width = 200
$a1.box.height = 100
$a1.page_number = 0
$a1.font_color = 1201033
$a1.font_size = 12
$a1.opacity = 0.7
$a1.type = "TextField"
$a1.text = "Text field text"
$a1.creator_name = "Anonym A."
file_info = GroupDocsAnnotationCloud::FileInfo.new()
file_info.file_path = "annotationdocs\\one-page.docx"
options = GroupDocsAnnotationCloud::AnnotateOptions.new()
options.file_info = file_info
options.annotations = [$a1]
options.output_path = "Output/output.docx"
$request = GroupDocsAnnotationCloud::AnnotateRequest.new(options)
result = $api.annotate($request)
puts("AddTextFieldAnnotation: Text Field Annotation added: " + result.href)
Lihat contoh lengkap di AddTextFieldAnnotation.rb.
Tambahkan anotasi area
Contoh ini menambahkan anotasi area ke dokumen Word.
require 'groupdocs_annotation_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsAnnotationCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
$api = GroupDocsAnnotationCloud::AnnotateApi.from_config(config)
$a1 = GroupDocsAnnotationCloud::AnnotationInfo.new
$a1.annotation_position = GroupDocsAnnotationCloud::Point.new
$a1.annotation_position.x = 1
$a1.annotation_position.y = 1
$a1.box = GroupDocsAnnotationCloud::Rectangle.new
$a1.box.x = 100
$a1.box.y = 100
$a1.box.width = 200
$a1.box.height = 100
$a1.page_number = 0
$a1.pen_color = 1201033
$a1.pen_style = "Solid"
$a1.pen_width = 1
$a1.opacity = 0.7
$a1.type = "Area"
$a1.text = "This is area annotation"
$a1.creator_name = "Anonym A."
file_info = GroupDocsAnnotationCloud::FileInfo.new()
file_info.file_path = "annotationdocs\\one-page.docx"
options = GroupDocsAnnotationCloud::AnnotateOptions.new()
options.file_info = file_info
options.annotations = [$a1]
options.output_path = "Output/output.docx"
$request = GroupDocsAnnotationCloud::AnnotateRequest.new(options)
result = $api.annotate($request)
puts("AddAreaAnnotation: Area Annotation added: " + result.href)
Lihat contoh lengkap di AddAreaAnnotation.rb.
Ekstrak anotasi
Contoh ini mengembalikan anotasi yang tersimpan dalam dokumen.
require 'groupdocs_annotation_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsAnnotationCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
$api = GroupDocsAnnotationCloud::AnnotateApi.from_config(config)
file_info = GroupDocsAnnotationCloud::FileInfo.new()
file_info.file_path = "annotationdocs\\input.docx"
$request = GroupDocsAnnotationCloud::ExtractRequest.new(file_info)
$response = $api.extract($request)
puts("ExtractAnnotations: annotations count = " + $response.length.to_s)
Lihat contoh lengkap di ExtractAnnotations.rb.
Hapus anotasi
Contoh ini menghapus anotasi 1, 2, dan 3 dari dokumen.
require 'groupdocs_annotation_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsAnnotationCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
$api = GroupDocsAnnotationCloud::AnnotateApi.from_config(config)
file_info = GroupDocsAnnotationCloud::FileInfo.new()
file_info.file_path = "annotationdocs\\input.docx"
options = GroupDocsAnnotationCloud::RemoveOptions.new()
options.file_info = file_info
options.annotation_ids = [1, 2, 3]
options.output_path = "Output/output.docx"
$request = GroupDocsAnnotationCloud::RemoveAnnotationsRequest.new(options)
$response = $api.remove_annotations($request)
puts("RemoveAnnotations: Annotations deleted from document: " + $response.href)
Lihat contoh lengkap di RemoveAnnotations.rb.
Ambil format dokumen yang dapat dianotasi oleh API.
require 'groupdocs_annotation_cloud'
client_id = "YourClientId"
client_secret = "YourClientSecret"
config = GroupDocsAnnotationCloud::Configuration.new(client_id, client_secret)
config.api_base_url = "https://api.groupdocs.cloud"
$api = GroupDocsAnnotationCloud::InfoApi.from_config(config)
$response = $api.get_supported_file_formats()
puts("GetSupportedFormats: formats count = " + $response.formats.length.to_s)
Lihat contoh lengkap di GetSupportedFormats.rb.
Contoh di GitHub
Repositori GroupDocs.Annotation Cloud Ruby Examples berisi contoh siap dijalankan yang mencakup:
| Category | Examples |
|---|
| Add Annotation | Bidang teks, sorotan, garis bawah, coretan, garis bergelombang, penggantian, redaksi, area, panah, jarak, elips, gambar, tautan, titik, polyline, tanda air |
| Extract and Remove | Ekstrak anotasi, hapus anotasi berdasarkan id |
| Preview | Ambil halaman, hapus halaman |
| Basic Usage | Informasi dokumen, format yang didukung, operasi file, folder, dan penyimpanan |
Cara menjalankan contoh
- Klon atau unduh repositori contoh
- Edit
Examples/RunExamples.rb dan atur client_id serta client_secret - Buka direktori
Examples - Jalankan
gem install groupdocs_annotation_cloud - Jalankan
ruby RunExamples.rb
Untuk detail selengkapnya, kunjungi Getting Started.

Document Annotation API | Ruby Cloud API | GroupDocs.Annotation Cloud | REST API | Text Annotation | Area Annotation | Highlight Annotation | Remove Annotations | Extract Annotations | Document Information | Cloud Storage Integration | Secure API Access