Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
What is this page about?
This page explains low-code options for using Aspose.Words, including automating common document-processing tasks with minimal code.
Aspose.Words for .NET provides the Aspose.Words.LowCode namespace, which simplifies common document processing tasks. This API is designed for developers who want to accomplish high-level operations such as document comparison, content extraction, image conversion, and text replacement with minimal effort.
The LowCode API is ideal for scenarios where quick implementation is more important than fine-grained control. Let’s take a closer look at the LowCode capabilities of Aspose.Words for .NET.
The Aspose.Words.LowCode namespace currently supports:
Aspose.Words for .NET supports both Fluent and Non-Fluent APIs, allowing developers to choose the style that best fits their coding preferences and project needs. Let’s look at some examples to see how these two types of API differ.
Use LowCode to compare two Word documents and save the result.
non-fluent api example:
string firstDoc = "Document1.docx";
string secondDoc = "Document2.docx";
string outputDoc = "Compared.docx";
LowCodeComparer.Compare(firstDoc, secondDoc, outputDoc);
fluent api example:
string firstDoc = "Document1.docx";
string secondDoc = "Document2.doc";
Comparer.Create()
.From(firstDoc)
.From(secondDoc)
.To("CompareDocuments.1.docx")
.Execute();
You can also pass CompareOptions for fine-tuned comparison.
non-fluent api example:
string firstDoc = "Document1.docx";
string secondDoc = "Document2.docx";
string outputDoc = "Compared.docx";
CompareOptions options = new CompareOptions
{
IgnoreFormatting = true,
IgnoreCaseChanges = true
};
LowCodeComparer.Compare(firstDoc, secondDoc, outputDoc, options);
fluent api example:
string firstDoc = "Document1.docx";
string secondDoc = "Document2.doc";
ComparerContext comparerContext = new ComparerContext();
comparerContext.CompareOptions.IgnoreCaseChanges = true;
Comparer.Create(comparerContext)
.From(firstDoc)
.From(secondDoc)
.To("CompareDocuments.3.docx")
.Execute();
Use LowCode to convert Word document to PDF.
non-fluent api example:
string inputDoc = "Input.docx";
string outputDoc = "Output.pdf";
Converter.Convert(inputDoc, outputDoc);
fluent api example:
string inputDoc = "Input.docx";
string outputDoc = "Output.pdf";
Converter.Create()
.From(inputDoc)
.To(outputDoc)
.Execute();
Use LowCode to quickly replace text across the entire document.
non-fluent api example:
string inputDoc = "Input.docx";
string outputDoc = "Output.docx";
string pattern = "Aspose";
string replacement = "Aspose Pro";
Replacer.Replace(inputDoc, outputDoc, pattern, replacement);
fluent api example:
string inputDoc = "Input.docx";
string outputDoc = "Output.docx";
ReplacerContext replacerContext = new ReplacerContext();
replacerContext.SetReplacement("ReplaceMe", "Replacement");
Replacer.Create(replacerContext)
.From(inputDoc)
.To(outputDoc)
.Execute();
The Aspose.Words.LowCode namespace helps you implement high-level document processing tasks quickly with clean, readable syntax. It is especially useful for developers who need speed, simplicity, and maintainable code when working with Word documents.
To explore more advanced options, you can always combine LowCode APIs with the full Aspose.Words object model. See more Low Code examples in the API documentation.
Q: How can I convert a DOCX file to PDF using the LowCode API?
A: Use the Converter class. In the non‑fluent style call Converter.Convert("input.docx", "output.pdf");. In the fluent style create a context with Converter.Create().From("input.docx").To("output.pdf").Execute();. The API automatically detects the source and target formats from the file extensions.
Q: What is the simplest way to compare two Word documents with the LowCode API?
A: Call LowCodeComparer.Compare("doc1.docx", "doc2.docx", "result.docx"); for a quick comparison. If you need custom options, create a CompareOptions object and pass it as the fourth argument, or use the fluent Comparer.Create().From(...).From(...).To(...).Execute(); with a configured ComparerContext.
Q: Can I split a large document into separate parts using LowCode?
A: Yes. The Splitter class provides a Split method that accepts the source file, output file, and split options. The splitter can divide the document by page count, sections, or custom criteria.
Q: How do I perform a global find‑and‑replace operation with LowCode?
A: Use the Replacer class. For a quick replace: Replacer.Replace("source.docx", "result.docx", "oldText", "newText");. For more control, create a ReplacerContext, set replacements with SetReplacement, and execute via Replacer.Create(context).From(...).To(...).Execute();.
Q: Is a separate license required to use the LowCode API?
A: The LowCode API is covered by the same Aspose.Words license you use for the full library. Apply the license once in your application (e.g., License license = new License(); license.SetLicense("Aspose.Words.lic");). After that, all LowCode classes operate under the same licensing terms.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.