Jelajahi Produk kami

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

Instalasi

Paket tersedia di npmjs.com dan dapat diinstal melalui npm dengan menjalankan perintah berikut:

npm install groupdocs-merger-cloud

NPM Version NPM Downloads NPM-GroupDocsCloud


Persyaratan

Dependensi

SDK memerlukan paket berikut:

PackageConstraint
axios1.13.2
form-data*
qs6.11.2

Mulai cepat

Dapatkan kredensial API Anda

Untuk menggunakan GroupDocs.Merger Cloud, daftar di GroupDocs.Cloud Dashboard dan dapatkan Client ID dan Client Secret Anda.

Inisialisasi API

Gunakan kode berikut untuk mulai menggunakan GroupDocs.Merger Cloud SDK for Node.js.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const documentApi = merger_cloud.DocumentApi.fromConfig(config);

Lihat contoh lengkap di RunExamples.js.

Gabungkan beberapa dokumen

Setelah diinisialisasi, gunakan contoh dasar ini untuk menggabungkan dua dokumen Word menjadi satu file.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const documentApi = merger_cloud.DocumentApi.fromConfig(config);

(async () => {
    let item1 = new merger_cloud.JoinItem();
    item1.fileInfo = new merger_cloud.FileInfo();
    item1.fileInfo.filePath = "WordProcessing/four-pages.docx";

    let item2 = new merger_cloud.JoinItem();
    item2.fileInfo = new merger_cloud.FileInfo();
    item2.fileInfo.filePath = "WordProcessing/one-page.docx";

    let options = new merger_cloud.JoinOptions();
    options.joinItems = [item1, item2];
    options.outputPath = "Output/joined.docx";

    let result = await documentApi.join(new merger_cloud.JoinRequest(options));
    console.log("Output file path: " + result.path);
})();

Lihat contoh lengkap di JoinMultipleDocuments.js.

Pisahkan dokumen menjadi halaman tunggal

Contoh ini memisahkan halaman terpilih dari dokumen Word.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const documentApi = merger_cloud.DocumentApi.fromConfig(config);

(async () => {
    let options = new merger_cloud.SplitOptions();
    options.fileInfo = new merger_cloud.FileInfo();
    options.fileInfo.filePath = "WordProcessing/sample-10-pages.docx";
    options.outputPath = "Output/split-document";
    options.pages = [1, 3];
    options.mode = merger_cloud.SplitOptions.ModeEnum.Pages;

    let result = await documentApi.split(new merger_cloud.SplitRequest(options));
    console.log("Documents count: " + result.documents.length);
})();

Lihat contoh lengkap di SplitToSinglePages.js.

Putar halaman dokumen

Contoh ini memutar halaman 2 dan 4 dari PDF sebesar 90 derajat.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const pagesApi = merger_cloud.PagesApi.fromConfig(config);

(async () => {
    let options = new merger_cloud.RotateOptions();
    options.fileInfo = new merger_cloud.FileInfo();
    options.fileInfo.filePath = "Pdf/ten-pages.pdf";
    options.outputPath = "Output/rotate-pages.pdf";
    options.pages = [2, 4];
    options.mode = merger_cloud.RotateOptions.ModeEnum.Rotate90;

    let result = await pagesApi.rotate(new merger_cloud.RotateRequest(options));
    console.log("Output file path: " + result.path);
})();

Lihat contoh lengkap di RotatePages.js.

Dapatkan format penggabungan yang didukung

Ambil format dokumen yang dapat digabungkan oleh API.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const infoApi = merger_cloud.InfoApi.fromConfig(config);

(async () => {
    let response = await infoApi.getSupportedFileFormats();
    console.log("Supported file-formats:");
    response.formats.forEach(function (format) {
        console.log(format.fileFormat + "(" + format.extension + ")");
    });
})();

Lihat contoh lengkap di GetSupportedFormats.js.

Contoh di GitHub

Repositori GroupDocs.Merger Cloud Node.js Examples berisi contoh siap dijalankan yang mencakup:

CategoryExamples
Document OperationsGabungkan dokumen, gabungkan gambar, gabungan lintas format, pisahkan, campur halaman, pratinjau, impor lampiran
Pages OperationsUbah orientasi, ekstrak, pindahkan, hapus, putar, dan tukar halaman
Security OperationsTambahkan, periksa, hapus, dan perbarui kata sandi dokumen
InfoInformasi dokumen, konsumsi lisensi, jenis file yang didukung

Cara menjalankan contoh

  1. Klon atau unduh repositori contoh
  2. Edit Examples/RunExamples.js dan atur clientId serta clientSecret
  3. Buka direktori Examples
  4. Jalankan npm install
  5. Jalankan npm update
  6. Jalankan npm run-script start

Untuk detail selengkapnya, kunjungi Getting Started.


Product Docs Swagger Examples Blog Support Dashboard


Tags

Document Merging API | Node.js Cloud API | GroupDocs.Merger Cloud | REST API | Page Manipulation | Document Security | Password Protection | Cloud Storage Integration | File Operations | Folder Operations | Document Splitting | PDF Merging | Cross-format Merging | Word Document Merging | Excel File Merging | Presentation Merging | Document Reorganization | Secure API Access | Document Joining | Document Manipulation API | Merge Multiple Formats | Cross-platform API



 Indonesia