AsposePSMergeToPdf

AsposePSMergeToPdf function

Merge the Postscript files to PDF.

function AsposePSMergePdf(
    fileNames, 
    fileNameResult, 
    supressErrors
)
ParameterTypeDescription
fileNamesstringThe names of files for merge.
fileNameResultstringThe name of result pdf file.
supressErrorsboolSpecifies whether errors must be suppressed or not.

Return Value

JSON object

FieldDescription
errorCodecode error (0 no error)
errorTexttext error ("" no error)
fileNameResultresult file name

Examples

const AsposePage = require('asposepagenodejs');

const ps_files = "./data/program_01.ps,./data/PAGENET-361-10.eps";

console.log("Aspose.Page for Node.js via C++ examples.");

AsposePage().then(AsposePageModule => {

    const json = AsposePageModule.AsposePSMergeToPdf(ps_files,"PsMergedToPdfResult.pdf",true);
    console.log("PSMergeToPdf => %O",  json.errorCode == 0 ? json.fileNameResult : json.errorText);
},
    reason => {console.log(`The unknown error has occurred: ${reason}`);}
);

See Also