From 084edbda7e324c5065135375981f9d8e2fe7fd73 Mon Sep 17 00:00:00 2001
From: DharanitharanA <97955635+DharanitharanA@users.noreply.github.com>
Date: Tue, 19 Sep 2023 12:41:39 +0530
Subject: [PATCH] ES-846833-Separated Word to PDF, added Harfbuzz link, Added
picture watermark code snippet
---
File-Formats-toc.html | 79 +++++++++++++++++++
File-Formats/DocIO/Applying-Watermark.md | 26 +++++-
.../DocIO/word-to-pdf-linux-docker.md | 1 +
3 files changed, 105 insertions(+), 1 deletion(-)
diff --git a/File-Formats-toc.html b/File-Formats-toc.html
index 0e3900dfb..3b74881a7 100644
--- a/File-Formats-toc.html
+++ b/File-Formats-toc.html
@@ -283,6 +283,85 @@
Working with Document Conversion
- Word File Formats
+ - Word to PDF
+
+
- Word Document to Image
-
diff --git a/File-Formats/DocIO/Applying-Watermark.md b/File-Formats/DocIO/Applying-Watermark.md
index 03caadba9..c2e793517 100644
--- a/File-Formats/DocIO/Applying-Watermark.md
+++ b/File-Formats/DocIO/Applying-Watermark.md
@@ -106,7 +106,31 @@ The following code example illustrates how to add a picture watermark to the Wor
{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" %}
-//DocIO supports picture watermark in Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms alone.
+
+//Creates a new Word document
+WordDocument document = new WordDocument();
+//Adds a section and a paragraph in the document
+document.EnsureMinimal();
+IWParagraph paragraph = document.LastParagraph;
+paragraph.AppendText("AdventureWorks Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company.");
+//Creates a new picture watermark.
+PictureWatermark picWatermark = new PictureWatermark();
+//Sets the scaling to picture.
+picWatermark.Scaling = 120f;
+picWatermark.Washout = true;
+//Sets the picture watermark to document.
+document.Watermark = picWatermark;
+FileStream imageStream = new FileStream("Water lilies.jpg", FileMode.Open, FileAccess.Read);
+BinaryReader br = new BinaryReader(imageStream);
+byte[] image = br.ReadBytes((int)imageStream.Length);
+//Sets the image to the picture watermark.
+picWatermark.LoadPicture(image);
+//Saves the Word document to MemoryStream
+MemoryStream stream = new MemoryStream();
+document.Save(stream, FormatType.Docx);
+//Closes the document
+document.Close();
+
{% endhighlight %}
{% highlight c# tabtitle="C# [Windows-specific]" %}
diff --git a/File-Formats/DocIO/word-to-pdf-linux-docker.md b/File-Formats/DocIO/word-to-pdf-linux-docker.md
index 6d70bb4cc..d752228f9 100644
--- a/File-Formats/DocIO/word-to-pdf-linux-docker.md
+++ b/File-Formats/DocIO/word-to-pdf-linux-docker.md
@@ -21,6 +21,7 @@ Step 2: Install the below NuGet packages as a reference to your project from [Nu
* [Syncfusion.DocIORenderer.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/)
* [SkiaSharp.NativeAssets.Linux v2.80.2](https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.80.2)
+* [HarfBuzzSharp.NativeAssets.Linux v2.8.2.2](https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/2.8.2.2)

