# Node.js thông qua .NET PowerPoint API của Aspose.Slides

> Aspose.Slides cho Node.js qua .NET là API PowerPoint của Node.js cho phép bạn tạo, sửa đổi và chuyển đổi bản trình bày PowerPoint trong Node.js.

Source: https://products.aspose.com/slides/vi/nodejs-net/
Updated: 2026-08-11



<p><strong>Aspose.Slides dành cho Node.js qua .NET</strong> là thư viện Node.js cho phép bạn tạo, sửa đổi và chuyển đổi bản trình bày PowerPoint trong Node.js. Nó hỗ trợ tất cả các yếu tố trình bày như trang trình bày, hình dạng, văn bản, biểu đồ, bảng, hình ảnh, v.v. Nó cũng cung cấp nhiều tính năng nâng cao như hợp nhất, nhân bản, chia tách, so sánh và in bản trình bày. Nó hoạt động mà không có bất kỳ sự phụ thuộc nào và có thể xử lý hàng nghìn bài thuyết trình trong thời gian ngắn.</p>

<p><strong>Aspose.Slides dành cho Node.js qua .NET</strong> cung cấp các tính năng phổ biến sau:</p>
<ul>
    <li>Đang tải, mở và xem bản trình bày.</li>
    <li>Chỉnh sửa bài thuyết trình.</li>
    <li>Chuyển đổi tệp trình bày sang các định dạng trình bày phổ biến, chẳng hạn như PPT, PPTX và ODP.</li>
    <li>Xuất bản trình bày sang PDF, JPG, HTML, GIF, SVG và nhiều định dạng khác.</li>
    <li>Hiển thị và in bài thuyết trình.</li>
    <li>Mã hóa và giải mã bài thuyết trình; thuyết trình bảo vệ bằng mật khẩu và xóa mật khẩu.</li>
    <li>Thao tác với các thực thể trình bày, chẳng hạn như slide chính, hình dạng, biểu đồ, khung ảnh, khung âm thanh, khung video, macro OLE, VBA, hình động, v.v.</li>
    <li>Và nhiều tính năng khác.</li>
</ul>

<p>Node.js là môi trường thời gian chạy JavaScript phổ biến, miễn phí, mã nguồn mở và đa nền tảng, cho phép các nhà phát triển viết các công cụ dòng lệnh và tập lệnh phía máy chủ bên ngoài trình duyệt. Vì lý do này, nhóm <strong>Aspose.Slides</strong> tự hào cung cấp <strong>Aspose.Slides cho Node.js qua .NET</strong> cho cộng đồng Node.js.</p>

<div class="container-fluid features-section bg-gray singleproduct">
 <a class="anchor" id="features" name="features">
 </a>
 <div class="row">
  <div class="container">
   <h2 class="pr-ft">Các tính năng API PowerPoint của Node.js nâng cao</h2>
   <p>
   </p>
   <div class="col-lg-4">
    <em class="fa fa-copy ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">Tạo hoặc sao chép các slide hiện có từ các mẫu</p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-table ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">Làm việc với API thông tin PowerPoint trên bảng</p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-shield ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">Áp dụng hoặc loại bỏ lớp bảo vệ trên dạng hình</p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-bar-chart ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">Thêm biểu đồ Excel bên dưới dạng OleObjects vào trang trình bày</p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-image ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Tạo hình và thêm văn bản vào hình trên slide
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-align-left ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Xử lý văn bản và hình ảnh định dạng
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-database ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">Tạo bài thuyết trình từ cơ sở dữ liệu</p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-lock ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">Bảo vệ bản trình bày và kết quả PDF</p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-print ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">In bài thuyết trình trên máy vật lý</p>
   </div>
   <div class="col-lg-12">
    <h2 class="h2title">System request</h2>
    <ul>
      <li>Aspose.Slides cho Node.js qua .NET là API JavaScript phía máy chủ dựa trên Node.js. Nó có thể chạy trên nền tảng Windows, Unix/Linux & Mac với .NET6 trở lên.</li>
    </ul>
   </div>
   <div class="col-lg-12">
    <h2 class="h2title">Cài đặt thế nào</h2>
    <p>Sử dụng <strong>NPM</strong> để cài đặt thư viện Node.js của chúng tôi nhằm xử lý Bản trình bày từ <a href="https://www.npmjs.com/package/aspose.slides.via.net">kho lưu trữ Gói NPM :</a></p>
    <pre><code>npm install aspose.slides.via.net</code></pre>
   </div>
    <div class="col-lg-12">
        <h2 class="h2title">Cách tạo bản trình bày PowerPoint mới trong Node.js</h2>
        <p>Trong ví dụ dưới đây, chúng tôi đã thêm một hình chữ nhật vào slide đầu tiên của bài thuyết trình.</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation, SaveFormat, ShapeType } = asposeSlides;

var pres = new Presentation();
try
{
    var slide = pres.slides.get(0);
    slide.shapes.addAutoShape(ShapeType.Rectangle, 50, 150, 300, 200);

    pres.save("pres.pptx", SaveFormat.Pptx);
}
finally
{
    if (pres != null) pres.dispose();
}
            </code>
        </pre>
    </div>

    <div class="col-lg-12">
        <h2 class="h2title">Cách thêm/xóa/sao chép slide và chỉnh sửa thuộc tính hình dạng trong Node.js</h2>
        <p>Mã Node.js này chỉ cho bạn cách chỉnh sửa các thuộc tính khác nhau và sao chép các slide:</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation, BackgroundType, FillType, ImageFormat } = asposeSlides;

