DOC Optimization API का उपयोग करके Node.js में DOC प्रोसेसिंग सॉफ़्टवेयर विकसित करें। यह शक्तिशाली Node.js समाधान आपको आसानी से DOC फ़ाइलों के आकार को अनुकूलित और कम करने में मदद करता है। ऑनलाइन DOC कंप्रेसिंग क्षमताओं का निःशुल्क परीक्षण करें!
गुणवत्ता की हानि के बिना बड़ी DOC फ़ाइलों को छोटा करें। अनावश्यक और अप्रयुक्त डेटा हटाएं। कोड में DOC फ़ाइल का आकार सिकोड़ें। JavaScript लाइब्रेरी डेवलपर्स को DOC सामग्री को अनुकूलित करने के लिए एक एकीकृत एपीआई प्रदान करती है।
JavaScript पुस्तकालय एक अकेला समाधान है और इसके लिए किसी तृतीय पक्ष सॉफ़्टवेयर को स्थापित करने की आवश्यकता नहीं है।
दोषरहित संपीड़न और गहरी सामग्री अनुकूलन 'Aspose.Words for Node.js via .NET' साथ आसान बना दिया। निम्न उदाहरण दर्शाता है कि JavaScript में JavaScript DOC फ़ाइल की सामग्री को कैसे अनुकूलित किया जाए:
npm install @aspose/words
प्रतिलिपि
const aw = require('@aspose/words');
var doc = new aw.Document("Input.doc");
doc.cleanup();
var shapes = doc.getChildNodes(aw.NodeType.Shape, true)
for (var shape of shapes) {
if (shape.hasImage()) {
// छवि संपीड़न के लिए लाइब्रेरी चुनना डेवलपर पर निर्भर है ।.
const imageData = shape.getImageData().toStream();
// ...
// छवि को संपीड़ित करें और इसे वापस आकार में सेट करें ।.
shape.getImageData().setImage(compressedImageBuffer);
}
}
doc.save("Output.doc")
const aw = require('@aspose/words');
var doc = new aw.Document("Input.doc");
doc.cleanup();
var shapes = doc.getChildNodes(aw.NodeType.Shape, true)
for (var shape of shapes) {
if (shape.hasImage()) {
// छवि संपीड़न के लिए लाइब्रेरी चुनना डेवलपर पर निर्भर है ।.
const imageData = shape.getImageData().toStream();
// ...
// छवि को संपीड़ित करें और इसे वापस आकार में सेट करें ।.
shape.getImageData().setImage(compressedImageBuffer);
}
}
var saveOptions = new aw.Saving.PdfSaveOptions()
saveOptions.cacheBackgroundGraphics = true
doc.save("Output.doc", saveOptions)
const aw = require('@aspose/words');
var doc = new aw.Document("Input.doc");
doc.cleanup();
var shapes = doc.getChildNodes(aw.NodeType.Shape, true)
for (var shape of shapes) {
if (shape.hasImage()) {
// छवि संपीड़न के लिए लाइब्रेरी चुनना डेवलपर पर निर्भर है ।.
const imageData = shape.getImageData().toStream();
// ...
// छवि को संपीड़ित करें और इसे वापस आकार में सेट करें ।.
shape.getImageData().setImage(compressedImageBuffer);
}
}
doc.save("Output.doc")
const aw = require('@aspose/words');
var doc = new aw.Document("Input.doc");
doc.cleanup();
var shapes = doc.getChildNodes(aw.NodeType.Shape, true)
for (var shape of shapes) {
if (shape.hasImage()) {
// छवि संपीड़न के लिए लाइब्रेरी चुनना डेवलपर पर निर्भर है ।.
const imageData = shape.getImageData().toStream();
// ...
// छवि को संपीड़ित करें और इसे वापस आकार में सेट करें ।.
shape.getImageData().setImage(compressedImageBuffer);
}
}
var saveOptions = new aw.Saving.OoxmlSaveOptions()
saveOptions.compressionLevel = aw.Saving.CompressionLevel.Maximum
doc.save("Output.doc", saveOptions)
const aw = require('@aspose/words');
var doc = new aw.Document()
var builder = new aw.DocumentBuilder(doc)
shape = builder.insertImage("Input.doc")
var saveOptions = new aw.Saving.ImageSaveOptions(aw.SaveFormat.Doc)
shape.getShapeRenderer().save("Output.doc", saveOptions)
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.
आप कई अन्य फ़ाइल स्वरूपों में फ़ाइलों को अनुकूलित कर सकते हैं: