Add properties in XMP metadata of EPS | Node.js
In order to add properties in XMP metadata of EPS file, it is necessary to call AsposeXMPAddSimpleProperties and pass the file content, its name, result file name, prefix, url, and property key and value to it.
The result JSON contains the file name in the fileNameResult.
The following code snippet shows how to add an XML namespace in XMP metadata in an EPS file in Node.js:
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 key = "tmp:newKey"
10 const value = "NewValue"
11 const JSON = AsposePageModule.AsposeXMPAddSimpleProperties(ps_file, "result5.eps", key, value);
12 console.log("AsposeXMPAddSimpleProperties => %O", JSON.errorCode == 0 ? JSON.fileNameResult : JSON.errorText);
13
14},
15 reason => {console.log(`The unknown error has occurred: ${reason}`);}
16);
You can download examples and data files from GitHub.