var pres = new Presentation();
try
{
    // Add an empty slide to the presentation
    pres.slides.addEmptySlide(pres.layoutSlides.get(0));

    // Create another presentation and add its clone into the pres
    var pres2 = new Presentation();
    pres.slides.addClone(pres2.slides.get(0));

    // 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
}
finally
{
    if (pres != null) pres.dispose();
}
            </code>
        </pre>
    </div>

    <div class="col-lg-12">
        <h2 class="h2title">Cách chuyển đổi PowerPoint sang PDF trong Node.js</h2>
        <p>Mã Node.js này chỉ cho bạn cách chuyển đổi PowerPoint thành tài liệu PDF</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation, SaveFormat } = asposeSlides;

var pres = new Presentation("pres.pptx");
try
{
    pres.save("pres.pdf", SaveFormat.Pdf);
}
finally
{
    if (pres != null) pres.dispose();
}
            </code>
        </pre>
    </div>

    <div class="col-lg-12">
        <h2 class="h2title">Cách chuyển đổi PowerPoint sang GIF trong Node.js</h2>
        <p>Mã Node.js này chỉ cho bạn cách chuyển đổi PowerPoint thành hình ảnh GIF</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation, SaveFormat } = asposeSlides;

var pres = new Presentation("pres.pptx");
try
{
    pres.save("pres.gif", SaveFormat.Gif);
}
finally
{
    if (pres != null) pres.dispose();
}
            </code>
        </pre>
    </div>

    <div class="col-lg-12">
        <h2 class="h2title">Cách chuyển đổi PowerPoint sang HTML trong Node.js</h2>
        <p>Mã Node.js này chỉ cho bạn cách chuyển đổi PowerPoint thành tài liệu HTML</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation, SaveFormat } = asposeSlides;

var pres = new Presentation("pres.pptx");
try
{
    pres.save("pres.html", SaveFormat.Html);
}
finally
{
    if (pres != null) pres.dispose();
}
            </code>
        </pre>
    </div>

    <div class="col-lg-12">
        <h2 class="h2title">Cách chuyển đổi PowerPoint sang ODP trong Node.js</h2>
        <p>Mã Node.js này chỉ cho bạn cách chuyển đổi PowerPoint thành tài liệu ODP</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation, SaveFormat } = asposeSlides;

var pres = new Presentation("pres.pptx");
try
{
    pres.save("pres.odp", SaveFormat.Odp);
}
finally
{
    if (pres != null) pres.dispose();
}
            </code>
        </pre>
    </div>

    <div class="col-lg-12">
        <h2 class="h2title">Cách hợp nhất các bản trình bày trong Node.js</h2>
        <p>Mã Node.js này chỉ cho bạn cách hợp nhất các bản trình bày:</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation, SaveFormat } = asposeSlides;

var pres1 = new Presentation("pres1.pptx");
var pres2 = new Presentation("pres2.pptx");
try
{
    for (var i = 0; i < pres2.slides.length; i++)
    {
        pres1.slides.addClone(pres2.slides.get(i));
    }

    pres1.save("combinedPresentation.pptx", SaveFormat.Pptx);
}
finally
{
    if (pres1 != null) pres1.dispose();
    if (pres2 != null) pres2.dispose();
}
            </code>
        </pre>
    </div>

    <div class="col-lg-12">
        <h2 class="h2title">Cách truy xuất các thuộc tính khác nhau của bản trình bày PowerPoint </h2>
        <p>Ví dụ sau đây chỉ cho bạn cách truy xuất các thuộc tính khác nhau của bản trình bày PowerPoint.</p>
        <pre>
            <code class="JavaScript">
const asposeSlides = require('aspose.slides.via.net');

const { Presentation } = asposeSlides;

var pres = new Presentation("pres.pptx");
try
{
    // Retrieve various properties of the presentation
    var countSlides = pres.slides.count; // Total number of slides
    var countMastersSlides = pres.masters.count; // Total number of master slides
    var countLayoutSlides = pres.layoutSlides.count; // Total number of layout slides
    var firstSlideNumber = pres.firstSlideNumber; // Number of the first slide
    var lastView = pres.viewProperties.lastView; // Last view type of the presentation
    var masterThemeName = pres.masterTheme.name; // Name of the master theme
    var sourceFormat = pres.sourceFormat; // Format of the source presentation
    var countVideos = pres.videos.count; // Total number of videos in the presentation
    var countImages = pres.images.count; // Total number of images in the presentation

    // Retrieve objects for further manipulation or information extraction
    var slideObject = pres.slides.get(0); // Object of the first slide
    var mastersSlideObject = pres.masters.get(0); // Object of the first master slide

    // Log the total number of slides to the console
    console.log("countSlides:" + countSlides);
    console.log("countMastersSlides:" + countMastersSlides);
    console.log("countLayoutSlides:" + countLayoutSlides);
    console.log("firstSlideNumber:" + firstSlideNumber);
    console.log("lastView=" + lastView);
    console.log("masterThemeName:" + masterThemeName);
    console.log("sourceFormat:" + sourceFormat);
    console.log("countVideos:" + countVideos);
    console.log("countImages:" + countImages);
}
finally
{
    if (pres != null) pres.dispose();
}
            </code>
        </pre>
    </div>
  </div>
 </div>
</div>
