|
1 | | -   [](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-ruby/blob/master/LICENSE) |
| 1 | +# GroupDocs.Conversion Cloud Ruby SDK |
| 2 | +Ruby gem for communicating with the GroupDocs.Conversion Cloud API |
2 | 3 |
|
3 | | -# Ruby SDK to Convert Documents in the Cloud |
| 4 | +## Installation |
4 | 5 |
|
5 | | -[GroupDocs.Conversion Cloud SDK for Ruby](https://products.groupdocs.cloud/conversion/ruby) wraps GroupDocs.Conversion RESTful APIs so you may integrate **Document Conversion** features in your own apps with zero initial cost. |
6 | | - |
7 | | -GroupDocs.Conversion Cloud API allows the developers to convert between 50+ file formats including Word documents, Excel spreadsheets, PowerPoint presentations, PDF, OpenDocument files, images & more. |
8 | | - |
9 | | -## Document Conversion REST API |
10 | | - |
11 | | -- Convert the whole document to the desired target format. |
12 | | -- Convert specific document page(s) or a page range. |
13 | | -- Auto-detect source document format without requiring the file extension. |
14 | | -- Load source document with extended options, such as specify password for password-protected documents. |
15 | | -- Load specific part of the document. |
16 | | -- Show or hide document comments. |
17 | | -- Obtain all supported conversion formats list. |
18 | | -- Replace missing fonts with any other font. |
19 | | -- Add text or image watermarks to any page. |
20 | | -- Specify resolution and quality for resultant images. |
21 | | -- Extract metadata & basic information about the source document. |
22 | | -- Integrated storage API. |
23 | | - |
24 | | -Check out the [Developer's Guide](https://docs.groupdocs.cloud/conversion/developer-guide/) to know more about GroupDocs.Conversion REST API. |
25 | | - |
26 | | -## Microsoft File Formats |
27 | | - |
28 | | -**Microsoft Word:** DOC, DOCM, DOCX, DOT, DOTM, DOTX\ |
29 | | -**Microsoft Excel:** XLS, XLSX, XLSB, XLSM\ |
30 | | -**Microsoft PowerPoint:** PPT, PPTX, PPS, PPSX\ |
31 | | -**Microsoft Project:** MPP, MPT\ |
32 | | -**Microsoft Outlook:** MSG, EML\ |
33 | | -**Microsoft Visio:** VSD, VDX, VSS, VSX, VST, VTX, VSDX, VDW, VSSX, VSTX, VSDM, VSTM, VSSM\ |
34 | | -**Microsoft OneNote:** ONE |
35 | | - |
36 | | -## Other Formats |
37 | | - |
38 | | -**Page Layout Formats:** PDF, XPS\ |
39 | | -**OpenDocument:** ODT, OTT, ODS, ODP, OTP, OTS, ODG\ |
40 | | -**CAD:** DXF, DWG, IFC, STL\ |
41 | | -**Images:** DCM, BMP, GIF, JPG, PNG, TIFF, WebP, DjVu, SVG, DNG, ICO\ |
42 | | -**Web:** HTML, MHT, MHTML\ |
43 | | -**Emails:** EML, EMLX\ |
44 | | -**eBooks:** EPUB, MOBI\ |
45 | | -**Metafile:** WMF, EMF\ |
46 | | -**LaTeX:** TEX\ |
47 | | -**Others:** TXT, RTF, CSV, TSV, XML |
48 | | - |
49 | | -## Get Started with GroupDocs.Conversion Cloud SDK for Ruby |
50 | | - |
51 | | -First create an account at [GroupDocs for Cloud](https://dashboard.groupdocs.cloud/) and get your application information. Next, execute the following command to get the package. |
| 6 | +A gem of groupdocs_conversion_cloud is available at [rubygems.org](https://rubygems.org). You can install it with: |
52 | 7 |
|
53 | 8 | ```shell |
54 | 9 | gem install groupdocs_conversion_cloud |
55 | 10 | ``` |
56 | 11 |
|
57 | | -Copy the following into your Gemfile and run `bundle install` to add dependency to your app. |
| 12 | +To add dependency to your app copy following into your Gemfile and run `bundle install`: |
58 | 13 |
|
59 | 14 | ``` |
60 | | -gem "groupdocs_conversion_cloud", "~> 20.11" |
| 15 | +gem "groupdocs_conversion_cloud", "~> 21.4" |
61 | 16 | ``` |
62 | 17 |
|
63 | | -## Convert DOCX to PDF in the Cloud |
| 18 | +## Getting Started |
64 | 19 |
|
| 20 | +Please follow the [installation](#installation) procedure and then run the following code: |
65 | 21 | ```ruby |
66 | | -# Get your application information from https://dashboard.groupdocs.cloud |
| 22 | +# Load the gem |
67 | 23 | require 'groupdocs_conversion_cloud' |
68 | 24 |
|
69 | | -# Get Client Id and Client Secret from https://dashboard.groupdocs.cloud |
70 | | -$my_client_id = "" |
71 | | -$my_client_secret = "" |
| 25 | +# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). |
| 26 | +app_sid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" |
| 27 | +app_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
72 | 28 |
|
73 | | -# Create instance of the API |
74 | | -$configuration = GroupDocsConversionCloud::Configuration.new($my_client_id, $my_client_secret) |
75 | | -apiInstance = GroupDocsConversionCloud::ConvertApi.from_config($configuration) |
| 29 | +# Create instance of the API class |
| 30 | +api = GroupDocsConversionCloud::InfoApi.from_keys(app_sid, app_key) |
76 | 31 |
|
77 | | -# Prepare convert settings |
78 | | -settings = GroupDocsConversionCloud::ConvertSettings.new |
79 | | -settings.file_path = "WordProcessing/four-pages.docx" |
80 | | -settings.format = "pdf" |
81 | | -settings.output_path = "converted" |
| 32 | +# Retrieve supported converison types |
| 33 | +request = GroupDocsConversionCloud::GetSupportedConversionTypesRequest.new |
| 34 | +response = api.get_supported_conversion_types(request) |
82 | 35 |
|
83 | | -# Convert |
84 | | -result = apiInstance.convert_document(GroupDocsConversionCloud::ConvertDocumentRequest.new(settings)) |
| 36 | +# Print out supported conversion types |
| 37 | +puts("Supported file-formats:") |
| 38 | +response.each do |format| |
| 39 | +puts("#{format.source_format} to [#{format.target_formats.join(', ')}]") |
85 | 40 | ``` |
86 | 41 |
|
87 | | -## GroupDocs.Conversion Cloud SDKs in Popular Languages |
| 42 | +## Licensing |
| 43 | +GroupDocs.Conversion Cloud Ruby SDK licensed under [MIT License](LICENSE). |
88 | 44 |
|
89 | | -| .NET | Java | PHP | Python | Ruby | Node.js | Android | |
90 | | -|---|---|---|---|---|---|---| |
91 | | -| [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-dotnet) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-java) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-php) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-python) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-ruby) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-node) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-android) | |
92 | | -| [NuGet](https://www.nuget.org/packages/GroupDocs.Conversion-Cloud/) | [Maven](https://repository.groupdocs.cloud/webapp/#/artifacts/browse/tree/General/repo/com/groupdocs/groupdocs-conversion-cloud) | [Composer](https://packagist.org/packages/groupdocscloud/groupdocs-conversion-cloud) | [PIP](https://pypi.org/project/groupdocs-conversion-cloud/) | [GEM](https://rubygems.org/gems/groupdocs_conversion_cloud) | [NPM](https://www.npmjs.com/package/groupdocs-conversion-cloud) | | |
| 45 | +## Resources |
| 46 | ++ [**Website**](https://www.groupdocs.cloud) |
| 47 | ++ [**Product Home**](https://products.groupdocs.cloud/conversion) |
| 48 | ++ [**Documentation**](https://docs.groupdocs.cloud/display/conversioncloud/Home) |
| 49 | ++ [**Free Support Forum**](https://forum.groupdocs.cloud/c/conversion) |
| 50 | ++ [**Blog**](https://blog.groupdocs.cloud/category/conversion) |
93 | 51 |
|
94 | | -[Home](https://www.groupdocs.cloud/) | [Product Page](https://products.groupdocs.cloud/conversion/ruby) | [Documentation](https://docs.groupdocs.cloud/conversion/) | [Live Demo](https://products.groupdocs.app/conversion/total) | [API Reference](https://apireference.groupdocs.cloud/conversion/) | [Code Samples](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-ruby-samples) | [Blog](https://blog.groupdocs.cloud/category/conversion/) | [Free Support](https://forum.groupdocs.cloud/c/conversion) | [Free Trial](https://dashboard.groupdocs.cloud) |
| 52 | +## Contact Us |
| 53 | +Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://forum.groupdocs.cloud/c/conversion). |
0 commit comments