Merge XPS files | Aspose.Page for Node.js via C++

You can check the quality of Aspose.Page XPS merging and view the results via free online XPS Merger

Aspose.Page Node.js via C++ XPS merger allows merging XPS files into an XPS document on Windows and Linux.

It is necessary to do one step to perform the XPS merge:

  1. Call AsposeXPSMergeToPdf and pass the array of source file names and the result file name.

The result JSON contains the file name in the fileNameResult.

You can download files by using the DownloadFile function: ‘DownloadFile(JSON.fileNameResult, “image/pdf”);’


The following code snippet shows how to merge XPS files in Node.js:

 1const AsposePage = require('asposepagenodejs');
 2
 3const xps_files = "./data/example.xps,./data/transforms.xps";
 4
 5console.log("Aspose.Page for Node.js via C++ examples.");
 6
 7AsposePage().then(AsposePageModule => {
 8
 9    //XPSMergeToXps - convert to postscript to image
10    const JSON = AsposePageModule.AsposeXPSMergeToXps(xps_files,"XpsMergedToXpsResult.xps");
11    console.log("XPSMergeToXps => %O",  JSON.errorCode == 0 ? JSON.fileNameResult : JSON.errorText);
12
13},
14    reason => {console.log(`The unknown error has occurred: ${reason}`);}
15);

See XPS merge in .Net and Java.

Aspose.Page Node.js via C++ XPS merger also allows merging XPS files into a PDF document on Windows and Linux.

It is necessary to perform several steps to perform an XPS to PDF merge:

  1. It’s as some as XPS to XPS, just call AsposeXPSMergeToPdf and pass the array of source file names and the result file name.


The following code snippet shows how to merge XPS files to PDF document in Node.js:

 1const AsposePage = require('asposepagenodejs');
 2
 3const xps_files = "./data/example.xps,./data/transforms.xps";
 4
 5console.log("Aspose.Page for Node.js via C++ examples.");
 6
 7AsposePage().then(AsposePageModule => {
 8
 9    //XPSMergeToPdf - convert to postscript to image
10    JSON = AsposePageModule.AsposeXPSMergeToPdf(xps_files,"XPsMergedToPdfResult.pdf");
11    console.log("XPSMergeToPdf => %O",  JSON.errorCode == 0 ? JSON.fileNameResult : JSON.errorText);
12
13},
14    reason => {console.log(`The unknown error has occurred: ${reason}`);}
15);

Evaluate XPS merging online on our XPS Merger.

You can download examples and data files from GitHub.

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.