Ngonversi sawetara gambar dadi Word ing JavaScript

Dhuwur-kacepetan Node.js pustaka kanggo nggabungaké file gambar menyang Word

Pustaka Node.js sing cepet lan efisien kanggo nggabungake pirang-pirang file gambar dadi Word. Coba online gratis!

Ndeleng potongan kode

Gabungke gambar dadi siji Word nggunakake JavaScript

Modern JavaScript perpustakaan ngijini Node.js via .NET gawe kanggo nggabungaken gambar menyang siji Word karo sawetara garis saka kode. Mesin konversi gambar nganalisa tata letak lan struktur gambar konten gabungan menyang Word format.

Gunakake JavaScript kanggo ngowahi gambar dadi Word kanthi keluwesan lan kacepetan maksimal. Jalanake demo online lan priksa Word paling dhuwur ing browser. gambar Conversion API ndhukung akeh opsi migunani.

Gabungke gambar menyang Word

Kanggo ngowahi sawetara gambar menyang Word mung nggunakake JavaScript sing nangani kabeh rincian tingkat rendah.

Ngonversi pirang-pirang gambar lan simpen asil minangka file siji Word. Yen sampeyan ngembangake kode nggunakake JavaScript, iki bakal luwih gampang tinimbang sing katon. Deleng JavaScript sing ngulang dokumen lan ngowahi dadi Word format:

Tuladha kode ing JavaScript kanggo nggabungake pirang-pirang PNG dadi DOCX
Unggah file sing pengin digabung
Kode roto
Unggah file sing pengin digabung
Pilih format target saka dhaptar
npm install @aspose/words
Nyalin
const aw = require('@aspose/words');

var fileNames = [ "Input1.png", "Input2.png" ]

var doc = new aw.Document()
var builder = new aw.DocumentBuilder(doc)

fileNames.forEach(fileName => {
    builder.insertImage(fileName)
    // Masang break paragraf supaya gambar tumpang tindih.
    builder.writeln()
});

doc.save("Output.docx")
Kode roto

Carane ngowahi sawetara gambar dadi Word

  1. Pasang Aspose.Words for Node.js via .NET.
  2. Tambah referensi perpustakaan (ngimpor perpustakaan) menyang proyek JavaScript
  3. Bukak gambar berkas JavaScript.
  4. Ngonversi sawetara gambar file menyang Word ing sawetara detik.
  5. Nelpon metode appendDocument(), menehi jeneng file output nganggo ekstensi Word
  6. Entuk asil konversi gambar dadi Word.

JavaScript kanggo ngowahi gambar dadi Word

We host our Node.js via .Net packages in NPM repositories. Please follow the step-by-step instructions on how to install "Aspose.Words for Node.js via .NET" to your developer environment.

System Requirements

This package is compatible with Node.js 14.17.0 or higher.

Operasi gambar Liyane sing Didhukung

Sampeyan bisa nggabungake gambar menyang akeh format file liyane:

5%

Langganan kanggo Aspose Update Product

Entuk buletin saben wulan lan tawaran langsung dikirim menyang kothak layang.

© Aspose Pty Ltd 2001-2024. Kabeh hak dilindhungi undhang-undhang.