Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
aspose.slides.via.net
Advanced tools
Readme
Aspose.Slides for Node.js via .NET is a PowerPoint API for presentations manipulation and management. It allows developers to read, write, convert and manipulate PowerPoint presentations using Node.js. All document elements such as slides, tables, text, charts, shapes, images and SmartArt diagrams are accessible for manipulation, supports exporting presentations to PDF, PDF/A, HTML, XPS and image formats. The PowerPoint API includes many extended PPT and PPTX features as: merge, clone, split, compare presentations.
Microsoft PowerPoint: PPT, PPTX, PPS, POT, PPSX, PPTM, PPSM, POTX, POTM OpenOffice: ODP, ODS Text: CSV, Tab-Delimited, TXT, JSON Web: HTML, MHTML
Fixed Layout: PDF, XPS Images: JPEG, PNG, BMP, SVG, TIFF, GIF, EMF Text: CSV, Tab-Delimited, JSON, SQL, XML Web: HTML
Aspose.Slides for Node.js via .NET is a javascript wrapper that works with the .NET6 or above runtime.
From the command line:
npm install aspose.slides.via.net
Please use the following article for details.
// Import the Aspose.Slides module for PowerPoint file manipulation
const asposeSlides = require('aspose.slides.via.net');
// Add necessary classes from the asposeSlides
const { Presentation, SaveFormat, PdfOptions } = asposeSlides;
const fs = require('fs');
if (!fs.existsSync("out")) fs.mkdirSync("out");
// Create and save an empty presentation to demonstrate basic functionality
function createEmptyPresentation() {
// Initialize a new empty presentation
var emptyPresentation = new Presentation();
// Save the empty presentation in PPTX format
emptyPresentation.save("out/emptyPresentation.pptx", SaveFormat.Pptx);
// Release resources associated with the presentation
emptyPresentation.dispose();
}
createEmptyPresentation(); // Execute the function to create an empty presentation
// Import the Aspose.Slides module for PowerPoint file manipulation
const asposeSlides = require('aspose.slides.via.net');
const {
Presentation,
BackgroundType,
FillType,
ImageFormat
} = asposeSlides;
const fs = require('fs');
// Function to demonstrate creating and manipulating a presentation
function manipulatePresentation() {
// Create a new presentation instance
var pres = new Presentation();
// Add an empty slide to the presentation
pres.slides.addEmptySlide(pres.layoutSlides.get(0));
// Create another presentation instance for cloning purposes
var pres2 = new Presentation();
// Add a clone of the first slide from pres2 into pres
pres.slides.addClone(pres2.slides.get(0));
// Log the current count of slides in pres
console.log("countSlides:" + pres.slides.count);
// Remove the first slide from pres
pres.slides.removeAt(0);
// Log the new count of slides after removal
console.log("countSlides:" + pres.slides.count);
// Access and modify properties of the first slide in pres
var slide = pres.slides.get(0); // Get the first slide
var slideNumber = slide.slideNumber; // Get slide number
var hidden = slide.hidden; // Check if the slide is hidden
// Set the background of the first slide
slide.background.type = BackgroundType.OwnBackground; // Set background type
slide.background.fillFormat.fillType = FillType.Solid; // Set fill type to solid
slide.background.fillFormat.solidFillColor.color = "#AEC025F4"; // Set a solid fill color
// Log background type and color of the first slide
console.log("backgroundType:" + slide.background.type);
console.log("backgroundColor:" + slide.background.fillFormat.solidFillColor.color);
if (!fs.existsSync("out")) fs.mkdirSync("out");
// Generate and save a thumbnail of the first slide
var slideThumbnail = slide.getThumbnailWithImageSize({width: 960, height: 720}); // Get slide thumbnail
slideThumbnail.save("out/slide-thumbnail.png", ImageFormat.Png); // Save thumbnail as PNG
// Save the presentation to a file
pres.save("out/slides-manipulation.pptx", asposeSlides.SaveFormat.Pptx);
// Dispose of presentation objects to free resources
pres.dispose();
pres2.dispose();
}
Product Page | Documentation | API Reference | Code Examples | Blog | Free Support | Temporary License
FAQs
A powerful library for manipulating and converting PowerPoint (PPT, PPTX, PPS, POT, PPSX, PPTM, PPSM, POTX, POTM), ODP, ODS, CSV, TXT, PNG, EMF, JPG, JSON and HTML files.
The npm package aspose.slides.via.net receives a total of 62 weekly downloads. As such, aspose.slides.via.net popularity was classified as not popular.
We found that aspose.slides.via.net demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.