浏览我们的产品

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.


Product Docs Swagger Examples Blog Support Dashboard

安装

此包在 nuget.org 上提供,可通过包管理器控制台执行以下命令安装:

NuGet\Install-Package GroupDocs.Assembly-Cloud

Version NuGet NuGet-GroupDocsCloud


要求

  • .NET Framework 2.0 或 .NET Standard 2.0
  • NuGet
  • 面向 .NET Framework 2.0 时需要 System.Web
  • GroupDocs Cloud 凭据 — 仪表板中的 Client ID and Client Secret

快速入门

获取 API 凭据

要使用 GroupDocs.Assembly Cloud,请在 GroupDocs.Cloud 仪表板 注册并获取 Client ID 和 Client Secret。

初始化 API

使用以下代码开始使用 GroupDocs.Assembly Cloud SDK for .NET。

using GroupDocs.Assembly.Cloud.Sdk;
using GroupDocs.Assembly.Cloud.Sdk.Model;
using GroupDocs.Assembly.Cloud.Sdk.Model.Requests;

var configuration = new Configuration
{
    ApiBaseUrl = "https://api.groupdocs.cloud",
    AppSid = "YourClientId",
    AppKey = "YourClientSecret"
};

var assemblyApi = new AssemblyApi(configuration);

更多细节见 BaseTestContext.cs。

将模板组装为 PDF

此示例用 JSON 报表数据填充模板并返回 PDF。

using System.IO;
using GroupDocs.Assembly.Cloud.Sdk;
using GroupDocs.Assembly.Cloud.Sdk.Model;
using GroupDocs.Assembly.Cloud.Sdk.Model.Requests;

var configuration = new Configuration
{
    ApiBaseUrl = "https://api.groupdocs.cloud",
    AppSid = "YourClientId",
    AppKey = "YourClientSecret"
};
var assemblyApi = new AssemblyApi(configuration);

var data = File.ReadAllText("TableData.json");
var saveOptions = new AssembleOptions
{
    SaveFormat = "pdf",
    ReportData = data,
    TemplateFileInfo = new TemplateFileInfo { FilePath = "GroupDocs.Assembly/TableFeatures.odt" }
};

var result = assemblyApi.AssembleDocument(new AssembleDocumentRequest(saveOptions));
Console.WriteLine("Assembled document: " + result.Length);

更多细节见 AssemblyApiTests.cs。

GitHub 上的示例

GroupDocs.Assembly Cloud .NET SDK 仓库包含 SDK 及其测试。没有单独的示例仓库。

如何运行示例

  1. 克隆或下载 SDK 仓库
  2. 编辑 Settings/servercreds.json,设置 AppSid、AppKey 和 BaseUrl
  3. 在 Visual Studio 中打开解决方案
  4. 运行 GroupDocs.Assembly.Cloud.Sdk.Test 中的测试

更多细节请参阅 Getting Started。


Product Docs Swagger Examples Blog Support Dashboard


标签

Document Automation | .NET Cloud API | REST API | Document Generation | Template-Driven | Dynamic Data Merging | Rich Formatting | Conditional Content Control | List Automation | Table Automation | Barcode Generation | Hyperlink Insertion | Bookmark Creation | Checkbox Manipulation | Mail Merge | Formula Calculations | Data Filtering | Data Sorting | Data Grouping | Data Formatting | Dynamic List Generation | Dynamic Table Generation | Chart Generation | Chart Customization | Cross-Platform SDKs | Comprehensive Documentation | Cloud-Based Flexibility | JWT Authentication | Microsoft Word | Microsoft Excel | Microsoft PowerPoint | OpenOffice | Email Formats | Web Document Formats | Barcode Types | QR Codes | DataMatrix | EAN Barcodes | UPCA | ISBN Barcodes | REST API


 简体中文