EPSのXMPメタデータに配列アイテムを追加| Node.js

ePSファイルのXMPメタデータに配列アイテムを追加するには、 AsopsXmpaddarrayitemを呼び出し、ファイルコンテンツ、その名前、および結果ファイル名を渡す必要があります。

EPSファイルにXMPメタデータが含まれていない場合、PSメタデータのコメント(%% Creator、%% Createrate、%%タイトルなど)の値で満たされた新しいメタデータを取得します。

結果JSONには、Filenameresultのファイル名が含まれており、XMP要素でメタデータを取得します。

次のコードスニペットは、node.jsのEPSファイルにXMPメタデータに配列アイテムを追加する方法を示しています。

 1const AsposePage = require('asposepagenodejs');
 2
 3const ps_file = "./data/program_13.ps";
 4
 5console.log("Aspose.Page for Node.js via C++ examples.");
 6
 7AsposePage().then(AsposePageModule => {
 8
 9    const input = [
10      ["dc:title", "NewTitle"],
11      ["dc:creator", "NewCreator"]
12    ];
13    const JSON = AsposePageModule.AsposeXMPAddArrayItem(ps_file, "result2.eps", input);
14    console.log("AsposeXMPAddArrayItem => %O",  JSON.errorCode == 0 ? JSON.fileNameResult : JSON.errorText);
15
16},
17    reason => {console.log(`The unknown error has occurred: ${reason}`);}
18);

Javaおよび .NETのXMPメタデータの配列アイテムの追加を参照してください。

GitHubから例とデータファイルをダウンロードできます。

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.