Modern JavaScript perpustakaan ngijini Node.js via .NET gawe kanggo ngowahi gambar kanggo PDF format karo sawetara garis saka kode. API konversi gambar nganalisa konten grafis asli, lan ngekspor gambar gabungan minangka PDF dokumen
Gunakake JavaScript kanggo ngowahi gambar menyang PDF kanthi keluwesan lan kacepetan maksimal. Jalanake demo langsung online lan priksa PDF ing browser. Mesin Konversi Gambar ndhukung akeh pilihan sing migunani.
Kanggo ngowahi sawetara gambar menyang PDF mung nggunakake JavaScript sing nangani kabeh rincian tingkat rendah.
Ngonversi pirang-pirang gambar lan simpen asil dadi siji PDF dokumen Yen sampeyan ngembangake kode ing JavaScript, konversi format gambar bakal luwih gampang tinimbang sing katon. Deleng JavaScript sing ngulang file gambar lan gabungke dadi siji PDF dokumen
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.pdf")
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.
This package is compatible with Node.js 14.17.0 or higher.
Sampeyan bisa nggabungake gambar menyang akeh format file liyane: