EPSのXMPメタデータに名前付き値を追加| Node.js

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

結果JSONには、filenameresultにファイル名が含まれています。


次のコードスニペットには、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      ["xmpTPg:MaxPageSize", [["stDim:newKey", "NewValue"],["stDim:newKey2", "NewValue2"]] ],
11      ["xmpTPg:SwatchGroups", [["xmpG:newKey", "NewValue"]] ]
12    ];
13    const JSON = AsposePageModule.AsposeXMPAddNamedValue(ps_file, "result3.eps", input);
14    console.log("AsposeXMPAddNamedValue => %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.