|
1 | | -# GroupDocs.Conversion Cloud Ruby SDK |
2 | | -Ruby gem for communicating with the GroupDocs.Conversion Cloud API |
| 1 | +   [](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-ruby/blob/master/LICENSE) |
3 | 2 |
|
4 | | -## Installation |
| 3 | +# Ruby SDK to Convert Documents in the Cloud |
5 | 4 |
|
6 | | -A gem of groupdocs_conversion_cloud is available at [rubygems.org](https://rubygems.org). You can install it with: |
| 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. |
7 | 52 |
|
8 | 53 | ```shell |
9 | 54 | gem install groupdocs_conversion_cloud |
10 | 55 | ``` |
11 | 56 |
|
12 | | -To add dependency to your app copy following into your Gemfile and run `bundle install`: |
| 57 | +Copy the following into your Gemfile and run `bundle install` to add dependency to your app. |
13 | 58 |
|
14 | 59 | ``` |
15 | 60 | gem "groupdocs_conversion_cloud", "~> 20.11" |
16 | 61 | ``` |
17 | 62 |
|
18 | | -## Getting Started |
| 63 | +## Convert DOCX to PDF in the Cloud |
19 | 64 |
|
20 | | -Please follow the [installation](#installation) procedure and then run the following code: |
21 | 65 | ```ruby |
22 | | -# Load the gem |
| 66 | +# Get your application information from https://dashboard.groupdocs.cloud |
23 | 67 | require 'groupdocs_conversion_cloud' |
24 | 68 |
|
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" |
| 69 | +$app_sid = "XXXX-XXXX-XXXX-XXXX" |
| 70 | +$app_key = "XXXXXXXXXXXXXXXX" |
28 | 71 |
|
29 | | -# Create instance of the API class |
30 | | -api = GroupDocsConversionCloud::InfoApi.from_keys(app_sid, app_key) |
| 72 | +# Create necessary API instances |
| 73 | +apiInstance = GroupDocsConversionCloud::ConvertApi.from_keys($app_sid, $app_key) |
31 | 74 |
|
32 | | -# Retrieve supported converison types |
33 | | -request = GroupDocsConversionCloud::GetSupportedConversionTypesRequest.new |
34 | | -response = api.get_supported_conversion_types(request) |
| 75 | +# Prepare convert settings |
| 76 | +settings = GroupDocsConversionCloud::ConvertSettings.new |
| 77 | +settings.file_path = "WordProcessing/four-pages.docx" |
| 78 | +settings.format = "pdf" |
| 79 | +settings.output_path = "converted" |
35 | 80 |
|
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(', ')}]") |
| 81 | +# Convert |
| 82 | +result = apiInstance.convert_document(GroupDocsConversionCloud::ConvertDocumentRequest.new(settings)) |
40 | 83 | ``` |
41 | 84 |
|
42 | | -## Licensing |
43 | | -GroupDocs.Conversion Cloud Ruby SDK licensed under [MIT License](LICENSE). |
| 85 | +## GroupDocs.Conversion Cloud SDKs in Popular Languages |
44 | 86 |
|
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) |
| 87 | +| .NET | Java | PHP | Python | Ruby | Node.js | Android | |
| 88 | +|---|---|---|---|---|---|---| |
| 89 | +| [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) | |
| 90 | +| [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) | | |
51 | 91 |
|
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). |
| 92 | +[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) |
0 commit comments