Combine & Split Documents with Ruby SDK

REST APIs & Ruby Cloud SDK to merge, split, shuffle or remove pages from popular document file formats.

Start Free Trial
GroupDocs.Merger Cloud SDK for Ruby

GroupDocs.Merger Cloud SDK for Ruby

 

Build high performance business applications in Ruby to combine, split, shuffle, rotate or delete single page or whole document of the same format in your Ruby applications. The supported file types include PDF, MS Word, Excel spreadsheets, presentations, drawings, HTML and many others industry standard formats.

Developers can easily perform document pages related operations like swapping, removing, extracting pages from source document to combine as a new resultant document and setting the page orientation to portrait or landscape mode. The API also offers optimized document security features to apply, update or remove passwords from the supported document formats.

Previous Next

Document Merger REST API Features

 

 

Combine multiple pages, slides or spreadsheets into a single document

 

Swap position of any two pages, slides or sheets within a document

 

Rotate pages by setting rotation angles like 90, 180 or 270 degrees

 

Split any document into smaller files

 

Remove any single or collection of specific pages

 

Change page orientation

 

Rearrange pages, slides or diagrams

 

Set, reset & remove password

 

Fetch list of supported file formats

Split to multiple page document - Ruby


//Get your App SID and App Key at https://dashboard.groupdocs.cloud (free registration is required).

class SplitToMultiPageDocuments
    
    def self.Run()    
        documentApi = GroupDocsMergerCloud::DocumentApi.from_keys($app_sid, $app_key)

        options = GroupDocsMergerCloud::SplitOptions.new
        options.file_info = GroupDocsMergerCloud::FileInfo.new
        options.file_info.file_path = 'WordProcessing/sample-10-pages.docx'
        options.output_path = "Output/split-to-multipage-document"
        options.pages = [3, 6, 8]
        options.mode = "Intervals"

        result = documentApi.split(GroupDocsMergerCloud::SplitRequest.new(options))
        
        puts("Documents count: " + result.documents.size.to_s)
    end
end

Support and Learning Resources