|
1 | | -   [](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-dotnet/blob/master/LICENSE) |
| 1 | +# GroupDocs.Conversion Cloud SDK for .NET |
2 | 2 |
|
3 | | -# .NET SDK to Convert Documents in the Cloud |
| 3 | +This repository contains GroupDocs.Conversion Cloud SDK for .NET source code. This SDK allows you to work with GroupDocs.Conversion Cloud REST APIs in your .NET applications. |
4 | 4 |
|
5 | | -[GroupDocs.Conversion Cloud SDK for .NET](https://products.groupdocs.cloud/conversion/net) wraps GroupDocs.Conversion RESTful APIs so you may integrate Document Conversion features in your own apps with zero initial cost. |
| 5 | +## How to use the SDK |
6 | 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. |
| 7 | +The complete source code is available in this repository folder, you can either directly use it in your project via NuGet package manager. For more details, please visit our [documentation website](https://docs.groupdocs.cloud/display/conversioncloud/Available+SDKs#AvailableSDKs-.NET). |
8 | 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 .NET |
50 | | - |
51 | | -First create an account at [GroupDocs for Cloud](https://dashboard.groupdocs.cloud/) and get your application information. Next, execute `Install-Package GroupDocs.Conversion-Cloud` from Package Manager Console in Visual Studio to fetch & reference the SDK in your project. If you already have the package and wish to upgrade it, please execute `Update-Package GroupDocs.Conversion-Cloud` to get the latest version. |
52 | | - |
53 | | -### Dependencies |
| 9 | +## Dependencies |
54 | 10 |
|
55 | 11 | - [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json) |
56 | 12 |
|
57 | | -## Convert DOCX to PDF in the Cloud |
| 13 | +## Getting Started |
58 | 14 |
|
59 | 15 | ```csharp |
60 | | -// Get Client Id and Client Secret from https://dashboard.groupdocs.cloud |
61 | | -string MyClientId = ""; |
62 | | -string MyClientSecret = ""; |
| 16 | +using System; |
| 17 | +using System.Diagnostics; |
| 18 | +using GroupDocs.Conversion.Cloud.Sdk.Api; |
63 | 19 |
|
64 | | -// Create instance of the API |
65 | | -var configuration = new Configuration(MyClientId, MyClientSecret); |
66 | | -var apiInstance = new ConvertApi(configuration); |
67 | | - |
68 | | -// Prepare convert settings |
69 | | -var settings = new ConvertSettings |
| 20 | +namespace Example |
70 | 21 | { |
71 | | - FilePath = "WordProcessing/four-pages.docx", |
72 | | - Format = "pdf", |
73 | | - OutputPath = "converted" |
74 | | -}; |
75 | | - |
76 | | -// Convert to specified format |
77 | | -var response = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings)); |
| 22 | + public class Example |
| 23 | + { |
| 24 | + public void Main() |
| 25 | + { |
| 26 | + //TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required). |
| 27 | + var appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"; |
| 28 | + var appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; |
| 29 | + |
| 30 | + var api = new InfoApi(appSid, appKey); |
| 31 | + |
| 32 | + try |
| 33 | + { |
| 34 | + // Get supported file formats |
| 35 | + var formats = api.GetSupportedConversionTypes(new GetSupportedConversionTypesRequest()); |
| 36 | + |
| 37 | + foreach (var format in formats) |
| 38 | + { |
| 39 | + Debug.Print(format.SourceFormat); |
| 40 | + } |
| 41 | + } |
| 42 | + catch (Exception e) |
| 43 | + { |
| 44 | + Debug.Print("Something went wrong: " + e.Message); |
| 45 | + } |
| 46 | + } |
| 47 | + } |
| 48 | +} |
78 | 49 | ``` |
79 | 50 |
|
80 | | -## GroupDocs.Conversion Cloud SDKs in Popular Languages |
| 51 | +## Licensing |
| 52 | + |
| 53 | +All GroupDocs.Conversion Cloud SDKs are licensed under [MIT License](LICENSE). |
| 54 | + |
| 55 | +## Resources |
| 56 | + |
| 57 | ++[**Website**](https://www.groupdocs.cloud) |
| 58 | ++[**Product Home**](https://products.groupdocs.cloud/conversion) |
| 59 | ++[**Documentation**](https://docs.groupdocs.cloud/conversion) |
| 60 | ++[**Free Support Forum**](https://forum.groupdocs.cloud/c/conversion) |
| 61 | ++[**Blog**](https://blog.groupdocs.cloud/category/conversion) |
81 | 62 |
|
82 | | -| .NET | Java | PHP | Python | Ruby | Node.js | Android | |
83 | | -|---|---|---|---|---|---|---| |
84 | | -| [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) | |
85 | | -| [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) | | |
| 63 | +## Contact Us |
86 | 64 |
|
87 | | -[Home](https://www.groupdocs.cloud/) | [Product Page](https://products.groupdocs.cloud/conversion/net) | [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-dotnet-samples) | [Blog](https://blog.groupdocs.cloud/category/conversion/) | [Free Support](https://forum.groupdocs.cloud/c/conversion) | [Free Trial](https://dashboard.groupdocs.cloud) |
| 65 | +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