AsposeResizeEPS

AsposeResizeEPS function

Resizes EPS file. It saves initial EPS file with updated existing %%BoundingBox or new one will be created.

function AsposeResizeEPS(
    fileBlob,
    fileName, 
    fileNameResult, 
    width,
    height,
    units
)
ParameterTypeDescription
fileBlobBlob objectContent of source file.
fileNamestringSource file name.
fileNameResultstringResult file name.
widthfloatSpecifies width of new bounding box.
heightfloatSpecifies height of new bounding box.
unitModule.UnitsSpecifies type of new size.

Return Value

JSON object

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

Examples

const AsposePage = require('asposepagenodejs');

const eps_file = "./data/PAGENET-361-10.eps";

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

AsposePage().then(AsposePageModule => {

    //ResizeEPS - working with EPS
    const json = AsposePageModule.AsposeResizeEPS(eps_file, "resized.eps", 200, 100, AsposePageModule.Units.Points);
    console.log("ResizeEPS => %O",  json.errorCode == 0 ? JSON.parse(JSON.stringify(json).replace('"errorCode":0,"errorText":"",','')) : json.errorText);
},
    reason => {console.log(`The unknown error has occurred: ${reason}`);}
);

See Also