Program ngowahi dokumen nggunakake Node.js. Jelajahi daya Node.js kanggo konversi format file sing efisien lan bisa diukur.
Apa sampeyan kudu ngowahi dokumen saka siji format menyang format liyane kanthi program? Kanthi Aspose.Words kanggo Node.js via .NET sampeyan bisa ngowahi file nggunakake mung sawetara baris JavaScript kode.
Node.js via .NET kuat ngidini ngowahi dokumen menyang akeh format populer kanthi kualitas profesional:
Conto ing ngisor iki nuduhake carane ngowahi dokumen ing JavaScript. Muat file saka drive lokal, banjur simpen, nemtokake format file sing dibutuhake ing ekstensi. Kanggo file input lan output sampeyan bisa nggunakake jeneng file sing mumpuni. Isi lan format output bakal padha karo dokumen asli.
npm install @aspose/words
Nyalin
const aw = require('@aspose/words');
var doc = new aw.Document("Input.docx")
doc.save("Output.pdf")
const aw = require('@aspose/words');
var doc = new aw.Document("Input.docx")
doc.save("Output.pdf")
const aw = require('@aspose/words');
var doc = new aw.Document("Input.docx")
for (var page = 0; page < doc.pageCount; page++) {
var extractedPage = doc.extractPages(page, 1);
extractedPage.save(`Output_${page + 1}.pdf`);
}
const aw = require('@aspose/words');
var doc = new aw.Document()
var builder = new aw.DocumentBuilder(doc)
builder.insertImage("Input.docx")
doc.save("Output.pdf")
const aw = require('@aspose/words');
var doc = new aw.Document()
var builder = new aw.DocumentBuilder(doc)
shape = builder.insertImage("Input.docx")
shape.getShapeRenderer().save("Output.pdf", new aw.Saving.ImageSaveOptions(aw.SaveFormat.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.