Limitations and API Differences
Contents
[
Hide
]
Public API Differences
The following list (with sample code segments) shows some differences between Aspose.Slides for Java and Aspose.Slides for Node.js via Java APIs.
Importing library (Package Comparisons)
Aspose.Slides for Java
import com.aspose.slides.*;
Aspose.Slides for Node.js via Java
var aspose = aspose || {};
aspose.slides = require("aspose.slides.via.java");
Instantiating a new Presentation
Aspose.Slides for Java
Presentation pres = new Presentation();
Aspose.Slides for Node.js via Java
var pres = new aspose.slides.Presentation();
Streaming Files and Constants
Aspose.Slides for Java
InputStream inputstream = new FileInputStream("Pres1.pptx");
Presentation pres = new Presentation(inputstream);
pres.save("result.pptx", SaveFormat.Pptx);
Aspose.Slides for Node.js via Java
var aspose = aspose || {};
aspose.slides = require("aspose.slides.via.java");
var fs = require("fs");
var readStream = fs.createReadStream("presentation.pptx");
aspose.slides.Presentation.createPresentationFromStream(readStream, function(err, pres) {
if (err) {
console.log("open Presentation error");
return;
}
pres.save("result.pptx", aspose.slides.SaveFormat.Pptx);
console.log('saved to file');
});
Other Limitations of Aspose.Slides for Node.js via Java API compared to Aspose.Slides for Java API
- Importing/exporting data from an Array, ArrayList, ResultSet etc. is not supported.
- Printing is not supported.