Cloud REST API to incorporate document editing features within Ruby applications. No external application needed to edit documents of all popular formats.
Start Free TrialGroupDocs.Editor Cloud SDK for Ruby is easy to integrate with GroupDocs.Cloud REST API, thus allowing to quickly edit a wide range of document formats within Ruby applications without needing to install MS Office or other applications. Using the document editor library – easily perform all most demanded document editing operations while manipulating presentations, Excel spreadsheets, HTML, XML and Word processing documents. Just upload the document file to be edited via GroupDocs.Editor Cloud API into any front-end WYSIWYG editor, manipulate it and easily convert back to its original document type.
GroupDocs.Editor Cloud SDK for Ruby is built as a layer on top of GroupDocs.Editor Cloud REST API that saves valuable development time by managing low-level requests and handling responses. The developers can focus on writing up the specific code only as needed in the project.
Check out GroupDocs.Editor Cloud SDK for Ruby at GitHub if you are looking for the source code to annotate file in the Cloud.
You can try GroupDocs.Editor Low-Code Ruby APIs without any limitations.
GroupDocs.Editor Cloud is also available as Docker image which can be used to self-host the service. Or you may build your own services using GroupDocs.Editor High-code APIs which currently drive our REST APIs.
//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)