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.

Instalasi
Paket tersedia di npmjs.com dan dapat diinstal melalui npm dengan menjalankan perintah berikut:
npm install groupdocs-conversion-cloud

Persyaratan
Dependensi
SDK memerlukan paket berikut:
| Package | Constraint |
|---|
| axios | 1.14.0 |
| form-data | * |
| jsonwebtoken | 9.0.1 |
| qs | 6.15.0 |
Mulai cepat
Dapatkan kredensial API Anda
Untuk menggunakan GroupDocs.Conversion Cloud, daftar di GroupDocs.Cloud Dashboard dan dapatkan Client ID dan Client Secret Anda.
Inisialisasi API
Gunakan kode berikut untuk mulai menggunakan GroupDocs.Conversion Cloud SDK for Node.js.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
// Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new conversion_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const convertApi = conversion_cloud.ConvertApi.fromConfig(config);
Lihat contoh lengkap di RunExamples.js.
Konversi dokumen (langsung, tanpa penyimpanan cloud)
Setelah diinisialisasi, gunakan contoh dasar ini untuk mengonversi dokumen lokal dan menerima hasilnya secara langsung.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const fs = require("fs");
const convertApi = conversion_cloud.ConvertApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let file = fs.readFileSync("./Resources/WordProcessing/four-pages.docx");
let request = new conversion_cloud.ConvertDocumentDirectRequest("pdf", file);
let result = await convertApi.convertDocumentDirect(request);
console.log("Document converted: " + result.length);
})();
Lihat contoh lengkap di ConvertToPdfDirect.js.
Konversi dokumen menggunakan penyimpanan cloud
Contoh ini mengunggah file ke penyimpanan GroupDocs Cloud, mengonversinya, dan mengunduh hasilnya.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const fs = require("fs");
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new conversion_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const convertApi = conversion_cloud.ConvertApi.fromConfig(config);
const fileApi = conversion_cloud.FileApi.fromConfig(config);
(async () => {
let file = fs.readFileSync("./myFile.docx");
await fileApi.uploadFile(new conversion_cloud.UploadFileRequest("myFile.docx", file));
let settings = new conversion_cloud.ConvertSettings();
settings.filePath = "myFile.docx";
settings.format = "pdf";
settings.outputPath = "converted";
let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings));
console.log("Document converted: " + result[0].url);
let response = await fileApi.downloadFile(new conversion_cloud.DownloadFileRequest("converted/myFile.pdf", null));
console.log("Expected response type is Stream: " + response.length);
})();
Lihat SDK README untuk detail selengkapnya.
Kode ini mengonversi dokumen Word yang dilindungi kata sandi ke PDF dengan opsi keluaran.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const convertApi = conversion_cloud.ConvertApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let settings = new conversion_cloud.ConvertSettings();
settings.filePath = "WordProcessing/password-protected.docx";
settings.format = "pdf";
settings.outputPath = "converted";
let loadOptions = new conversion_cloud.WordProcessingLoadOptions();
loadOptions.password = "password";
let convertOptions = new conversion_cloud.PdfConvertOptions();
convertOptions.centerWindow = true;
convertOptions.compressImages = false;
convertOptions.displayDocTitle = true;
convertOptions.dpi = 1024;
convertOptions.fromPage = 1;
convertOptions.imageQuality = 100;
convertOptions.password = "password";
convertOptions.unembedFonts = true;
settings.loadOptions = loadOptions;
settings.convertOptions = convertOptions;
let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings));
console.log("Document converted: " + result[0].url);
})();
Lihat contoh lengkap di ConvertToPdf.js.
Konversi halaman tertentu dari dokumen
Contoh ini hanya mengonversi halaman 1 dan 3.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const convertApi = conversion_cloud.ConvertApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let settings = new conversion_cloud.ConvertSettings();
settings.filePath = "WordProcessing/four-pages.docx";
settings.format = "pdf";
settings.outputPath = "converted/two-pages.pdf";
let convertOptions = new conversion_cloud.PdfConvertOptions();
convertOptions.pages = [1, 3];
settings.convertOptions = convertOptions;
let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings));
console.log("Document converted: " + result[0].url);
})();
Lihat contoh lengkap di ConvertSpecificPages.js.
Ambil konversi yang didukung dari format sumber ke format target.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const infoApi = conversion_cloud.InfoApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let response = await infoApi.getSupportedConversionTypes(new conversion_cloud.GetSupportedConversionTypesRequest());
console.log("Formats count: " + response.length);
})();
Lihat contoh lengkap di GetSupportedConversions.js.
Contoh di GitHub
Repositori GroupDocs.Conversion Cloud Node.js Examples berisi contoh siap dijalankan yang mencakup:
| Category | Examples |
|---|
| Convert | PDF, HTML, gambar, presentasi, lembar bentang, pemrosesan kata, konversi langsung, konversi asinkron |
| Common Options | Tanda air, halaman tertentu, halaman berurutan, font khusus |
| Load Options | CAD, CSV, email, HTML, OneNote, PDF, presentasi, lembar bentang, teks, pemrosesan kata |
| Info | Konversi yang didukung, informasi dokumen, lisensi |
Cara menjalankan contoh
- Klon atau unduh repositori contoh
- Edit
Examples/RunExamples.js dan atur clientId serta clientSecret - Buka direktori
Examples - Jalankan
npm install - Jalankan
npm update - Jalankan
npm run-script start
Untuk detail selengkapnya, kunjungi Getting Started.

Document Conversion API | Node.js 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, Node.js | Secure API Access | Docker Support | Scalable Document Conversion | API Rate Limiting