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.


Docs Swagger Examples Blog Support Dashboard

Instalasi

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

npm install groupdocs-metadata-cloud

NPM Version NPM Downloads NPM-GroupDocsCloud


Persyaratan

Dependensi

SDK memerlukan paket berikut:

PackageConstraint
axios1.13.3
form-data*
jsonwebtoken9.0.1
qs6.14.1

Mulai cepat

Dapatkan kredensial API Anda

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

Inisialisasi API

Gunakan kode berikut untuk mulai menggunakan GroupDocs.Metadata Cloud SDK for Node.js. Konstruktor menerima Client ID, lalu Client Secret.

"use strict";
const metadata_cloud = require("groupdocs-metadata-cloud");

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

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

const metadataApi = metadata_cloud.MetadataApi.fromConfig(config);

Lihat test_context.ts untuk detail selengkapnya.

Ekstrak metadata

Setelah diinisialisasi, gunakan contoh dasar ini untuk mengekstrak pohon metadata dari dokumen Word di penyimpanan cloud.

"use strict";
const metadata_cloud = require("groupdocs-metadata-cloud");

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

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

const metadataApi = metadata_cloud.MetadataApi.fromConfig(config);

const extractOptions = new metadata_cloud.ExtractOptions();
extractOptions.fileInfo = new metadata_cloud.FileInfo();
extractOptions.fileInfo.filePath = "documents/input.docx";
const request = new metadata_cloud.ExtractRequest(extractOptions);

metadataApi.extract(request).then((result) => {
    console.log(result.metadataTree.innerPackages.length);
});

Lihat test_metadata_extract_api.ts untuk detail selengkapnya.

Atur properti metadata

Contoh ini mengganti properti Creator pada dokumen Word.

"use strict";
const metadata_cloud = require("groupdocs-metadata-cloud");

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

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

const metadataApi = metadata_cloud.MetadataApi.fromConfig(config);

const options = new metadata_cloud.SetOptions({
    fileInfo: new metadata_cloud.FileInfo(),
    properties: [
        new metadata_cloud.SetProperty({
            newValue: "NewAuthor",
            type: "String",
            searchCriteria: new metadata_cloud.SearchCriteria({
                tagOptions: new metadata_cloud.TagOptions({
                    exactTag: new metadata_cloud.Tag({
                        name: "Creator",
                        category: "Person"
                    })
                })
            })
        })
    ]
});
options.fileInfo.filePath = "documents/input.docx";
const request = new metadata_cloud.SetRequest(options);

metadataApi.set(request).then((result) => {
    console.log(result.setCount);
});

Lihat test_metadata_set_api.ts untuk detail selengkapnya.

Hapus metadata berdasarkan tag

Contoh ini menghapus properti Title dari dokumen Word.

"use strict";
const metadata_cloud = require("groupdocs-metadata-cloud");

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

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

const metadataApi = metadata_cloud.MetadataApi.fromConfig(config);

const options = new metadata_cloud.RemoveOptions({
    fileInfo: new metadata_cloud.FileInfo(),
    searchCriteria: new metadata_cloud.SearchCriteria({
        tagOptions: new metadata_cloud.TagOptions({
            exactTag: new metadata_cloud.Tag({
                name: "Title",
                category: "Content"
            })
        })
    })
});
options.fileInfo.filePath = "documents/input.docx";
const request = new metadata_cloud.RemoveRequest(options);

metadataApi.remove(request).then((result) => {
    console.log(result.removedCount);
});

Lihat test_metadata_remove_api.ts untuk detail selengkapnya.

Dapatkan informasi dokumen

Contoh ini membaca format file dan jumlah halaman presentasi.

"use strict";
const metadata_cloud = require("groupdocs-metadata-cloud");

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

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

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

const infoOptions = new metadata_cloud.InfoOptions();
infoOptions.fileInfo = new metadata_cloud.FileInfo();
infoOptions.fileInfo.filePath = "documents/input.pptx";
const request = new metadata_cloud.GetInfoRequest(infoOptions);

infoApi.getInfo(request).then((result) => {
    console.log(result.pageCount);
});

Lihat test_metadata_info_api.ts untuk detail selengkapnya.

Dapatkan format metadata yang didukung

Ambil format file yang dapat dibaca oleh API.

"use strict";
const metadata_cloud = require("groupdocs-metadata-cloud");

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

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

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

infoApi.getSupportedFileFormats().then((result) => {
    result.formats.forEach(function (format) {
        console.log(format.fileFormat);
    });
});

Lihat test_formats_api.ts untuk detail selengkapnya.

Contoh di GitHub

Repositori GroupDocs.Metadata Cloud Node.js SDK berisi SDK dan pengujian yang mencakup:

CategoryExamples
MetadataEkstrak, tambahkan, atur, dan hapus metadata, cari berdasarkan tag atau nama properti
InfoInformasi dokumen dan format file yang didukung
StorageOperasi file, folder, dan penyimpanan

Cara menjalankan contoh

  1. Klon atau unduh repositori SDK
  2. Edit test/test_settings.json dan atur AppSid serta AppKey
  3. Jalankan npm install
  4. Pengujian berada di test/api/
  5. Jalankan npm test

Untuk detail selengkapnya, kunjungi Getting Started.


Docs Swagger Examples Blog Support Dashboard


Tags

Document Metadata API | Node.js Cloud API | GroupDocs.Metadata Cloud | REST API | Metadata Extraction | Metadata Management | Metadata Filtering | Metadata Searching | Metadata Preservation | Cloud Storage Integration | File Management | Folder Management | File Versioning | Secure API Access | Cross-Platform API | PDF Metadata | Image Metadata | Video Metadata | Audio Metadata | Document Metadata Editing | MIT License



 Indonesia