Skip to content

Commit

Permalink
Modified README file
Browse files Browse the repository at this point in the history
  • Loading branch information
Suriya-Balamurugan committed Nov 26, 2024
1 parent ed35e09 commit 2099cb0
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Find and replace text in Word document using C#

The Syncfusion [. NET Word Library](https://www.syncfusion.com/document-processing/word-framework/net/word-library) (DocIO) enables you to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can **find and replace text in a Word document** using C#.
The Syncfusion [.NET Word Library](https://www.syncfusion.com/document-processing/word-framework/net/word-library) (DocIO) enables you to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can **find and replace text in a Word document** using C#.

## Steps to find and replace text programmatically

Step 1: Create a new . NET Core console application project.
Step 1: Create a new .NET Core console application project.

Step 2: Install the [Syncfusion. DocIO. Net. Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).
Step 2: Install the [Syncfusion.DocIO.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).

Step 3: Include the following namespaces in the Program.cs file.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Encrypt Word document using C#

The Syncfusion [. NET Word Library](https://www.syncfusion.com/document-processing/word-framework/net/word-library) (DocIO) enables you to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can **encrypt Word documents** using C#.
The Syncfusion [.NET Word Library](https://www.syncfusion.com/document-processing/word-framework/net/word-library) (DocIO) enables you to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can **encrypt Word documents** using C#.

## Steps to encrypt a Word document programmatically

Step 1: Create a new . NET Core console application project.
Step 1: Create a new .NET Core console application project.

Step 2: Install the [Syncfusion. DocIO. Net. Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).
Step 2: Install the [Syncfusion.DocIO.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).

Step 3: Include the following namespaces in the Program.cs file.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Decrypt Word document using C#

The Syncfusion [.NET Word Library](https://www.syncfusion.com/document-processing/word-framework/net/word-library) (DocIO) enables you to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can **decrypt Word documents** using C#.

## Steps to decrypt a Word document programmatically

Step 1: Create a new .NET Core console application project.

Step 2: Install the [Syncfusion.DocIO.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).

Step 3: Include the following namespaces in the Program.cs file.

```csharp
using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;
using System.IO;
```

Step 4: Add the following code snippet in Program.cs file to decrypt a Word document.

```csharp
using (FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.ReadWrite))
{
//Opens an encrypted Word document.
using (WordDocument document = new WordDocument(fileStream, "syncfusion"))
{
//Removes encryption in Word document.
document.RemoveEncryption();
//Creates file stream.
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
{
//Saves the Word document to file stream.
document.Save(outputStream, FormatType.Docx);
}
}
}
```

More information about the encrypt and decrypt options can be found in this [documentation](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-security) section.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Split Word document by Headings using C#

The Syncfusion [. NET Word Library](https://www.syncfusion.com/document-processing/word-framework/net/word-library) (DocIO) enables you to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can **split a Word document by headings** using C#.
The Syncfusion [.NET Word Library](https://www.syncfusion.com/document-processing/word-framework/net/word-library) (DocIO) enables you to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can **split a Word document by headings** using C#.

## Steps to split Word document by headings programmatically

Step 1: Create a new . NET Core console application project.
Step 1: Create a new .NET Core console application project.

Step 2: Install the [Syncfusion. DocIO. Net. Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).
Step 2: Install the [Syncfusion.DocIO.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).

Step 3: Include the following namespaces in the Program.cs file.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ static void Main(string[] args)
{
//Convert the first page of the Word document into an image.
Stream imageStream = wordDocument.RenderAsImages(0, ExportImageFormat.Jpeg);
//Resets the stream position.
imageStream.Position = 0;
//Creates the output image file stream.
using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/Output.jpeg")))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ using (FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/Template.d
{
//Convert the first page of the Word document into an image.
Stream imageStream = wordDocument.RenderAsImages(0, ExportImageFormat.Jpeg);
//Resets the stream position.
imageStream.Position = 0;
//Creates the output image file stream.
using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/Output.jpeg")))
{
Expand Down

0 comments on commit 2099cb0

Please sign in to comment.