Modern JavaScript perpustakaan ngijini Node.js via .NET gawe Ngonversi teks kanggo JPG format gambar karo sawetara garis saka kode. teks mesin konversi nganalisa isi asli, lan JPG gambar.
Gunakake JavaScript kanggo ngowahi teks dadi JPG format gambar kanthi keluwesan lan kacepetan maksimal. Jalanake demo langsung online lan priksa JPG paling dhuwur ing browser. teks Conversion API ndhukung akeh opsi migunani.
Kanggo ngowahi teks file menyang JPG image mung nggunakake JavaScript perpustakaan sing Ngalahake kabeh rincian-tingkat kurang.
Ngonversi pirang-pirang teks lan simpen asil dadi siji JPG gambar Yen sampeyan ngembangake kode ing JavaScript, teks bakal luwih gampang tinimbang sing katon. Deleng JavaScript sing ngulang liwat teks lan gabungke dadi siji JPG gambar.
npm install @aspose/words
Nyalin
const aw = require('@aspose/words');
var fileNames = [ "Input1.txt", "Input2.txt" ]
var output = new aw.Document()
// Mbusak kabeh content saka dokumen tujuan sadurunge nambah.
output.removeAllChildren()
fileNames.forEach(fileName => {
var input = new aw.Document(fileName);
// Tambahake dokumen sumber menyang pungkasan dokumen tujuan
output.appendDocument(input, aw.ImportFormatMode.KeepSourceFormatting);
});
for (var page = 0; page < output.pageCount; page++) {
var extractedPage = output.extractPages(page, 1);
extractedPage.save(`Output_${page + 1}.jpg`);
}
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 teks menyang akeh format file liyane: