If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

安装
该包在 nuget.org 上可用,可以通过在程序包管理器控制台中执行以下命令来安装:
PM> NuGet\Install-Package GroupDocs.Conversion-Cloud

快速入门
获取 API 凭据
要使用 GroupDocs.Conversion Cloud,请在 GroupDocs.Cloud Dashboard 注册并获取您的 Client ID 和 Client Secret。
初始化 API
使用以下代码开始 GroupDocs.Conversion Cloud SDK for .NET:
// Initialize the API instance
var configuration = new Configuration
{
ClientId = "YourClientId",
ClientSecret = "YourClientSecret"
};
var conversionApi = new ConversionApi(configuration);
转换文档
初始化后,使用此基本示例转换文档:
// Set up conversion settings
var convertSettings = new ConvertSettings
{
FilePath = "input.docx",
Format = "pdf"
};
// Convert the document
var response = conversionApi.ConvertDocument(convertSettings);
// Save the converted file
File.WriteAllBytes("output.pdf", response.File);
通过本快速入门指南,您已准备在 .NET 应用程序中使用 GroupDocs.Conversion Cloud 开始转换文档。更多详情,请访问文档。
在各种格式之间转换文档 Cloud API
此代码允许开发人员以编程方式在各种格式之间转换文档,消除手动转换。它支持 50 多种文件格式,非常适合需要多格式支持的应用程序开发人员。
// Initialize the API instance
var conversionApi = new ConversionApi(new Configuration { ClientId = "YourClientId", ClientSecret = "YourClientSecret" });
// Set up the conversion settings: source format, target format, etc.
var convertSettings = new ConvertSettings
{
// Specify input file path and desired output format
FilePath = "input.docx",
Format = "pdf" // Convert DOCX to PDF
// Optional: specify page range, font substitution, etc.
};
// Execute the conversion and retrieve the converted file
var response = conversionApi.ConvertDocument(convertSettings);
// Save the converted document to the specified location
File.WriteAllBytes("output.pdf", response.File);
转换文档的特定页面 Cloud API
此示例演示了开发人员如何仅转换特定页面,在只需要文档的一部分时节省处理时间并减小文件大小。
// Initialize the API instance with authentication credentials
var conversionApi = new ConversionApi(new Configuration { ClientId = "YourClientId", ClientSecret = "YourClientSecret" });
// Configure the settings to convert specific pages (e.g., pages 1 to 3)
var convertSettings = new ConvertSettings
{
FilePath = "input.pptx",
Format = "pdf", // Convert PPTX to PDF
// Specify the pages to convert (e.g., first 3 pages)
Pages = new List<int> { 1, 2, 3 }
};
// Execute the conversion
var response = conversionApi.ConvertDocument(convertSettings);
// Save the resulting file
File.WriteAllBytes("output_pages1-3.pdf", response.File);
自动检测文档格式进行转换
此代码片段突出了即使文件扩展名未知也能转换文档的能力,对于处理格式可能未明确定义的用户上传文件非常有用。
// Initialize the Conversion API with credentials
var conversionApi = new ConversionApi(new Configuration { ClientId = "YourClientId", ClientSecret = "YourClientSecret" });
// Configure settings for auto-detecting format without file extension
var convertSettings = new ConvertSettings
{
FilePath = "input_file", // No file extension required
Format = "pdf" // Desired output format (e.g., PDF)
};
// Execute the conversion
var response = conversionApi.ConvertDocument(convertSettings);
// Save the converted file to the output path
File.WriteAllBytes("output.pdf", response.File);

标签
Document Conversion API | .NET Cloud API | GroupDocs.Conversion Cloud | REST API | Document Conversion | Auto-detect Formats | Watermarking API | Multi-Format Output | Batch Document Conversion | PDF Conversion | Custom Conversion Options | Page-by-Page Conversion | Font Replacement | OCR Support | Metadata Extraction | Document Merge | Storage API | Document Information API | Document Load Options | Multi-Language Support | Cloud Storage Integration | SDKs for .NET, Java, Python | Secure API Access | Docker Support | Scalable Document Conversion | API Rate Limiting