You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CAD - Save as: convert a drawing from a storage to a raster or vector format and store it to storage
// optional parameters are base URL, API version and debug modeconstcadApi=newcad.cadApi("yourAppKey","yourAppSID");// convert image from storage to PDFconstrequest: cad.GetDrawingSaveAsRequest=newcad.GetDrawingSaveAsRequest({name: "test.dwg",// drawing previously uploaded into your Aspose Cloud storageoutputFormat: "pdf",// output file formatfolder: "",// folder where input file wiil be seeked onstorage: "storage",// storage nameoutPath: "path/test.pdf"// path inside the storage to place output file to});constresponse=awaitthis.cadApi.getDrawingSaveAs(request);// other cad requests typically follow the same principles regarding stream/storage relations
CAD - Save as: convert a drawing from a storage to a raster or vector format and return it on response
// optional parameters are base URL, API version and debug modeconstcadApi=newcad.cadApi("yourAppKey","yourAppSID");// convert image from storage to PDFconstrequest: cad.GetDrawingSaveAsRequest=newcad.GetDrawingSaveAsRequest({name: "test.dxf",// drawing previously uploaded into your Aspose Cloud storageoutputFormat: "gif",// output file formatfolder: "",// folder where input file wiil be seeked onstorage: "storage",// storage nameoutPath: null// make 'outPath' empty to force return output result on response});constresponse=awaitthis.cadApi.getDrawingSaveAs(request);// other cad requests typically follow the same principles regarding stream/storage relations
CAD - Save as: convert a drawing from a request stream to another format
// read input filefs=require('fs');varinput=fs.readFile("test.dwf");// optional parameters are base URL, API version and debug modeconstcadApi=newcad.cadApi("yourAppKey","yourAppSID");// convert image from storage to GIFconstrequest: cad.PostDrawingSaveAsRequest=newcad.PostDrawingSaveAsRequest({drawingData: input,outputFormat: "png",// output file formatoutPath: null// make 'outPath' empty to force return output result on response});constresponse=awaitthis.cadApi.postDrawingSaveAs(request);console.log(response.length>0);// other cad requests typically follow the same principles regarding stream/storage relations