Cloud REST API để kết hợp các tính năng chỉnh sửa tài liệu trong các ứng dụng Ruby. Không cần ứng dụng bên ngoài để chỉnh sửa tài liệu ở mọi định dạng phổ biến.
Bắt đầu dùng thử miễn phíGroupDocs.Editor Cloud SDK cho Ruby dễ dàng tích hợp với GroupDocs.Cloud REST API, do đó cho phép chỉnh sửa nhanh nhiều định dạng tài liệu trong các ứng dụng Ruby mà không cần cài đặt MS Office hoặc các ứng dụng khác. Sử dụng thư viện trình chỉnh sửa tài liệu – dễ dàng thực hiện tất cả các thao tác chỉnh sửa tài liệu được yêu cầu nhiều nhất trong khi thao tác các bản trình bày, bảng tính Excel, HTML, XML và tài liệu xử lý Word. Chỉ cần tải tệp tài liệu cần chỉnh sửa qua GroupDocs.Editor Cloud API lên bất kỳ trình chỉnh sửa WYSIWYG nào, thao tác và dễ dàng chuyển đổi trở lại loại tài liệu gốc.
GroupDocs.Editor Cloud SDK cho Ruby được xây dựng dưới dạng một lớp trên GroupDocs.Editor Cloud REST API giúp tiết kiệm thời gian phát triển đáng kể bằng cách quản lý các yêu cầu cấp thấp và xử lý phản hồi. Các nhà phát triển có thể tập trung vào việc viết mã cụ thể chỉ khi cần thiết trong dự án.
Hãy xem GroupDocs.Editor Cloud SDK cho Ruby tại GitHub nếu bạn đang tìm kiếm mã nguồn để chú thích tệp trong Đám mây.
Bạn có thể dùng thử GroupDocs.Editor Low-Code Ruby API mà không có bất kỳ hạn chế nào.
GroupDocs.Editor Cloud cũng có sẵn dưới dạng hình ảnh Docker có thể được sử dụng để tự lưu trữ dịch vụ. Hoặc bạn có thể xây dựng dịch vụ của riêng mình bằng cách sử dụng GroupDocs.Editor High-code APIs hiện đang điều khiển REST API của chúng tôi.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
fileApi = GroupDocsEditorCloud::FileApi.from_keys($app_sid, $app_key)
editApi = GroupDocsEditorCloud::EditApi.from_keys($app_sid, $app_key)
# The document already uploaded into the storage.
# Load it into editable state
fileInfo = GroupDocsEditorCloud::FileInfo.new
fileInfo.file_path = 'Presentation/with-notes.pptx'
loadOptions = GroupDocsEditorCloud::PresentationLoadOptions.new
loadOptions.file_info = fileInfo
loadOptions.output_path = "output"
loadOptions.slide_number = 0
loadRequest = GroupDocsEditorCloud::LoadRequest.new(loadOptions)
loadResult = editApi.load(loadRequest)
# Download html document
htmlFile = fileApi.download_file(GroupDocsEditorCloud::DownloadFileRequest.new loadResult.html_path)
htmlFile.open
html = htmlFile.read
htmlFile.close
# Edit something...
html = html.gsub("Slide sub-heading", "Hello world!")
# Upload html back to storage
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)
# Save html back to pptx
saveOptions = GroupDocsEditorCloud::PresentationSaveOptions.new
saveOptions.file_info = fileInfo
saveOptions.output_path = "output/edited.pptx"
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)