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.

安装
该软件包在 npmjs.com 可用,可通过执行以下命令使用 npm 安装:
npm install groupdocs-assembly-cloud

要求
依赖项
SDK 需要以下包:
| Package | Constraint |
|---|
| @types/request | ^2.48.4 |
| blob | ^0.1.0 |
| request | ^2.88.2 |
| request-debug | ^0.2.0 |
| uuid | ^7.0.3 |
快速入门
获取 API 凭证
要使用 GroupDocs.Assembly Cloud,请在 GroupDocs.Cloud Dashboard 注册并获取 Client ID 和 Client Secret。
初始化 API
使用以下代码开始使用 GroupDocs.Assembly Cloud SDK for Node.js。第一个参数是 Client ID,第二个参数是 Client Secret。
"use strict";
const { AssemblyApi } = require("groupdocs-assembly-cloud");
const assemblyApi = new AssemblyApi("YourClientId", "YourClientSecret", "https://api.groupdocs.cloud");
详情请参阅 baseTest.ts。
组装文档
初始化后,使用此基本示例根据 DOCX 模板和 JSON 数据生成 PDF 报告。
"use strict";
const { AssemblyApi, AssembleOptions, TemplateFileInfo, AssembleDocumentRequest } = require("groupdocs-assembly-cloud");
const { readFileSync } = require("fs");
const assemblyApi = new AssemblyApi("YourClientId", "YourClientSecret", "https://api.groupdocs.cloud");
const assembleOptionsData = new AssembleOptions({
saveFormat: "pdf",
reportData: readFileSync("./TestData/Teams.json", "utf8"),
templateFileInfo: new TemplateFileInfo({
filePath: "Temp/SdkTests/node/TestData/GroupDocs.Assembly/TestAllChartTypes.docx",
}),
});
const request = new AssembleDocumentRequest({
assembleOptions: assembleOptionsData,
});
assemblyApi.assembleDocument(request).then((result) => {
console.log("Document assembled: " + result.body.byteLength);
});
详情请参阅 apiTest.ts。
上传模板
此示例在组装之前将模板上传到云存储。
"use strict";
const { AssemblyApi, UploadFileRequest } = require("groupdocs-assembly-cloud");
const { createReadStream } = require("fs");
const assemblyApi = new AssemblyApi("YourClientId", "YourClientSecret", "https://api.groupdocs.cloud");
const request = new UploadFileRequest({
fileContent: createReadStream("./TestData/TestAllChartTypes.docx"),
path: "Temp/SdkTests/node/TestData/GroupDocs.Assembly/TestAllChartTypes.docx",
});
assemblyApi.uploadFile(request);
详情请参阅 apiTest.ts。
获取支持的组装格式
获取 API 可以组装的文件格式。
"use strict";
const { AssemblyApi, GetSupportedFileFormatsRequest } = require("groupdocs-assembly-cloud");
const assemblyApi = new AssemblyApi("YourClientId", "YourClientSecret", "https://api.groupdocs.cloud");
const request = new GetSupportedFileFormatsRequest();
assemblyApi.getSupportedFileFormats(request);
详情请参阅 api.ts。
列出存储中的文件
此示例列出云存储文件夹中的文件。
"use strict";
const { AssemblyApi, GetFilesListRequest } = require("groupdocs-assembly-cloud");
const assemblyApi = new AssemblyApi("YourClientId", "YourClientSecret", "https://api.groupdocs.cloud");
const request = new GetFilesListRequest({ path: "/Folder1" });
assemblyApi.getFilesList(request);
详情请参阅 model.ts。
GitHub 上的示例
GroupDocs.Assembly Cloud Node.js SDK 仓库包含 SDK 和测试,涵盖:
| Category | Examples |
|---|
| Assembly | 根据模板和 JSON 数据组装文档 |
| Storage | 上传、下载、复制、移动和删除文件与文件夹 |
| Info | 支持的文件格式 |
如何运行示例
- 克隆或下载 SDK 仓库
- 在项目根目录创建
testConfig.json 并设置 AppSid、AppKey 和 BaseUrl - 运行
npm install - 测试位于
test/apiTest.ts - 执行
npm test
更多详情请访问 Getting Started。

Document Automation | Node.js Cloud API | GroupDocs.Assembly Cloud | 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 | Chart Generation | Data Filtering | Data Sorting | Data Grouping | JWT Authentication | Microsoft Word | Microsoft Excel | Microsoft PowerPoint | Report Generation | Cloud-Based Flexibility | Secure API Access | Cross-platform API