From ad7971a86dcc7458521ed1fc1f7fb61e5e6181e1 Mon Sep 17 00:00:00 2001 From: SujithkumarSekar Date: Tue, 21 Jul 2026 20:15:59 +0530 Subject: [PATCH 001/513] Committing files --- .../Word-document/Compare-Word-documents.md | 159 +++++++++++------- .../Iterating-Word-document-elements.md | 63 +++---- .../Word-document/Merging-Word-documents.md | 44 +++-- .../NET/Word-document/Print-Word-documents.md | 26 +-- .../NET/Word-document/Split-Word-documents.md | 77 +++++---- .../NET/Working-with-Word-document.md | 58 ++++--- 6 files changed, 253 insertions(+), 174 deletions(-) diff --git a/Document-Processing/Word/Word-Library/NET/Word-document/Compare-Word-documents.md b/Document-Processing/Word/Word-Library/NET/Word-document/Compare-Word-documents.md index ea797ad22a..f2ef60b190 100644 --- a/Document-Processing/Word/Word-Library/NET/Word-document/Compare-Word-documents.md +++ b/Document-Processing/Word/Word-Library/NET/Word-document/Compare-Word-documents.md @@ -37,12 +37,15 @@ N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-plat {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Compare-Word-documents/Compare-two-Word-documents/.NET/Compare-Word-documents/Program.cs" %} -//Load the original document. +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; + +// Load the original document. using (FileStream originalDocumentStreamPath = new FileStream("Data/OriginalDocument.docx", FileMode.Open, FileAccess.Read)) { using (WordDocument originalDocument = new WordDocument(originalDocumentStreamPath, FormatType.Docx)) { - //Load the revised document. + // Load the revised document. using (FileStream revisedDocumentStreamPath = new FileStream("Data/RevisedDocument.docx", FileMode.Open, FileAccess.Read)) { using (WordDocument revisedDocument = new WordDocument(revisedDocumentStreamPath, FormatType.Docx)) @@ -50,38 +53,48 @@ using (FileStream originalDocumentStreamPath = new FileStream("Data/OriginalDocu // Compare the original and revised Word documents. originalDocument.Compare(revisedDocument); - //Save the Word document to MemoryStream - MemoryStream stream = new MemoryStream(); - originalDocument.Save(stream, FormatType.Docx); + // Save the Word document to MemoryStream. + using (MemoryStream stream = new MemoryStream()) + { + originalDocument.Save(stream, FormatType.Docx); + // Save the stream to a file. + File.WriteAllBytes("Result.docx", stream.ToArray()); + } } - } - } + } + } } {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Load the original document. +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; + +// Load the original document. using (WordDocument originalDocument = new WordDocument("Data/OriginalDocument.docx", FormatType.Docx)) { - //Load the revised document. + // Load the revised document. using (WordDocument revisedDocument = new WordDocument("Data/RevisedDocument.docx", FormatType.Docx)) - { + { // Compare the original and revised Word documents. originalDocument.Compare(revisedDocument); - //Save the Word document. - originalDocument.Save("Result.docx"); + // Save the Word document. + originalDocument.Save("Result.docx"); } } {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +Imports Syncfusion.DocIO +Imports Syncfusion.DocIO.DLS + ' Load the original document. Using originalDocument As New WordDocument("Data/OriginalDocument.docx", FormatType.Docx) ' Load the revised document. Using revisedDocument As New WordDocument("Data/RevisedDocument.docx", FormatType.Docx) - ' Compare the original document and revised documents. + ' Compare the original and revised Word documents. originalDocument.Compare(revisedDocument) ' Save the Word document. originalDocument.Save("Result.docx") @@ -97,61 +110,74 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Set Author and Date -Compare the two Word documents by setting the author and date for revisions to identify the changes. In DocIO, the default setting for the "author" field is "Author", and the default setting for the "dateTime" field is the current time. +Compare the two Word documents by setting the author and date for revisions to identify the changes. In DocIO, the default author is "Author" and the default date/time is the current time. The following sample uses an overload of the [`Compare`](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html) method that accepts an author and date. The following code example shows how to set the author and date for revision while comparing two Word documents. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Compare-Word-documents/Set-author-and-date/.NET/Program.cs" %} -//Load the original document. +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; + +// Load the original document. using (FileStream originalDocumentStreamPath = new FileStream("Data/OriginalDocument.docx", FileMode.Open, FileAccess.Read)) { using (WordDocument originalDocument = new WordDocument(originalDocumentStreamPath, FormatType.Docx)) { - //Load the revised document. + // Load the revised document. using (FileStream revisedDocumentStreamPath = new FileStream("Data/RevisedDocument.docx", FileMode.Open, FileAccess.Read)) { using (WordDocument revisedDocument = new WordDocument(revisedDocumentStreamPath, FormatType.Docx)) { // Compare the original and revised Word documents. - originalDocument.Compare(revisedDocument,"Nancy Davolio", DateTime.Now.AddDays(-1)); + originalDocument.Compare(revisedDocument, "Nancy Davolio", DateTime.Now.AddDays(-1)); - //Save the Word document to MemoryStream - MemoryStream stream = new MemoryStream(); - originalDocument.Save(stream, FormatType.Docx); + // Save the Word document to MemoryStream. + using (MemoryStream stream = new MemoryStream()) + { + originalDocument.Save(stream, FormatType.Docx); + // Save the stream to a file. + File.WriteAllBytes("Result.docx", stream.ToArray()); + } } - } - } + } + } } {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Load the original document. +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; + +// Load the original document. using (WordDocument originalDocument = new WordDocument("Data/OriginalDocument.docx", FormatType.Docx)) { - //Load the revised document. + // Load the revised document. using (WordDocument revisedDocument = new WordDocument("Data/RevisedDocument.docx", FormatType.Docx)) - { - // Compare the original document and revised documents. - originalDocument.Compare(revisedDocument,"Nancy Davolio", DateTime.Now.AddDays(-1)); - //Save the Word document. - originalDocument.Save("Result.docx"); + { + // Compare the original and revised Word documents. + originalDocument.Compare(revisedDocument, "Nancy Davolio", DateTime.Now.AddDays(-1)); + // Save the Word document. + originalDocument.Save("Result.docx"); } } {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -' Open the original Word document. -Using originalDocument As New WordDocument(originalFilePath, FormatType.Docx) - ' Open the revised Word document. - Using revisedDocument As New WordDocument(revisedFilePath, FormatType.Docx) - ' Compare the original document with the revised document. +Imports Syncfusion.DocIO +Imports Syncfusion.DocIO.DLS + +' Load the original document. +Using originalDocument As New WordDocument("Data/OriginalDocument.docx", FormatType.Docx) + ' Load the revised document. + Using revisedDocument As New WordDocument("Data/RevisedDocument.docx", FormatType.Docx) + ' Compare the original and revised Word documents. originalDocument.Compare(revisedDocument, "Nancy Davolio", DateTime.Now.AddDays(-1)) ' Save the Word document. - originalDocument.Save(resultFilePath) + originalDocument.Save("Result.docx") End Using End Using @@ -176,25 +202,30 @@ The following code example illustrates how to compare two Word documents by igno {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Compare-Word-documents/Ignore-format-changes/.NET/Ignore-format-changes/Program.cs" %} -//Load the original document -using (FileStream originalDocumentStreamPath = new FileStream("OriginalDocument.docx", FileMode.Open, FileAccess.Read)) +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; + +// Load the original document. +using (FileStream originalDocumentStreamPath = new FileStream("Data/OriginalDocument.docx", FileMode.Open, FileAccess.Read)) { using (WordDocument originalDocument = new WordDocument(originalDocumentStreamPath, FormatType.Docx)) { - //Load the revised document - using (FileStream revisedDocumentStreamPath = new FileStream("RevisedDocument.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + // Load the revised document. + using (FileStream revisedDocumentStreamPath = new FileStream("Data/RevisedDocument.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { - using (WordDocument revisedDocument = new WordDocument(revisedDocumentStreamPath, FormatType.Automatic)) + using (WordDocument revisedDocument = new WordDocument(revisedDocumentStreamPath, FormatType.Docx)) { - //Set the Comparison option to detect format changes, whether to detect format changes while comparing two Word documents. + // Set whether to detect format changes while comparing two Word documents. ComparisonOptions compareOptions = new ComparisonOptions(); compareOptions.DetectFormatChanges = false; - //Compare the original document with the revised document + // Compare the original and revised Word documents. originalDocument.Compare(revisedDocument, "Syncfusion", DateTime.Now, compareOptions); - //Save the Word document to MemoryStream + // Save the Word document to MemoryStream. using (MemoryStream stream = new MemoryStream()) { originalDocument.Save(stream, FormatType.Docx); + // Save the stream to a file. + File.WriteAllBytes("Result.docx", stream.ToArray()); } } } @@ -204,36 +235,42 @@ using (FileStream originalDocumentStreamPath = new FileStream("OriginalDocument. {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Load the original document -using (WordDocument originalDocument = new WordDocument("OriginalDocument.docx")) +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; + +// Load the original document. +using (WordDocument originalDocument = new WordDocument("Data/OriginalDocument.docx", FormatType.Docx)) { - //Load the revised document - using (WordDocument revisedDocument = new WordDocument("RevisedDocument.docx")) + // Load the revised document. + using (WordDocument revisedDocument = new WordDocument("Data/RevisedDocument.docx", FormatType.Docx)) { - //Set the Comparison option detect format changes, whether to detect format changes while comparing two Word documents. + // Set whether to detect format changes while comparing two Word documents. ComparisonOptions compareOptions = new ComparisonOptions(); compareOptions.DetectFormatChanges = false; - //Compare the original document with the revised document + // Compare the original and revised Word documents. originalDocument.Compare(revisedDocument, "Syncfusion", DateTime.Now, compareOptions); - //Save the Word document. - originalDocument.Save(output); - } -} + // Save the Word document. + originalDocument.Save("Result.docx"); + } +} {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Load the original document -Using originalDocument As New WordDocument("OriginalDocument.docx") - 'Load the revised document - Using revisedDocument As New WordDocument("RevisedDocument.docx") - 'Set the Comparison option to detect format changes +Imports Syncfusion.DocIO +Imports Syncfusion.DocIO.DLS + +' Load the original document. +Using originalDocument As New WordDocument("Data/OriginalDocument.docx", FormatType.Docx) + ' Load the revised document. + Using revisedDocument As New WordDocument("Data/RevisedDocument.docx", FormatType.Docx) + ' Set whether to detect format changes while comparing two Word documents. Dim compareOptions As New ComparisonOptions() compareOptions.DetectFormatChanges = False - 'Compare the original document with the revised document + ' Compare the original and revised Word documents. originalDocument.Compare(revisedDocument, "Syncfusion", DateTime.Now, compareOptions) - 'Save the Word document - originalDocument.Save(output) + ' Save the Word document. + originalDocument.Save("Result.docx") End Using End Using diff --git a/Document-Processing/Word/Word-Library/NET/Word-document/Iterating-Word-document-elements.md b/Document-Processing/Word/Word-Library/NET/Word-document/Iterating-Word-document-elements.md index c3f21a3288..6a91c9e807 100644 --- a/Document-Processing/Word/Word-Library/NET/Word-document/Iterating-Word-document-elements.md +++ b/Document-Processing/Word/Word-Library/NET/Word-document/Iterating-Word-document-elements.md @@ -7,7 +7,7 @@ documentation: UG --- # Iterating Word document elements -The following are the important points to be remembered while iterating the document elements +The following are the important points to be remembered while iterating the document elements. * Document consists of one or more sections. * Section contains the contents present in Headers, Footers and main document through the instances of [WTextBody](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextBody.html). @@ -15,7 +15,7 @@ The following are the important points to be remembered while iterating the docu ## Remove paragraph with style -The following code example shows how to iterate throughout the Word document and remove the paragraph with a particular style. +The following code example shows how to iterate throughout the Word document and remove the paragraph with a particular style. The sample assumes that the `Template.docx` file contains a paragraph style named "MyStyle". Refer to [create and apply paragraph styles](https://help.syncfusion.com/document-processing/word/word-library/net/create-and-apply-paragraph-style) for adding styles to a document. N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. @@ -28,7 +28,7 @@ using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Autom { foreach (WSection section in document.Sections) { - //Accesses the Body of section where all the contents in document are apart + //Accesses the Body of section where all the contents in document reside WTextBody sectionBody = section.Body; IterateTextBody(sectionBody); WHeadersFooters headersFooters = section.HeadersFooters; @@ -41,6 +41,8 @@ using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Autom document.Save(stream, FormatType.Docx); //Closes the Word document document.Close(); + //Saves the MemoryStream to a file + File.WriteAllBytes("Result.docx", stream.ToArray()); } {% endhighlight %} @@ -50,7 +52,7 @@ WordDocument document = new WordDocument("Template.docx"); //Processes the body contents for each section in the Word document foreach (WSection section in document.Sections) { - //Accesses the Body of section where all the contents in document are apart + //Accesses the Body of section where all the contents in document reside WTextBody sectionBody = section.Body; IterateTextBody(sectionBody); WHeadersFooters headersFooters = section.HeadersFooters; @@ -69,7 +71,7 @@ document.Close(); Dim document As New WordDocument("Template.docx") 'Processes the body contents for each section in the Word document For Each section As WSection In document.Sections - 'Accesses the Body of section where all the contents in document are apart + 'Accesses the Body of section where all the contents in document reside Dim sectionBody As WTextBody = section.Body IterateTextBody(sectionBody) Dim headersFooters As WHeadersFooters = section.HeadersFooters @@ -118,7 +120,7 @@ private static void IterateTextBody(WTextBody textBody) break; case EntityType.BlockContentControl: BlockContentControl blockContentControl = bodyItemEntity as BlockContentControl; - //Iterates to the body items of Block Content Control. + //Iterates through the body items of Block Content Control. IterateTextBody(blockContentControl.TextBody); break; } @@ -155,7 +157,7 @@ private static void IterateTextBody(WTextBody textBody) break; case EntityType.BlockContentControl: BlockContentControl blockContentControl = bodyItemEntity as BlockContentControl; - //Iterates to the body items of Block Content Control. + //Iterates through the body items of Block Content Control. IterateTextBody(blockContentControl.TextBody); break; } @@ -171,7 +173,7 @@ For i As Integer = 0 To textBody.ChildEntities.Count - 1 'Accesses the body items (should be either paragraph, table or block content control) as IEntity Dim bodyItemEntity As IEntity = textBody.ChildEntities(i) 'A Text body has 3 types of elements - Paragraph, Table and Block Content Control - 'decide the element type using EntityType + 'Determines the element type using EntityType Select Case bodyItemEntity.EntityType Case EntityType.Paragraph Dim paragraph As WParagraph = TryCast(bodyItemEntity, WParagraph) @@ -188,7 +190,7 @@ For i As Integer = 0 To textBody.ChildEntities.Count - 1 Exit Select Case EntityType.BlockContentControl Dim BlockContentControl As BlockContentControl = TryCast(bodyItemEntity, BlockContentControl) - 'Iterates to the body items of Block Content Control. + 'Iterates through the body items of Block Content Control. IterateTextBody(BlockContentControl.TextBody) Exit Select End Select @@ -256,7 +258,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Modify Hyperlink Uri -The following code example shows how to iterate throughout the paragraph and modify the hyperlink ([Hyperlink](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyperlink.html)) Uri and specific text ([WTextRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyperlink.html)) with another. +The following code example shows how to iterate throughout the paragraph and modify the hyperlink ([Hyperlink](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyperlink.html)) Uri and specific text ([WTextRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextRange.html)) with another. The sample also replaces the text "Andrew" with "Fuller" and updates any hyperlink whose display text is "HTML" to point to `http://www.w3schools.com/`. These values are sample-specific; update them to suit your document. {% tabs %} @@ -267,7 +269,7 @@ using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Autom { foreach (WSection section in document.Sections) { - //Accesses the Body of section where all the contents in document are apart + //Accesses the Body of section where all the contents in document reside WTextBody sectionBody = section.Body; IterateTextBody(sectionBody); WHeadersFooters headersFooters = section.HeadersFooters; @@ -280,6 +282,8 @@ using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Autom document.Save(stream, FormatType.Docx); //Closes the Word document document.Close(); + //Saves the MemoryStream to a file + File.WriteAllBytes("Result.docx", stream.ToArray()); } {% endhighlight %} @@ -289,11 +293,11 @@ WordDocument document = new WordDocument("Template.docx"); //Processes the body contents for each section in the Word document foreach (WSection section in document.Sections) { - //Accesses the Body of section where all the contents in document are apart + //Accesses the Body of section where all the contents in document reside WTextBody sectionBody = section.Body; IterateTextBody(sectionBody); WHeadersFooters headersFooters = section.HeadersFooters; - //consider that OddHeader & OddFooter are applied to this document + //Consider that OddHeader and OddFooter are applied to this document //Iterates through the TextBody of OddHeader and OddFooter IterateTextBody(headersFooters.OddHeader); IterateTextBody(headersFooters.OddFooter); @@ -307,12 +311,13 @@ document.Close(); Dim document As New WordDocument("Template.docx") 'Processes the body contents for each section in the Word document For Each section As WSection In document.Sections - 'Accesses the Body of section where all the contents in document are apart + 'Accesses the Body of section where all the contents in document reside Dim sectionBody As WTextBody = section.Body IterateTextBody(sectionBody) Dim headersFooters As WHeadersFooters = section.HeadersFooters - 'Considers that OddHeader and OddFooter are applied to this document - 'Iterates through the TextBody of OddHeader and OddFooterIterateTextBody(headersFooters.OddHeader) + 'Assume that OddHeader and OddFooter are applied to this document + 'Iterates through the TextBody of OddHeader and OddFooter + IterateTextBody(headersFooters.OddHeader) IterateTextBody(headersFooters.OddFooter) Next 'Saves and closes the document instance @@ -352,7 +357,7 @@ private static void IterateTextBody(WTextBody textBody) break; case EntityType.BlockContentControl: BlockContentControl blockContentControl = bodyItemEntity as BlockContentControl; - //Iterates to the body items of Block Content Control. + //Iterates through the body items of Block Content Control. IterateTextBody(blockContentControl.TextBody); break; } @@ -386,7 +391,7 @@ private static void IterateTextBody(WTextBody textBody) break; case EntityType.BlockContentControl: BlockContentControl blockContentControl = bodyItemEntity as BlockContentControl; - //Iterates to the body items of Block Content Control. + //Iterates through the body items of Block Content Control. IterateTextBody(blockContentControl.TextBody); break; } @@ -417,7 +422,7 @@ For i As Integer = 0 To textBody.ChildEntities.Count - 1 Exit Select Case EntityType.BlockContentControl Dim BlockContentControl As BlockContentControl = TryCast(bodyItemEntity, BlockContentControl) - 'Iterates to the body items of Block Content Control. + 'Iterates through the body items of Block Content Control. IterateTextBody(BlockContentControl.TextBody) Exit Select End Select @@ -517,17 +522,17 @@ private static void IterateParagraph(ParagraphItemCollection paraItems) } break; case EntityType.TextBox: - //Iterates to the body items of textbox. + //Iterates through the body items of textbox. WTextBox textBox = entity as WTextBox; IterateTextBody(textBox.TextBoxBody); break; case EntityType.Shape: - //Iterates to the body items of shape. + //Iterates through the body items of shape. Shape shape = entity as Shape; IterateTextBody(shape.TextBody); break; case EntityType.InlineContentControl: - //Iterates to the paragraph items of inline content control. + //Iterates through the paragraph items of inline content control. InlineContentControl inlineContentControl = entity as InlineContentControl; IterateParagraph(inlineContentControl.ParagraphItems); break; @@ -568,17 +573,17 @@ private static void IterateParagraph(ParagraphItemCollection paraItems) } break; case EntityType.TextBox: - //Iterates to the body items of textbox. + //Iterates through the body items of textbox. WTextBox textBox = entity as WTextBox; IterateTextBody(textBox.TextBoxBody); break; case EntityType.Shape: - //Iterates to the body items of shape. + //Iterates through the body items of shape. Shape shape = entity as Shape; IterateTextBody(shape.TextBody); break; case EntityType.InlineContentControl: - //Iterates to the paragraph items of inline content control. + //Iterates through the paragraph items of inline content control. InlineContentControl inlineContentControl = entity as InlineContentControl; IterateParagraph(inlineContentControl.ParagraphItems); break; @@ -613,17 +618,17 @@ For i As Integer = 0 To paraItems.Count - 1 End If Exit Select Case EntityType.TextBox - 'Iterates to the body items of textbox. + 'Iterates through the body items of textbox. Dim textBox As WTextBox = TryCast(entity, WTextBox) IterateTextBody(textBox.TextBoxBody) Exit Select Case EntityType.Shape - 'Iterates to the body items of shape. + 'Iterates through the body items of shape. Dim shape As Shape = TryCast(entity, Shape) IterateTextBody(shape.TextBody) Exit Select Case EntityType.InlineContentControl - 'Iterates to the paragraph items of inline content control. + 'Iterates through the paragraph items of inline content control. Dim inlineContentControl As InlineContentControl = TryCast(entity, InlineContentControl) IterateParagraph(inlineContentControl.ParagraphItems) Exit Select @@ -636,8 +641,6 @@ End Sub You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Iterate-document-elements). -T> If you wish to find an item in a Word document rather than iterating through each element one by one, you can use [finding the item functionality](https://help.syncfusion.com/document-processing/word/word-library/net/find-item-in-word-document) to achieve it. - ## See Also * [Why it is not possible to access the Word document contents page by page?](https://support.syncfusion.com/kb/article/18815/why-it-is-not-possible-to-access-the-word-document-contents-page-by-page) diff --git a/Document-Processing/Word/Word-Library/NET/Word-document/Merging-Word-documents.md b/Document-Processing/Word/Word-Library/NET/Word-document/Merging-Word-documents.md index 21b8ea0ad2..8c52648025 100644 --- a/Document-Processing/Word/Word-Library/NET/Word-document/Merging-Word-documents.md +++ b/Document-Processing/Word/Word-Library/NET/Word-document/Merging-Word-documents.md @@ -7,11 +7,13 @@ documentation: UG --- # Merging Word documents -You can merge multiple Word documents into single Word document by using DocIO’s capability of importing contents from one document to another. The imported contents are appended at the end of document. +You can merge multiple Word documents into a single Word document by using DocIO’s capability of importing contents from one document to another. The imported contents are appended at the end of the document. + +By default, the imported contents start on a new page. You can also merge the contents on the same page by adjusting the source document’s first section break, as shown in the following sections. ## Assemblies and NuGet packages required -Refer to the following links for assemblies and NuGet packages required based on platforms to merge Word documents using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO). +Refer to the following links for the assemblies and NuGet packages required for each platform to merge Word documents using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO). * [Merge Word documents assemblies](https://help.syncfusion.com/document-processing/word/word-library/net/assemblies-required) * [Merge Word documents NuGet packages](https://help.syncfusion.com/document-processing/word/word-library/net/nuget-packages-required) @@ -19,25 +21,25 @@ Refer to the following links for assemblies and NuGet packages required based on To quickly start merging Word documents, please check out this video: {% youtube "https://www.youtube.com/watch?v=atOSwzidmdw" %} -## Merge document in new page +## Merging documents in a new page -The following code example illustrates how to import the contents from source document into destination document where the contents are appended. +The following code example illustrates how to import the contents from a source document into a destination document where the contents are appended. N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. {% tabs %} -{% highlight C# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Word-document/Merge-documents-in-new-page/.NET/Merge-documents-in-new-page/Program.cs" %} +{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Word-document/Merge-documents-in-new-page/.NET/Merge-documents-in-new-page/Program.cs" %} FileStream sourceStreamPath = new FileStream(sourceFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); FileStream destinationStreamPath = new FileStream(destinationFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -//Opens an source document from file system through constructor of WordDocument class +//Opens a source document from file system through constructor of WordDocument class using (WordDocument document = new WordDocument(sourceStreamPath, FormatType.Automatic)) { //Opens the destination document WordDocument destinationDocument = new WordDocument(destinationStreamPath, FormatType.Docx); //Imports the contents of source document at the end of destination document destinationDocument.ImportContent(document, ImportOptions.UseDestinationStyles); - //Saves and closes the destination document to MemoryStream + //Saves and closes the destination document to a MemoryStream MemoryStream stream = new MemoryStream(); destinationDocument.Save(stream, FormatType.Docx); destinationDocument.Close(); @@ -54,7 +56,7 @@ WordDocument destinationDocument = new WordDocument(targetFileName); destinationDocument.ImportContent(sourceDocument, ImportOptions.UseDestinationStyles); //Saves the destination document destinationDocument.Save(outputFileName, FormatType.Docx); -//closes the document instances +//Closes the document instances sourceDocument.Close(); destinationDocument.Close(); {% endhighlight %} @@ -68,7 +70,7 @@ Dim destinationDocument As New WordDocument(targetFileName) destinationDocument.ImportContent(sourceDocument, ImportOptions.UseDestinationStyles) 'Saves the destination document destinationDocument.Save(outputFileName, FormatType.Docx) -'closes the document instances +'Closes the document instances sourceDocument.Close() destinationDocument.Close() {% endhighlight %} @@ -79,25 +81,29 @@ You can download a complete working sample from [GitHub](https://github.com/Sync In the resultant document, the imported contents start from a new page followed by existing contents in a destination document. This is the default behavior. -## Merge document in same page +## Merging documents on the same page + +When your requirement is to append the contents on the same page instead of starting from a new page, you need to set the break code of the first section of the source document as [NoBreak](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.SectionBreakCode.html). The following code example illustrates how to import the contents on the same page. -When your requirement is to append the contents from the same page instead of starting from a new page, you need to set the break code of first section of Source document as [NoBreak](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.SectionBreakCode.html). The following code example illustrates the importing contents from the same page. +N> For multi-section source documents, only the first section's break code controls the page break behavior of the imported content. + +N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Word-document/Merge-documents-in-same-page/.NET/Merge-documents-in-same-page/Program.cs" %} FileStream sourceStreamPath = new FileStream(sourceFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); FileStream destinationStreamPath = new FileStream(destinationFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -//Opens an source document from file system through constructor of WordDocument class +//Opens a source document from file system through constructor of WordDocument class using (WordDocument document = new WordDocument(sourceStreamPath, FormatType.Automatic)) { //Opens the destination document WordDocument destinationDocument = new WordDocument(destinationStreamPath, FormatType.Docx); - //Sets the break-code of First section of source document as NoBreak to avoid imported from a new page + //Sets the break code of the first section of the source document as NoBreak to avoid importing from a new page document.Sections[0].BreakCode = SectionBreakCode.NoBreak; //Imports the contents of source document at the end of destination document destinationDocument.ImportContent(document, ImportOptions.UseDestinationStyles); - //Saves and closes the destination document to MemoryStream + //Saves and closes the destination document to a MemoryStream MemoryStream stream = new MemoryStream(); destinationDocument.Save(stream, FormatType.Docx); destinationDocument.Close(); @@ -110,7 +116,7 @@ using (WordDocument document = new WordDocument(sourceStreamPath, FormatType.Aut WordDocument sourceDocument = new WordDocument(sourceFileName); //Opens the destination document WordDocument destinationDocument = new WordDocument(targetFileName); -//Sets the break-code of First section of source document as NoBreak to avoid imported from a new page +//Sets the break code of the first section of the source document as NoBreak to avoid importing from a new page sourceDocument.Sections[0].BreakCode = SectionBreakCode.NoBreak; //Imports the contents of source document at the end of destination document destinationDocument.ImportContent(sourceDocument, ImportOptions.UseDestinationStyles); @@ -126,7 +132,7 @@ destinationDocument.Close(); Dim sourceDocument As New WordDocument(sourceFileName) 'Opens the destination document Dim destinationDocument As New WordDocument(targetFileName) -'Sets the break-code of first section of source document as NoBreak to avoid imported from a new page +'Sets the break code of the first section of the source document as NoBreak to avoid importing from a new page sourceDocument.Sections(0).BreakCode = SectionBreakCode.NoBreak 'Imports the contents of source document at the end of destination document destinationDocument.ImportContent(sourceDocument, ImportOptions.UseDestinationStyles) @@ -141,7 +147,7 @@ destinationDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Merge-documents-in-same-page). -## Maintain Imported List style information +## Maintain imported list style information The following code example shows how to maintain information about imported list styles in a Word document while cloning and merging multiple Word documents. @@ -228,6 +234,10 @@ destinationDocument.Close() {% endtabs %} +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Maintain-Imported-List-Style-Information). + +N> For production use, register a Syncfusion license before merging Word documents. Refer to the [licensing registration guide](https://help.syncfusion.com/document-processing/word/licensing/how-to-register-in-an-application) for details. + ## See Also * [How to merge multiple Word documents in C#, VB.NET](https://support.syncfusion.com/kb/article/11499/how-to-merge-multiple-word-documents-in-c-vb-net) diff --git a/Document-Processing/Word/Word-Library/NET/Word-document/Print-Word-documents.md b/Document-Processing/Word/Word-Library/NET/Word-document/Print-Word-documents.md index c485556971..2ce5f61173 100644 --- a/Document-Processing/Word/Word-Library/NET/Word-document/Print-Word-documents.md +++ b/Document-Processing/Word/Word-Library/NET/Word-document/Print-Word-documents.md @@ -1,6 +1,6 @@ --- title: Print Word documents in C# | DocIO | Syncfusion -description: Learn how to print the Word documents into one using .NET Word (DocIO) library without Microsoft Word or interop dependencies. +description: Learn how to print Word documents using the .NET Word (DocIO) library without Microsoft Word or interop dependencies. platform: document-processing control: DocIO documentation: UG @@ -9,7 +9,7 @@ documentation: UG You can print a Word document by utilizing DocIO’s capability to convert the document into images and .NET framework’s [PrintDocument](https://learn.microsoft.com/en-us/dotnet/api/system.drawing.printing.printdocument?view=dotnet-plat-ext-7.0&viewFallbackFrom=net-5.0) class -Initially you have to render the pages as images as shown below +Initially you have to render the pages of the Word document as images, as shown below. N> Refer to the appropriate tabs in the code snippets section: ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. @@ -20,7 +20,7 @@ N> Refer to the appropriate tabs in the code snippets section: ***C# [Windows-sp WordDocument document = new WordDocument((string)this.textBox.Tag); //Renders the Word document as image Image[] images = document.RenderAsImages(ImageType.Metafile); -//Closes the Word Document +//Closes the Word document document.Close(); {% endhighlight %} @@ -29,15 +29,19 @@ document.Close(); Dim document As New WordDocument(DirectCast(Me.textBox.Tag, String)) 'Renders the Word document as image Dim images As Image() = document.RenderAsImages(ImageType.Metafile) -'Closes the Word Document +'Closes the Word document document.Close() {% endhighlight %} {% endtabs %} -You can specify the printer settings and page settings through the [PrintDocument](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.printing.printdocument?view=net-5.0) class. The [PrintDocument.PrintPage](https://learn.microsoft.com/en-us/dotnet/api/system.drawing.printing.printdocument?view=dotnet-plat-ext-7.0&viewFallbackFrom=net-5.0) event should be handled to layout the document for printing. +## Configuring print settings -The following code example demonstrates how to print the Word document pages that have been rendered as an image: +You can specify the printer settings and page settings through the [PrintDocument](https://learn.microsoft.com/dotnet/api/system.drawing.printing.printdocument) class. The [PrintDocument.PrintPage](https://learn.microsoft.com/dotnet/api/system.drawing.printing.printdocument.printpage) event should be handled to layout the document for printing. The following code example demonstrates how to print the Word document pages that have been rendered as an image, using the `images` array produced in the previous snippet. + +N> Refer to the appropriate tabs in the code snippets section: ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. + +N> `startPageIndex` must be declared as a class-level integer field (initialize it to `0`). The snippet updates it based on the page range chosen in the print dialog. {% tabs %} @@ -66,7 +70,7 @@ if (printDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) endPageIndex = printDialog.PrinterSettings.ToPage; //Hooks the PrintPage event to handle the drawing pages for printing printDialog.Document.PrintPage += new PrintPageEventHandler(PrintPageMethod); - //Print the document + //Prints the document printDialog.Document.Print(); } } @@ -87,14 +91,14 @@ printDialog.PrinterSettings.FromPage = 1 printDialog.PrinterSettings.ToPage = images.Length 'Opens the print dialog box If printDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then - 'Checks whether the selected page range is valid or not + 'Checks whether the selected page range is valid If printDialog.PrinterSettings.FromPage > 0 AndAlso printDialog.PrinterSettings.ToPage <= images.Length Then 'Updates the start page of the document to print startPageIndex = printDialog.PrinterSettings.FromPage - 1 'Updates the end page of the document to print endPageIndex = printDialog.PrinterSettings.ToPage 'Hooks the PrintPage event to handle the drawing pages for printing - printDialog.Document.PrintPage += New PrintPageEventHandler(PrintPageMethod) + AddHandler printDialog.Document.PrintPage, AddressOf PrintPageMethod 'Prints the document printDialog.Document.Print() End If @@ -184,6 +188,8 @@ End Sub You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Print-Word-document). +N> If `RenderAsImages` returns an empty array (for example, an empty document), skip printing and check the input document. Ensure the rendered array length is validated before configuring the page range. + ## See Also -* [How to do silent printing to print the Word document by rendering document pages as Image using Essential® DocIO](https://support.syncfusion.com/kb/article/4546/how-to-do-silent-printing-to-print-the-word-document-by-rendering-document-pages-as-image) \ No newline at end of file +* [How to do silent printing to print the Word document by rendering document pages as image using DocIO](https://support.syncfusion.com/kb/article/4546/how-to-do-silent-printing-to-print-the-word-document-by-rendering-document-pages-as-image) \ No newline at end of file diff --git a/Document-Processing/Word/Word-Library/NET/Word-document/Split-Word-documents.md b/Document-Processing/Word/Word-Library/NET/Word-document/Split-Word-documents.md index 7324de4a34..dda0626926 100644 --- a/Document-Processing/Word/Word-Library/NET/Word-document/Split-Word-documents.md +++ b/Document-Processing/Word/Word-Library/NET/Word-document/Split-Word-documents.md @@ -7,9 +7,9 @@ documentation: UG --- # Split Word documents -The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) allows you to split the large Word document into number of smaller word documents by the sections, headings, bookmarks, and placeholder text in programmatically. +The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) allows you to split a large Word document into a number of smaller Word documents by section, heading, bookmark, and placeholder text programmatically. -By using this feature, you can be able to split/extract the necessary parts from the original document for further processing. +By using this feature, you can split/extract the necessary parts from the original document for further processing. You can save the resultant document as a Word document (DOCX, WordML, DOC), PDF, image, HTML, RTF, and more. @@ -18,14 +18,18 @@ To quickly start splitting Word documents, please check out this video: ## Assemblies and NuGet packages required -Refer to the following links for assemblies and NuGet packages required based on platforms to split Word documents using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO). +Refer to the following links for the assemblies and NuGet packages required for each platform to split Word documents using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO). * [Split Word documents assemblies](https://help.syncfusion.com/document-processing/word/word-library/net/assemblies-required) * [Split Word documents NuGet packages](https://help.syncfusion.com/document-processing/word/word-library/net/nuget-packages-required) +N> For production use, register a Syncfusion license before splitting Word documents. Refer to the [licensing registration guide](https://help.syncfusion.com/document-processing/word/licensing/how-to-register-in-an-application) for details. + +N> The code samples use the namespaces `Syncfusion.DocIO.DLS`, `System.IO`, and `System.Text.RegularExpressions`. Add the corresponding `using`/`Imports` directives for these namespaces before running the samples. + ## Split by Section -The following code example illustrates how to split the Word document by sections. +The following code example illustrates how to split the Word document by section. N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. @@ -33,8 +37,8 @@ N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-plat {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Word-document/Split-by-section/.NET/Split-by-section/Program.cs" %} FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -//Load the template document as stream -using(WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx)) +//Load the template document as a stream +using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx)) { //Iterate each section from Word document for (int i = 0; i < document.Sections.Count; i++) @@ -43,11 +47,13 @@ using(WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx)) WordDocument newDocument = new WordDocument(); //Add cloned section into new Word document newDocument.Sections.Add(document.Sections[i].Clone()); - //Saves the Word document to MemoryStream - FileStream outputStream = new FileStream("Section" + i + ".docx", FileMode.OpenOrCreate, FileAccess.ReadWrite); - newDocument.Save(outputStream, FormatType.Docx); - //Closes the document - newDocument.Close(); + //Saves the Word document to a file stream + using (FileStream outputStream = new FileStream("Section" + i + ".docx", FileMode.OpenOrCreate, FileAccess.ReadWrite)) + { + newDocument.Save(outputStream, FormatType.Docx); + //Closes the document + newDocument.Close(); + } } } {% endhighlight %} @@ -63,7 +69,7 @@ using (WordDocument document = new WordDocument(@"Template.docx")) WordDocument newDocument = new WordDocument(); //Add cloned section into new Word document newDocument.Sections.Add(document.Sections[i].Clone()); - //Save and close the new Word documet + //Save and close the new Word document newDocument.Save("Section" + i + ".docx"); newDocument.Close(); } @@ -90,7 +96,7 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Split-by-section). -## Split by Headings +## Split by Heading The following code example illustrates how to split the Word document by using headings. @@ -99,13 +105,13 @@ The following code example illustrates how to split the Word document by using h {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Word-document/Split-by-heading/.NET/Split-by-heading/Program.cs" %} using (FileStream inputStream = new FileStream("Template.docx", FileMode.Open, FileAccess.Read)) { - //Load the template document as stream + //Load the template document as a stream using (WordDocument document = new WordDocument(inputStream, FormatType.Docx)) { WordDocument newDocument = null; WSection newSection = null; int headingIndex = 0; - /Iterate each section in the Word document. + //Iterate each section in the Word document. foreach (WSection section in document.Sections) { // Clone the section and add into new document. @@ -154,7 +160,7 @@ using (FileStream inputStream = new FileStream("Template.docx", FileMode.Open, F private static WSection AddSection(WordDocument newDocument, WSection section) { - //Create new session based on original document + //Create a new section based on the original document WSection newSection = section.Clone(); newSection.Body.ChildEntities.Clear(); //Remove the first page header. @@ -200,8 +206,8 @@ using (WordDocument doc = new WordDocument("Template.docx")) WordDocument newDocument = null; WSection newSection = null; int headingIndex = 0; - /Iterate each section in the Word document. - foreach (WSection section in document.Sections) + //Iterate each section in the Word document. + foreach (WSection section in doc.Sections) { // Clone the section and add into new document. if (newDocument != null) @@ -248,7 +254,7 @@ using (WordDocument doc = new WordDocument("Template.docx")) private static WSection AddSection(WordDocument newDocument, WSection section) { - //Create new session based on original document + //Create a new section based on the original document WSection newSection = section.Clone(); newSection.Body.ChildEntities.Clear(); //Remove the first page header. @@ -276,7 +282,7 @@ private static void AddEntity(WSection newSection, Entity entity) private static void SaveWordDocument(WordDocument newDocument, string fileName) { - //Save file stream as Word document + //Save the new Word document newDocument.Save(fileName, FormatType.Docx); //Closes the document newDocument.Close(); @@ -291,7 +297,7 @@ Using doc As WordDocument = New WordDocument("Template.docx") Dim newSection As WSection = Nothing Dim headingIndex = 0 'Iterate each section in the Word document. - For Each section As WSection In document.Sections + For Each section As WSection In doc.Sections ' Clone the section and add into new document. If newDocument IsNot Nothing Then newSection = AddSection(newDocument, section) 'Iterate each child entity in the Word document. @@ -302,7 +308,7 @@ Using doc As WordDocument = New WordDocument("Template.docx") Dim paragraph As WParagraph = TryCast(item, WParagraph) 'If paragraph has Heading 1 style, then save the traversed content as separate document. 'And create new document for new heading content. - If paragraph.StyleName Is "Heading 1" Then + If paragraph.StyleName = "Heading 1" Then If newDocument IsNot Nothing Then 'Saves the Word document Dim fileName As String = "Document" & (headingIndex + 1).ToString() & ".docx" @@ -359,7 +365,11 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Split by Bookmark -The following code example illustrates how to split the Word document using bookmarks. +The following code example illustrates how to split the Word document using bookmarks. The [`BookmarksNavigator.MoveToBookmark`](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html) API moves the virtual cursor to a bookmark, and [`GetContent`](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html) returns the bookmark range as a `WordDocumentPart`; calling `WordDocumentPart.GetAsWordDocument()` produces a standalone `WordDocument` containing the bookmark's contents. + +N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. + +N> If a bookmark name contains characters that are invalid in file names (for example, `\`, `/`, `:`, `*`, `?`, `"`, `<`, `>`, `|`), the `Save` call will throw. Sanitize the bookmark name before using it as a file name. {% tabs %} @@ -374,7 +384,7 @@ using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx) //Iterate each bookmark in Word document. foreach (Bookmark bookmark in bookmarkCollection) { - //Move the virtual cursor to the location before the end of the bookmark. + //Move the virtual cursor to the bookmark. bookmarksNavigator.MoveToBookmark(bookmark.Name); //Get the bookmark content as WordDocumentPart. WordDocumentPart documentPart = bookmarksNavigator.GetContent(); @@ -401,7 +411,7 @@ using (WordDocument document = new WordDocument("Template.docx", FormatType.Docx //Iterate each bookmark in Word document. foreach (Bookmark bookmark in bookmarkCollection) { - //Move the virtual cursor to the location before the end of the bookmark. + //Move the virtual cursor to the bookmark. bookmarksNavigator.MoveToBookmark(bookmark.Name); //Get the bookmark content as WordDocumentPart. WordDocumentPart documentPart = bookmarksNavigator.GetContent(); @@ -422,7 +432,7 @@ Using document As WordDocument = New WordDocument("Template.docx", FormatType.Do Dim bookmarkCollection As BookmarkCollection = document.Bookmarks 'Iterate each bookmark in Word document. For Each bookmark As Bookmark In bookmarkCollection - 'Move the virtual cursor to the location before the end of the bookmark. + 'Move the virtual cursor to the bookmark. bookmarksNavigator.MoveToBookmark(bookmark.Name) 'Get the bookmark content as WordDocumentPart. Dim documentPart As WordDocumentPart = bookmarksNavigator.GetContent() @@ -439,9 +449,13 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Split-by-bookmark). -## Split by placeholder text +## Split by Placeholder Text + +The following code example illustrates how to split the Word document using placeholder text. The snippet finds every placeholder of the form `<<…>>`, and inserts `BookmarkStart`/`BookmarkEnd` markers around each *pair* of placeholders (the start placeholder of a pair becomes the bookmark start; the next placeholder becomes the bookmark end). After all pairs are marked, each bookmark is extracted into a standalone document. The algorithm assumes the placeholders appear in start/end pairs; an odd number of placeholders will leave the last one unpaired and should be validated before processing. -The following code example illustrates how to split the Word document using the placeholder text. +N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. + +N> The regular expression `"<<(.*)>>"` is greedy and will match from the first `<<` to the last `>>` in a single line/span. If your placeholders appear on the same line, use a non-greedy pattern such as `"<<(.*?)>>"` to limit each match to a single placeholder. {% tabs %} @@ -644,4 +658,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync * Explore how to split a Word document by section using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/splitbysection#/tailwind). * See how to split a Word document by heading using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/splitbyheading#/tailwind). * See how to split a Word document by bookmark using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/splitbybookmark#/tailwind). -* See how to split a Word document by placeholder using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/splitbyplaceholder#/tailwind). \ No newline at end of file +* See how to split a Word document by placeholder text using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/splitbyplaceholder#/tailwind). + +## See Also + +* [How to split Word document by bookmarks in C#, VB.NET](https://support.syncfusion.com/kb/article/6723/how-to-split-word-document-by-bookmarks-in-c-vb-net) +* [How to split Word document by sections in C#, VB.NET](https://support.syncfusion.com/kb/article/6456/how-to-split-word-document-by-sections-in-c-vb-net) \ No newline at end of file diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md b/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md index 4a61ec8ea8..b299893f74 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md @@ -32,6 +32,7 @@ using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx) {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} +string fileName = "Template.docx"; //Opens an existing document WordDocument inputTemplateDoc = new WordDocument(fileName); //Creates a clone of Input Template @@ -40,10 +41,11 @@ WordDocument clonedDocument = inputTemplateDoc.Clone(); clonedDocument.Save("ClonedDocument.docx"); clonedDocument.Close(); //Closes the input template document instance -sourceDocument.Close(); +inputTemplateDoc.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +Dim fileName As String = "Template.docx" 'Opens an existing document Dim inputTemplateDoc As New WordDocument(fileName) 'Creates a clone of Input Template @@ -52,14 +54,14 @@ Dim clonedDocument As WordDocument = inputTemplateDoc.Clone() clonedDocument.Save("ClonedDocument.docx") clonedDocument.Close() 'Closes the input template document instance -sourceDocument.Close() +inputTemplateDoc.Close() {% endhighlight %} {% endtabs %} You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Clone-whole-Word-document). -You can also create a deep copy of document elements such as sections, paragraphs, Tables, Text, Image, OleObject, Shapes, TextBoxes and etc., The following code example illustrates how to clone the section and save each cloned section as a Word document. +You can also create a deep copy of document elements such as sections, paragraphs, Tables, Text, Image, OleObject, Shapes, TextBoxes, etc. The following code example illustrates how to clone the section and save each cloned section as a Word document. {% tabs %} @@ -67,7 +69,7 @@ You can also create a deep copy of document elements such as sections, paragraph //Creates an instance of WordDocument class FileStream fileStreamPath = new FileStream("SourceDocument.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); WordDocument sourceDocument = new WordDocument(fileStreamPath); -//Processes the each section in the Word document +//Processes each section in the Word document for (int i = 0; i < sourceDocument.Sections.Count;i++) { //Creates new WordDocument instance to add cloned section @@ -86,7 +88,7 @@ sourceDocument.Close(); {% highlight c# tabtitle="C# [Windows-specific]" %} //Opens a source document WordDocument sourceDocument = new WordDocument("SourceDocument.docx"); -//Processes the each section in the Word document +//Processes each section in the Word document for (int i = 0; i < sourceDocument.Sections.Count;i++) { //Creates new WordDocument instance to add cloned section @@ -104,7 +106,7 @@ sourceDocument.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Opens a source document Dim sourceDocument As New WordDocument("SourceDocument.docx") -'Processes the each section in the Word document +'Processes each section in the Word document For i As Integer = 0 To sourceDocument.Sections.Count - 1 'Creates new WordDocument instance to add cloned section Dim destinationDocument As New WordDocument() @@ -122,9 +124,9 @@ sourceDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Split-by-section). -### Link Paragraph and Character Style +## Link Paragraph and Character Style -You can link character styles with paragraph and vice versa in a Word document using [LinkedStyleName](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Style.html#Syncfusion_DocIO_DLS_Style_LinkedStyleName) property. +You can link character styles with paragraph styles, and vice versa in a Word document using [LinkedStyleName](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Style.html#Syncfusion_DocIO_DLS_Style_LinkedStyleName) property. The following code example explains how to link character and paragraph style. @@ -145,7 +147,7 @@ using (WordDocument document = new WordDocument()) //Sets the formatting of the style charStyle.CharacterFormat.Bold = true; charStyle.CharacterFormat.Italic = true; - //Link both paragraph and character style + //Links both paragraph and character style paraStyle.LinkedStyleName = "CharacterStyle"; //Appends the contents into the paragraph document.LastParagraph.AppendText("AdventureWorks Cycles"); @@ -178,8 +180,8 @@ using (WordDocument document = new WordDocument()) //Sets the formatting of the style charStyle.CharacterFormat.Bold = true; charStyle.CharacterFormat.Italic = true; - //Link both paragraph and character style - paraStyle.LinkedStyleName = "CharacterStyle"; + //Links both paragraph and character style + paraStyle.LinkedStyleName = "CharacterStyle"; //Appends the contents into the paragraph document.LastParagraph.AppendText("AdventureWorks Cycles"); //Applies the style to paragraph @@ -196,7 +198,7 @@ using (WordDocument document = new WordDocument()) {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Opens an input Word template +'Creates a new Word document Using document As WordDocument = New WordDocument() 'This method adds a section and a paragraph in the document document.EnsureMinimal() @@ -209,7 +211,7 @@ Using document As WordDocument = New WordDocument() 'Sets the formatting of the style charStyle.CharacterFormat.Bold = True charStyle.CharacterFormat.Italic = True - 'Link both paragraph and character style + 'Links both paragraph and character style paraStyle.LinkedStyleName = "CharacterStyle" 'Appends the content into the paragraph document.LastParagraph.AppendText("AdventureWorks Cycles") @@ -231,7 +233,7 @@ End Using ## Working with Word document properties -Document properties, also known as metadata, are details about a file that describe or identify it. You can also define the additional custom document properties for the documents by using DocIO Document properties that are classified as two categories. +Document properties, also known as metadata, are details about a file that describe or identify it. You can also define additional custom document properties by using DocIO document properties, which are classified into two categories: * Built-in document properties - includes details such as title, author name, subject, and keywords that identify the document's topic or contents. * Custom document properties - defines the user-defined document properties. @@ -250,7 +252,7 @@ using (WordDocument document = new WordDocument(sourceStreamPath, FormatType.Aut //Accesses the built-in document properties Console.WriteLine("Title - {0}",document.BuiltinDocumentProperties.Title); Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author); - //Modifies or sets the Built-in document properties. + //Modifies or sets the built-in document properties. document.BuiltinDocumentProperties.Author = "Andrew"; document.BuiltinDocumentProperties.LastAuthor = "Steven"; document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0); @@ -275,7 +277,7 @@ WordDocument document = new WordDocument(inputFileName); //Accesses the built-in document properties Console.WriteLine("Title - {0}",document.BuiltinDocumentProperties.Title); Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author); -//Modifies or sets the Built-in document properties. +//Modifies or sets the built-in document properties. document.BuiltinDocumentProperties.Author = "Andrew"; document.BuiltinDocumentProperties.LastAuthor = "Steven"; document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0); @@ -437,7 +439,7 @@ N> 2. In ASP.NET Core and Xamarin platforms, to update page count in a Word doc N> 3. DocIO uses the Word-to-PDF layout engine to update page count. If the required fonts are missing in the environment, alternate fonts are used, which may affect accuracy. [Ensure](https://support.syncfusion.com/kb/article/6821/check-whether-fonts-in-word-document-are-available-in-machine-for-pdf-or-image-conversion) all fonts used in the input document are available for a correct page count. N> 4. In UWP platform, to updates paragraph, word, and character counts in the document using the [UpdateWordCount()](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html#Syncfusion_DocIO_DLS_WordDocument_UpdateWordCount) API. -### Adding Custom Document properties +### Adding custom document properties You add a new custom document properties through [Add](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.CustomDocumentProperties.html#Syncfusion_DocIO_DLS_CustomDocumentProperties_Add_System_String_System_Object_) method of [CustomProperties](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html#Syncfusion_DocIO_DLS_WordDocument_CustomDocumentProperties) class. The following code example illustrates how to add a new custom document properties. @@ -899,22 +901,22 @@ using (FileStream docStream = new FileStream("Input.docx", FileMode.Open, FileAc {% highlight c# tabtitle="C# [Windows-specific]" %} //Load Word document. -using (WordDocument document = new WordDocument(“Input.docx” FormatType.Docx)) +using (WordDocument document = new WordDocument("Input.docx", FormatType.Docx)) { //Disable a flag to hide the background in print layout view. document.Settings.DisplayBackgrounds = false; //Save the Word document. - document.Save(“Sample.docx”), FormatType.Docx); + document.Save("Sample.docx", FormatType.Docx); } {% endhighlight %} -{% highlight vb.net tabtitle="VB.NET [Windows-specific] " %} +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Load Word document. -Using document As WordDocument = New WordDocument(“Input.docx"), FormatType.Docx) +Using document As WordDocument = New WordDocument("Input.docx", FormatType.Docx) 'Disable a flag to hide the background in the print layout view. document.Settings.DisplayBackgrounds = False 'Save the Word document. - document.Save(“Sample.docx"), FormatType.Docx) + document.Save("Sample.docx", FormatType.Docx) End Using {% endhighlight %} @@ -922,6 +924,8 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-document/Hide-backgrounds-in-print-layout-view). +N> This setting affects only the Word client's print-layout view; it does not alter the background stored in the document. + ## Remove background in a Word document You can remove background colors and images in an existing Word document by setting [NoBackground](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BackgroundType.html) as the background type. @@ -948,23 +952,23 @@ using (FileStream docStream = new FileStream("Input.docx", FileMode.Open, FileAc {% highlight c# tabtitle="C# [Windows-specific]" %} //Load Word document. -using (WordDocument document = new WordDocument(“Input.docx” FormatType.Docx)) +using (WordDocument document = new WordDocument("Input.docx", FormatType.Docx)) { //Remove the existing background in the Word document. document.Background.Type = BackgroundType.NoBackground; //Save the Word document. - document.Save(“Sample.docx”), FormatType.Docx); + document.Save("Sample.docx", FormatType.Docx); } {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Load Word document. -Using document As WordDocument = New WordDocument(“Input.docx"), FormatType.Docx) +Using document As WordDocument = New WordDocument("Input.docx", FormatType.Docx) 'Remove the existing background in the Word document. - document.Background.Type = BackgroundType.NoBackground; + document.Background.Type = BackgroundType.NoBackground 'Save the Word document. - document.Save(“Sample.docx"), FormatType.Docx) + document.Save("Sample.docx", FormatType.Docx) End Using {% endhighlight %} From 0078d4059ccd23ad6f4b08c71cf440a64031ccad Mon Sep 17 00:00:00 2001 From: SujithkumarSekar Date: Wed, 22 Jul 2026 23:14:29 +0530 Subject: [PATCH 002/513] Committing files --- .../Word-Library/NET/Working-With-Images.md | 130 +++++---- .../NET/Working-with-Bookmarks.md | 80 +++--- .../Word-Library/NET/Working-with-Fields.md | 36 +-- .../NET/Working-with-Hyperlinks.md | 263 +++++++++++------- .../NET/Working-with-Paragraph.md | 86 +++--- .../Word-Library/NET/Working-with-Sections.md | 44 +-- .../Word-Library/NET/Working-with-Shapes.md | 249 +++++++++-------- .../Word-Library/NET/Working-with-Tables.md | 72 ++--- .../NET/mail-merge/mail-merge-events.md | 61 ++-- .../NET/mail-merge/mail-merge-for-group.md | 27 +- .../mail-merge-for-nested-groups.md | 65 +++-- .../NET/mail-merge/mail-merge-options.md | 63 +++-- .../mail-merge-troubleshooting-tips.md | 32 +-- .../NET/mail-merge/simple-mail-merge.md | 27 +- .../Word-Library/NET/working-with-lists.md | 62 ++--- .../NET/working-with-mail-merge.md | 90 +++--- 16 files changed, 747 insertions(+), 640 deletions(-) diff --git a/Document-Processing/Word/Word-Library/NET/Working-With-Images.md b/Document-Processing/Word/Word-Library/NET/Working-With-Images.md index 9f92204443..2831106967 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-With-Images.md +++ b/Document-Processing/Word/Word-Library/NET/Working-With-Images.md @@ -5,13 +5,15 @@ platform: document-processing control: DocIO documentation: UG --- -# Working with Images in Word document +# Working with Images in a Word document -DocIO provides support for both inline and absolute positioned images. +DocIO provides support for both inline and absolute positioned images. * Inline images: The position of the image is constrained to the lines of text on the page. * Absolute positioned images: The images can be positioned anywhere irrespective of the lines of text. +N> To run the code samples in this topic, install the `Syncfusion.DocIO.Net.Core` (cross-platform) or `Syncfusion.DocIO.Wpf`/`Syncfusion.DocIO.WinForms` (Windows-specific) NuGet package, register your Syncfusion license, and add `using`/`Imports` directives for the `Syncfusion.DocIO` and `Syncfusion.DocIO.DLS` namespaces. + The following code example explains how to add image to the paragraph. N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. @@ -25,8 +27,8 @@ WordDocument document = new WordDocument(); IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph firstParagraph = section.AddParagraph(); -//Adds image to the paragraph -FileStream imageStream = new FileStream(@"Image.png", FileMode.Open, FileAccess.ReadWrite); +//Adds image to the paragraph +FileStream imageStream = new FileStream(@"Image.png", FileMode.Open, FileAccess.Read); IWPicture picture = firstParagraph.AppendPicture(imageStream); //Sets height and width for the image picture.Height = 100; @@ -45,7 +47,7 @@ WordDocument document = new WordDocument(); IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph firstParagraph = section.AddParagraph(); -//Adds image to the paragraph +//Adds image to the paragraph IWPicture picture = firstParagraph.AppendPicture(Image.FromFile("Image.png")); //Sets height and width for the image picture.Height = 100; @@ -63,7 +65,7 @@ Dim document As New WordDocument() Dim section As IWSection = document.AddSection() 'Adds new paragraph to the section Dim firstParagraph As IWParagraph = section.AddParagraph() -'Adds image to the paragraph +'Adds image to the paragraph Dim picture As IWPicture = firstParagraph.AppendPicture(Image.FromFile("Image.png")) 'Sets height and width for the image picture.Height = 100 @@ -82,12 +84,14 @@ You can download a complete working sample from [GitHub](https://github.com/Sync Image present in the document can be replaced with a new image. This can be achieved by iterating through the paragraph items. +N> To identify images by `Title`, the `Title` property must have been set on the picture in the source document (for example, by Microsoft Word's "Alt Text" panel, or by setting `picture.Title` when the picture was created with DocIO). + The following code example explains how to replace an existing image. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Replace-image/.NET/Replace-image/Program.cs" %} -FileStream fileStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.ReadWrite); +FileStream fileStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.Read); //Loads the template document WordDocument document = new WordDocument(fileStream, FormatType.Automatic); WTextBody textbody = document.Sections[0].Body; @@ -103,7 +107,7 @@ foreach (WParagraph paragraph in textbody.Paragraphs) //Replaces the image if (picture.Title == "Bookmark") { - FileStream imageStream = new FileStream(@"Image.png", FileMode.Open, FileAccess.ReadWrite); + FileStream imageStream = new FileStream(@"Image.png", FileMode.Open, FileAccess.Read); picture.LoadImage(imageStream); } } @@ -177,7 +181,7 @@ The following code example explains how to remove the image from the paragraph i {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Remove-image/.NET/Remove-image/Program.cs" %} -FileStream fileStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.ReadWrite); +FileStream fileStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.Read); //Loads the template document WordDocument document = new WordDocument(fileStream, FormatType.Automatic); WTextBody textbody = document.Sections[0].Body; @@ -267,7 +271,7 @@ IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); paragraph.AppendText("This paragraph has picture. "); -FileStream imageStream = new FileStream(@"Image.png", FileMode.Open, FileAccess.ReadWrite); +FileStream imageStream = new FileStream(@"Image.png", FileMode.Open, FileAccess.Read); //Appends new picture to the paragraph WPicture picture = paragraph.AppendPicture(imageStream) as WPicture; //Sets text wrapping style – When the wrapping style is inline, the images are not absolutely positioned. It is added next to the text range. @@ -275,8 +279,8 @@ picture.TextWrappingStyle = TextWrappingStyle.Square; //Sets horizontal and vertical origin picture.HorizontalOrigin = HorizontalOrigin.Page; picture.VerticalOrigin = VerticalOrigin.Paragraph; -//Sets width and height for the paragraph -picture.Width = 150; +//Sets width and height for the picture +picture.Width = 150; picture.Height = 100; //Sets horizontal and vertical position for the picture picture.HorizontalPosition = 200; @@ -313,7 +317,7 @@ picture.TextWrappingStyle = TextWrappingStyle.Square; //Sets horizontal and vertical origin picture.HorizontalOrigin = HorizontalOrigin.Page; picture.VerticalOrigin = VerticalOrigin.Paragraph; -//Sets width and height for the paragraph +//Sets width and height for the picture picture.Width = 150; picture.Height = 100; //Sets horizontal and vertical position for the picture @@ -350,7 +354,7 @@ picture.TextWrappingStyle = TextWrappingStyle.Square 'Sets horizontal and vertical origin picture.HorizontalOrigin = HorizontalOrigin.Page picture.VerticalOrigin = VerticalOrigin.Paragraph -'Sets width and height for the paragraph +'Sets width and height for the picture picture.Width = 150 picture.Height = 100 'Sets horizontal and vertical position for the picture @@ -378,14 +382,14 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Find an image by title -An Image with a specific title can be retrieved by iterating the paragraph items that can be used for further manipulations. +An image with a specific title can be retrieved by iterating the text body child entities (paragraphs, tables, etc.) and the paragraph items within them, so that it can be used for further manipulations. The following code example explains how images can be iterated from the document elements. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Find-an-image-by-title/.NET/Find-an-image-by-title/Program.cs" %} -FileStream fileStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.ReadWrite); +FileStream fileStream = new FileStream(@"Template.docx", FileMode.Open, FileAccess.Read); //Loads an existing Word document into DocIO instance WordDocument document = new WordDocument(fileStream, FormatType.Docx); //Gets textbody content @@ -419,7 +423,7 @@ document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Creates a new Word document +//Loads an existing Word document WordDocument document = new WordDocument("Template.docx"); //Gets textbody content WTextBody textBody = document.Sections[0].Body; @@ -451,7 +455,7 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Creates a new Word document +'Loads an existing Word document Dim document As New WordDocument("Template.docx") 'Gets textbody content Dim textBody As WTextBody = document.Sections(0).Body @@ -481,9 +485,15 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Find-an-image-by-title). -## Add Image caption +## Add image caption + +You can add caption to an image and update the caption numbers (Sequence fields) using [AddCaption](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WPicture.html#Syncfusion_DocIO_DLS_WPicture_AddCaption_System_String_Syncfusion_DocIO_CaptionNumberingFormat_Syncfusion_DocIO_CaptionPosition_) method. The `AddCaption` method accepts the following parameters: -You can add caption to an image and update the caption numbers (Sequence fields) using [AddCaption](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WPicture.html#Syncfusion_DocIO_DLS_WPicture_AddCaption_System_String_Syncfusion_DocIO_CaptionNumberingFormat_Syncfusion_DocIO_CaptionPosition_) method. +* `imageName`: The caption label name (e.g., "Figure", "Table"). +* `captionNumberingFormat`: A `CaptionNumberingFormat` value that controls how the caption number is formatted (e.g., `Roman`, `Number`). +* `captionPosition`: A `CaptionPosition` value that determines whether the caption appears before or after the image (e.g., `AfterImage`, `BeforeImage`). + +N> Call `UpdateDocumentFields()` after adding captions so that the sequence (caption number) fields are computed and rendered in the output. The following code example shows how to add caption to an image. @@ -499,29 +509,29 @@ section.PageSetup.Margins.All = 72; //Adds a paragraph to the section IWParagraph paragraph = section.AddParagraph(); paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; -//Adds image to the paragraph -FileStream imageStream = new FileStream(@"Google.png", FileMode.Open, FileAccess.ReadWrite); +//Adds image to the paragraph +FileStream imageStream = new FileStream(@"Google.png", FileMode.Open, FileAccess.Read); IWPicture picture = paragraph.AppendPicture(imageStream); //Adds Image caption -IWParagraph lastParagragh = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); +IWParagraph lastParagraph = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); //Aligns the caption -lastParagragh.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; +lastParagraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; //Sets after spacing -lastParagragh.ParagraphFormat.AfterSpacing = 12f; +lastParagraph.ParagraphFormat.AfterSpacing = 12f; //Sets before spacing -lastParagragh.ParagraphFormat.BeforeSpacing = 1.5f; +lastParagraph.ParagraphFormat.BeforeSpacing = 1.5f; //Adds a paragraph to the section paragraph = section.AddParagraph(); paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; -//Adds image to the paragraph -imageStream = new FileStream(@"Yahoo.png", FileMode.Open, FileAccess.ReadWrite); +//Adds image to the paragraph +imageStream = new FileStream(@"Yahoo.png", FileMode.Open, FileAccess.Read); picture = paragraph.AppendPicture(imageStream); //Adds Image caption -lastParagragh = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); +lastParagraph = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); //Aligns the caption -lastParagragh.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; +lastParagraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; //Sets before spacing -lastParagragh.ParagraphFormat.BeforeSpacing = 1.5f; +lastParagraph.ParagraphFormat.BeforeSpacing = 1.5f; //Updates the fields in Word document document.UpdateDocumentFields(); //Saves the Word document to MemoryStream. @@ -541,27 +551,27 @@ section.PageSetup.Margins.All = 72; //Adds a paragraph to the section IWParagraph paragraph = section.AddParagraph(); paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; -//Adds image to the paragraph +//Adds image to the paragraph IWPicture picture = paragraph.AppendPicture(Image.FromFile("Google.png")); //Adds Image caption -IWParagraph lastParagragh = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); +IWParagraph lastParagraph = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); //Aligns the caption -lastParagragh.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; +lastParagraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; //Sets after spacing -lastParagragh.ParagraphFormat.AfterSpacing = 12f; +lastParagraph.ParagraphFormat.AfterSpacing = 12f; //Sets before spacing -lastParagragh.ParagraphFormat.BeforeSpacing = 1.5f; +lastParagraph.ParagraphFormat.BeforeSpacing = 1.5f; //Adds a paragraph to the section paragraph = section.AddParagraph(); paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; -//Adds image to the paragraph +//Adds image to the paragraph picture = paragraph.AppendPicture(Image.FromFile("Yahoo.png")); //Adds Image caption -lastParagragh = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); +lastParagraph = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage); //Aligns the caption -lastParagragh.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; +lastParagraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center; //Sets before spacing -lastParagragh.ParagraphFormat.BeforeSpacing = 1.5f; +lastParagraph.ParagraphFormat.BeforeSpacing = 1.5f; //Updates the fields in Word document document.UpdateDocumentFields(); //Saves and closes the document @@ -579,27 +589,27 @@ section.PageSetup.Margins.All = 72 'Adds a paragraph to the section Dim paragraph As IWParagraph = section.AddParagraph paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center -'Adds image to the paragraph +'Adds image to the paragraph Dim picture As IWPicture = paragraph.AppendPicture(Image.FromFile("Google.png")) 'Adds Image caption -Dim lastParagragh As IWParagraph = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage) +Dim lastParagraph As IWParagraph = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage) 'Aligns the caption -lastParagragh.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center +lastParagraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center 'Sets after spacing -lastParagragh.ParagraphFormat.AfterSpacing = 12.0F +lastParagraph.ParagraphFormat.AfterSpacing = 12.0F 'Sets before spacing -lastParagragh.ParagraphFormat.BeforeSpacing = 1.5F +lastParagraph.ParagraphFormat.BeforeSpacing = 1.5F 'Adds a paragraph to the section paragraph = section.AddParagraph paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center -'Adds image to the paragraph +'Adds image to the paragraph picture = paragraph.AppendPicture(Image.FromFile("Yahoo.png")) 'Adds Image caption -lastParagragh = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage) +lastParagraph = picture.AddCaption("Figure", CaptionNumberingFormat.Roman, CaptionPosition.AfterImage) 'Aligns the caption -lastParagragh.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center +lastParagraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center 'Sets before spacing -lastParagragh.ParagraphFormat.BeforeSpacing = 1.5F +lastParagraph.ParagraphFormat.BeforeSpacing = 1.5F 'Updates the fields in Word document document.UpdateDocumentFields() 'Saves and closes the document @@ -619,14 +629,16 @@ By executing the above code example, it generates output Word document as follow To add an SVG image to a paragraph in a Word document using Syncfusion® DocIO, you can use the [AppendPicture](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.IWParagraph.html#Syncfusion_DocIO_DLS_IWParagraph_AppendPicture_System_Byte___System_Byte___) API. -N> To preserve the SVG image in the Word document, pass both the SVG image data and the equivalent bitmap image bytes to DocIO. +N> To preserve the SVG image in the Word document, pass both the SVG image data and a fallback raster image (e.g., PNG) as byte arrays to DocIO. The fallback image is used by viewers that do not support SVG. + +N> SVG image support is available from Syncfusion.DocIO packages version 20.1.0.x and later. The following code example shows how to add an SVG image in a Word document. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Add-svg-image/.NET/Add-svg-image/Program.cs" %} -///Create a new Word document. +//Create a new Word document. using (WordDocument document = new WordDocument()) { //Add a new section to the document. @@ -643,8 +655,10 @@ using (WordDocument document = new WordDocument()) picture.Height = 100; picture.Width = 100; //Save the Word document to MemoryStream. - MemoryStream stream = new MemoryStream(); - document.Save(stream, FormatType.Docx); + using (MemoryStream stream = new MemoryStream()) + { + document.Save(stream, FormatType.Docx); + } } {% endhighlight %} @@ -677,12 +691,12 @@ Using document As New WordDocument() Dim section As IWSection = document.AddSection() ' Add a new paragraph to the section. Dim firstParagraph As IWParagraph = section.AddParagraph() - ' Get the PNG image as a byte array. + ' Get the fallback image (PNG) as a byte array. Dim imageBytes As Byte() = File.ReadAllBytes("Buyers.png") ' Get the SVG image as a byte array. Dim svgData As Byte() = File.ReadAllBytes("Buyers.svg") ' Add SVG image to the paragraph. - Dim picture As IWPicture = firstParagraph.AppendPicture(svgData, ImageType.Metafile, imageBytes) + Dim picture As IWPicture = firstParagraph.AppendPicture(svgData, imageBytes) ' Set height and width for the image. picture.Height = 100 picture.Width = 100 @@ -695,12 +709,9 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Add-svg-image/.NET). -## Online Demo - -* Explore how to insert an image into the Word document using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/imageinsertion#/tailwind). - ## See Also +* [How to insert an image into a Word document (live demo)](https://document.syncfusion.com/demos/word/imageinsertion#/tailwind) using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO). * [How to extract Images from Word document in C# and VB?](https://support.syncfusion.com/kb/article/11829/how-to-extract-images-from-word-document-in-c-and-vb) * [How to replace an image with same size in a Word document](https://support.syncfusion.com/kb/article/17796/how-to-replace-an-image-with-same-size-in-a-word-document) * [How to find and replace an image title in a Word document?](https://support.syncfusion.com/kb/article/18808/how-to-find-and-replace-an-image-title-in-a-word-document) @@ -712,7 +723,6 @@ You can download a complete working sample from [GitHub](https://github.com/Sync * [How to Find and Remove Corrupted Images in .NET Core Word Document?](https://support.syncfusion.com/kb/article/19605/how-to-find-and-remove-corrupted-images-in-net-core-word-document) * [How to Convert Excel Worksheets to Images in .NET Core Word document?](https://support.syncfusion.com/kb/article/20162/how-to-convert-excel-worksheets-to-images-in-net-core-word-document) * [How to resize images to fit owner element in NET Core Word document?](https://support.syncfusion.com/kb/article/21490/how-to-resize-images-to-fit-owner-element-in-net-core-word-document) -* [How to extract all images from ASP.NET Core Word Document?](https://support.syncfusion.com/kb/article/19583/how-to-extract-all-images-from-aspnet-core-word-document) ## Frequently Asked Questions diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Bookmarks.md b/Document-Processing/Word/Word-Library/NET/Working-with-Bookmarks.md index 178a4f920e..f4c2879bca 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Bookmarks.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Bookmarks.md @@ -9,8 +9,8 @@ documentation: UG A bookmark identifies a location or a selection of text within a document that you can name and identify for future reference. -In Essential® DocIO, bookmark is represented by [Bookmark](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html) instance that is a pair of [BookmarkStart](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkStart.html) and [BookmarkEnd](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkEnd.html). -[BookmarkStart](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkStart.html) represents start point of a bookmark and [BookmarkEnd](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkEnd.html) represents end point of a bookmark. Every Word document contains a collection of bookmarks that are accessible through the [Bookmarks](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html#Syncfusion_DocIO_DLS_WordDocument_Bookmarks) property of [WordDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html) class. +In Essential® DocIO, a bookmark is represented by a [Bookmark](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html) instance that is a pair of [BookmarkStart](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkStart.html) and [BookmarkEnd](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkEnd.html). +[BookmarkStart](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkStart.html) represents the start point of a bookmark and [BookmarkEnd](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarkEnd.html) represents the end point of a bookmark. Every Word document contains a collection of bookmarks that are accessible through the [Bookmarks](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html#Syncfusion_DocIO_DLS_WordDocument_Bookmarks) property of [WordDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html) class. To quickly start working with bookmarks in a Word document, please check out this video: {% youtube "https://www.youtube.com/watch?v=8C2-aS8tdLU" %} @@ -34,7 +34,7 @@ IWParagraph paragraph = document.LastParagraph; paragraph.AppendBookmarkStart("Northwind"); //Adds a text between the bookmark start and end into paragraph paragraph.AppendText("The Northwind sample database (Northwind.mdb) is included with all versions of Access. It provides data you can experiment with and database objects that demonstrate features you might want to implement in your own databases."); -//Adds a new bookmark end into paragraph with name " Northwind " +//Adds a new bookmark end into paragraph with name "Northwind" paragraph.AppendBookmarkEnd("Northwind"); //Adds a text after the bookmark end paragraph.AppendText(" Using Northwind, you can become familiar with how a relational database is structured and how the database objects work together to help you enter, store, manipulate, and print your data."); @@ -56,14 +56,14 @@ IWParagraph paragraph = document.LastParagraph; paragraph.AppendBookmarkStart("Northwind"); //Adds a text between the bookmark start and end into paragraph paragraph.AppendText("The Northwind sample database (Northwind.mdb) is included with all versions of Access. It provides data you can experiment with and database objects that demonstrate features you might want to implement in your own databases."); -//Adds a new bookmark end into paragraph with name " Northwind " +//Adds a new bookmark end into paragraph with name "Northwind" paragraph.AppendBookmarkEnd("Northwind"); //Adds a text after the bookmark end paragraph.AppendText(" Using Northwind, you can become familiar with how a relational database is structured and how the database objects work together to help you enter, store, manipulate, and print your data."); //Saves the document in the given name and format document.Save("Bookmarks.docx", FormatType.Docx); -//Releases the resources occupied by WordDocument instance -document.Close(); +//Releases the resources occupied by the WordDocument instance +document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} @@ -77,14 +77,14 @@ Dim paragraph As IWParagraph = document.LastParagraph paragraph.AppendBookmarkStart("Northwind") 'Adds a text between the bookmark start and end into paragraph paragraph.AppendText("The Northwind sample database (Northwind.mdb) is included with all versions of Access. It provides data you can experiment with and database objects that demonstrate features you might want to implement in your own databases.") -'Adds a new bookmark end into paragraph with name " Northwind " +'Adds a new bookmark end into paragraph with name "Northwind" paragraph.AppendBookmarkEnd("Northwind") 'Adds a text after the bookmark end paragraph.AppendText(" Using Northwind, you can become familiar with how a relational database is structured and how the database objects work together to help you enter, store, manipulate, and print your data.") 'Saves the document in the given name and format document.Save("Bookmarks.docx", FormatType.Docx) -'Releases the resources occupied by WordDocument instance -document.Close() +'Releases the resources occupied by the WordDocument instance +document.Close() {% endhighlight %} {% endtabs %} @@ -103,7 +103,7 @@ FileStream fileStreamPath = new FileStream(@"Bookmarks.docx", FileMode.Open, Fil WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); //Gets the bookmark instance by using FindByName method of BookmarkCollection with bookmark name Syncfusion.DocIO.DLS.Bookmark bookmark = document.Bookmarks.FindByName("Northwind"); -//Accesses the bookmark start’s owner paragraph by using bookmark and changes its back color +//Accesses the bookmark start's owner paragraph by using the bookmark and changes its back color bookmark.BookmarkStart.OwnerParagraph.ParagraphFormat.BackColor = Color.AliceBlue; //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); @@ -117,7 +117,7 @@ document.Close(); WordDocument document = new WordDocument("Bookmarks.docx", FormatType.Docx); //Gets the bookmark instance by using FindByName method of BookmarkCollection with bookmark name Syncfusion.DocIO.DLS.Bookmark bookmark = document.Bookmarks.FindByName("Northwind"); -//Accesses the bookmark start’s owner paragraph by using bookmark and changes its back color +//Accesses the bookmark start's owner paragraph by using the bookmark and changes its back color bookmark.BookmarkStart.OwnerParagraph.ParagraphFormat.BackColor = Color.AliceBlue; document.Save("Result.docx", FormatType.Docx); document.Close(); @@ -128,7 +128,7 @@ document.Close(); Dim document As New WordDocument("Bookmarks.docx", FormatType.Docx) 'Gets the bookmark instance by using FindByName method of BookmarkCollection with bookmark name Dim bookmark As Syncfusion.DocIO.DLS.Bookmark = document.Bookmarks.FindByName("Northwind") -'Accesses the bookmark start’s owner paragraph by using bookmark and changes its back color +'Accesses the bookmark start's owner paragraph by using the bookmark and changes its back color bookmark.BookmarkStart.OwnerParagraph.ParagraphFormat.BackColor = Color.AliceBlue document.Save("Result.docx", FormatType.Docx) document.Close() @@ -138,9 +138,9 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Bookmarks/Get-an-instance-of-bookmark). -## Removing a Bookmark from Word document +## Removing a bookmark from a Word document -The following code example shows how to remove a bookmark from Word document. +The following code example shows how to remove a bookmark from a Word document. {% tabs %} @@ -185,14 +185,14 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Bookmarks/Remove-bookmark-from-Word-document). -## Retrieving contents within a bookmark +## Retrieving contents within a bookmark -[BookmarkNavigator](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html) is used for navigating to a bookmark in a Word document. You can retrieve, replace and delete the content of a specified bookmark by using [BookmarkNavigator](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html). +[BookmarkNavigator](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html) is used for navigating to a bookmark in a Word document. You can retrieve, replace, and delete the content of a specified bookmark by using [BookmarkNavigator](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html). You can get the content between bookmark start and bookmark end of the specified bookmark in two ways: -1. You can use [GetBookmarkContent](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html#Syncfusion_DocIO_DLS_BookmarksNavigator_GetBookmarkContent) method for retrieving content as collection of body items when the bookmark start and bookmark end are preserved in a single section. -2. You can use [GetContent](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html#Syncfusion_DocIO_DLS_BookmarksNavigator_GetContent) method for retrieving content as collection of sections when the bookmark start and bookmark end are preserved in different sections. +1. You can use [GetBookmarkContent](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html#Syncfusion_DocIO_DLS_BookmarksNavigator_GetBookmarkContent) method for retrieving content as a collection of body items when the bookmark start and bookmark end are preserved in a single section. +2. You can use [GetContent](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html#Syncfusion_DocIO_DLS_BookmarksNavigator_GetContent) method for retrieving content as a collection of sections when the bookmark start and bookmark end are preserved in different sections. The following code example shows how to retrieve the specified bookmark content by using [GetBookmarkContent](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BookmarksNavigator.html#Syncfusion_DocIO_DLS_BookmarksNavigator_GetBookmarkContent) method in a Word document. @@ -317,7 +317,7 @@ wordDocumentPart.Close() 'Close the template Word document document.Close() newDocument.Save("Result.docx", FormatType.Docx) -'Releases the resources hold by WordDocument instance +'Releases the resources held by the WordDocument instance newDocument.Close() {% endhighlight %} @@ -325,12 +325,12 @@ newDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Bookmarks/Get-bookmark-content-as-document-part). -## Retrieving bookmark contents within a table +## Retrieving bookmark contents within a table You can select the column range for bookmarks inside the tables in Word documents by using [FirstColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_FirstColumn) and [LastColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_LastColumn) properties. -N> 1. [FirstColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_FirstColumn) and [LastColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_LastColumn) properties are valid to select table cells, only when the respective bookmark end and start is present within the same row or next rows of the same table. -N> 2. [FirstColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_FirstColumn) property denotes the top left corner cell and [LastColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_LastColumn) property denotes the bottom right corner cell of rectangular selection region since you can only select the content as a rectangular selection by using bookmarks within the table. +N> 1. [FirstColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_FirstColumn) and [LastColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_LastColumn) properties are valid to select table cells, only when the respective bookmark end and start are present within the same row or next rows of the same table. +N> 2. [FirstColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_FirstColumn) property denotes the top left corner cell and [LastColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_LastColumn) property denotes the bottom right corner cell of rectangular selection region, because bookmark selections inside a table are always rectangular. N> 3. [FirstColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_FirstColumn) property selects from the first cell of the respective row when this property value is negative (or) greater than the cells of a row (or) greater than the [LastColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_LastColumn) value. N> 4. [LastColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_LastColumn) property selects till last cell of the respective row when this property value is negative (or) greater than the cells of a row (or) less than the [FirstColumn](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Bookmark.html#Syncfusion_DocIO_DLS_Bookmark_FirstColumn) value. @@ -357,9 +357,11 @@ bookmarkNavigator.CurrentBookmark.LastColumn = 4; TextBodyPart part = bookmarkNavigator.GetBookmarkContent(); //Adds new section document.AddSection(); -for (int i = 0; i < part.BodyItems.Count; i++) //Adds the retrieved content into another new section -document.LastSection.Body.ChildEntities.Add(part.BodyItems[i]); +for (int i = 0; i < part.BodyItems.Count; i++) +{ + document.LastSection.Body.ChildEntities.Add(part.BodyItems[i]); +} //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); document.Save(stream, FormatType.Docx); @@ -388,9 +390,11 @@ TextBodyPart part = bookmarkNavigator.GetBookmarkContent(); document.AddSection(); //Adds the retrieved content into another new section for (int i = 0; i < part.BodyItems.Count; i++) -document.LastSection.Body.ChildEntities.Add(part.BodyItems[i]); +{ + document.LastSection.Body.ChildEntities.Add(part.BodyItems[i]); +} //Saves and closes the Word document -document.Save("Sample.docx", FormatType.Docx); +document.Save("Result.docx", FormatType.Docx); document.Close(); {% endhighlight %} @@ -630,6 +634,8 @@ FileStream imageStream = new FileStream("Northwind.png", FileMode.Open, FileAcce picture.LoadImage(imageStream); picture.WidthScale = 50; picture.HeightScale = 50; +//Disposes the image stream +imageStream.Dispose(); //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); document.Save(stream, FormatType.Docx); @@ -904,7 +910,7 @@ FileStream fileStreamPath = new FileStream("Bookmarks.docx", FileMode.Open, File WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); //Creates the bookmark navigator instance to access the bookmark BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document); -//Moves the virtual cursor to the location before the end of the bookmark "Northwind " +//Moves the virtual cursor to the location before the end of the bookmark "Northwind" bookmarkNavigator.MoveToBookmark("Northwind"); //Deletes bookmark content without deleting the format in the target document. bookmarkNavigator.DeleteBookmarkContent(false); @@ -920,7 +926,7 @@ document.Close(); WordDocument document = new WordDocument("Bookmarks.docx", FormatType.Docx); //Creates the bookmark navigator instance to access the bookmark BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document); -//Moves the virtual cursor to the location before the end of the bookmark "Northwind " +//Moves the virtual cursor to the location before the end of the bookmark "Northwind" bookmarkNavigator.MoveToBookmark("Northwind"); //Deletes bookmark content without deleting the format in the target document. bookmarkNavigator.DeleteBookmarkContent(false); @@ -951,13 +957,13 @@ You can replace the contents of an existing bookmark with simple text, [TextBody N> You cannot replace the multi section contents into a bookmark within table in Word documents. Use "for loop" instead of "foreach loop" to iterate through document elements when replacing the bookmark contents to avoid “collection modified exception”, as there is a chance for modification in the document elements on replacing the bookmark contents. -As per Microsoft Word behavior, you cannot replace the bookmark contents when the bookmark start and end is not in a same table as following cases: +As per Microsoft Word behavior, you cannot replace the bookmark contents when the bookmark start and end are not in the same table, as in the following cases: -Case 1 +Case 1: Bookmark start and end are present in different tables. ![Bookmark start and end present in different tables](WorkingwithBookmarks_images/WorkingwithBookmarks_img1.jpeg) -Case 2 +Case 2: Bookmark start is placed outside the table and the end is inside the table. ![Bookmark start placed outside table and end in table](WorkingwithBookmarks_images/WorkingwithBookmarks_img2.jpeg) @@ -1055,13 +1061,13 @@ bookmarkNavigator.MoveToBookmark("Northwind"); //Gets the bookmark content as WordDocumentPart WordDocumentPart wordDocumentPart = bookmarkNavigator.GetContent(); //Loads the Word document with bookmark NorthwindDB -FileStream fileStreamPath = new FileStream("Bookmarks.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); +FileStream fileStream = new FileStream("Bookmarks.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); +WordDocument document = new WordDocument(fileStream, FormatType.Docx); //Creates the bookmark navigator instance to access the bookmark bookmarkNavigator = new BookmarksNavigator(document); //Moves the virtual cursor to the location before the end of the bookmark "NorthwindDB" bookmarkNavigator.MoveToBookmark("NorthwindDB"); -//Replaces the bookmark content with word body part +//Replaces the bookmark content with WordDocumentPart bookmarkNavigator.ReplaceContent(wordDocumentPart); //Close the WordDocumentPart instance wordDocumentPart.Close(); @@ -1089,7 +1095,7 @@ WordDocument document = new WordDocument("Bookmarks.docx", FormatType.Docx); bookmarkNavigator = new BookmarksNavigator(document); //Moves the virtual cursor to the location before the end of the bookmark "NorthwindDB" bookmarkNavigator.MoveToBookmark("NorthwindDB"); -//Replaces the bookmark content with word body part +//Replaces the bookmark content with WordDocumentPart bookmarkNavigator.ReplaceContent(wordDocumentPart); //Close the WordDocumentPart instance wordDocumentPart.Close(); @@ -1114,7 +1120,7 @@ Dim document As New WordDocument("Bookmarks.docx", FormatType.Docx) bookmarkNavigator = New BookmarksNavigator(document) 'Moves the virtual cursor to the location before the end of the bookmark "NorthwindDB" bookmarkNavigator.MoveToBookmark("NorthwindDB") -'Replaces the bookmark content with word body part +'Replaces the bookmark content with WordDocumentPart bookmarkNavigator.ReplaceContent(wordDocumentPart) 'Close the WordDocumentPart instance wordDocumentPart.Close() @@ -1152,7 +1158,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync * [How to export content between two bookmarks as HTML in a Word document?](https://support.syncfusion.com/kb/article/20097/how-to-export-content-between-two-bookmarks-as-html-in-a-word-document) * [How to apply a style to bookmark content in a Word document?](https://support.syncfusion.com/kb/article/20093/how-to-apply-a-style-to-bookmark-content-in-a-word-document) * [How to export Bookmarks content as HTML in .NET Core Word Document?](https://support.syncfusion.com/kb/article/22282/how-to-export-bookmarks-content-as-html-in-net-core-word-document) -* [How to Add Bookmarks to All Paragraphs and Retrieve Their Contents in .NET Core Word document?](https://support.syncfusion.com/kb/article/22282/how-to-export-bookmarks-content-as-html-in-net-core-word-document) +* [How to Add Bookmarks to All Paragraphs and Retrieve Their Contents in .NET Core Word document?](https://support.syncfusion.com/kb/article/22282/how-to-add-bookmarks-to-all-paragraphs-and-retrieve-their-contents-in-net-core-word-document) * [How to format bookmark content in ASP.NET Core Word Document?](https://support.syncfusion.com/kb/article/22143/how-to-format-bookmark-content-in-aspnet-core-word-document) * [How to Identify Bookmark Placement in Word Document in .NET Core?](https://support.syncfusion.com/kb/article/22205/how-to-identify-bookmark-placement-in-word-document-in-net-core) * [How to Find Nested Bookmarks in a Word Document in C# .NET Core?](https://support.syncfusion.com/kb/article/22187/how-to-find-nested-bookmarks-in-a-word-document-in-c-net-core) diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Fields.md b/Document-Processing/Word/Word-Library/NET/Working-with-Fields.md index 9fddd4cb80..0c12a2e6bb 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Fields.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Fields.md @@ -9,9 +9,9 @@ documentation: UG Fields in a Word document are placeholders for data that might change on field update. Fields are represented by the [WField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WField.html) and [WFieldMark](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WFieldMark.html) instances in DocIO. A field in a Word document contains field codes, field separator, field result, and field end. -To learn various types of Microsoft Word supported fields and their syntax,refer to the [MSDN article](https://support.microsoft.com/en-us/office/list-of-field-codes-in-word-1ad6d91a-55a7-4a8d-b535-cf7888659a51?ui=en-us&rs=en-us&ad=us#) +To learn various types of Microsoft Word supported fields and their syntax, refer to the [MSDN article](https://support.microsoft.com/en-us/office/list-of-field-codes-in-word-1ad6d91a-55a7-4a8d-b535-cf7888659a51?ui=en-us&rs=en-us&ad=us#) -From v16.1.0.24, the entire field code is included in Document Object Model(DOM). Hence, adding a field will automatically include the following elements in DOM: +From v16.1.0.24, the entire field code is included in Document Object Model (DOM). Hence, adding a field will automatically include the following elements in DOM: 1. [WField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WField.html): Represents the starting of a Field. @@ -505,7 +505,7 @@ paragraph = section.AddParagraph() as WParagraph; //Gets the collection of bookmark start in the word document List items = document.GetCrossReferenceItems(ReferenceType.Bookmark); paragraph.AppendText("Bookmark Cross Reference starts here "); -//Appends the cross reference for bookmark “Title” with ContentText as reference kind +//Appends the cross reference for bookmark "Title" with ContentText as reference kind paragraph.AppendCrossReference(ReferenceType.Bookmark, ReferenceKind.ContentText, items[0], true, false, false, string.Empty); //Updates the document Fields document.UpdateDocumentFields(); @@ -533,7 +533,7 @@ paragraph = section.AddParagraph() as WParagraph; //Gets the collection of bookmark start in the word document List items = document.GetCrossReferenceItems(ReferenceType.Bookmark); paragraph.AppendText("Bookmark Cross Reference starts here "); -//Appends the cross reference for bookmark “Title” with ContentText as reference kind +//Appends the cross reference for bookmark "Title" with ContentText as reference kind paragraph.AppendCrossReference(ReferenceType.Bookmark, ReferenceKind.ContentText, items[0], true, false, false, string.Empty); //Updates the document Fields document.UpdateDocumentFields(); @@ -558,7 +558,7 @@ paragraph = TryCast(section.AddParagraph(), WParagraph) 'Gets the collection of bookmark start in the word document Dim items As List(Of Entity) = document.GetCrossReferenceItems(ReferenceType.Bookmark) paragraph.AppendText("Bookmark Cross Reference starts here ") -'Appends the cross reference for bookmark “Title” with ContentText as reference kind +'Appends the cross reference for bookmark "Title" with ContentText as reference kind paragraph.AppendCrossReference(ReferenceType.Bookmark, ReferenceKind.ContentText, items(0), True, False, False, String.Empty) 'Updates the document Fields document.UpdateDocumentFields() @@ -646,14 +646,14 @@ You can download a complete working sample from [GitHub](https://github.com/Sync N> XE (Index Entry) fields cannot be unlinked. ## Sequence Field -You can use the Sequence (SEQ) field to automatically numbers the chapters, tables, figures, and other items in a Word document. When you add, delete, or move an item in Word document (along with SEQ fields), you can update the remaining SEQ fields with a new sequence. +You can use the Sequence (SEQ) field to automatically number the chapters, tables, figures, and other items in a Word document. When you add, delete, or move an item in Word document (along with SEQ fields), you can update the remaining SEQ fields with a new sequence. You can format the SEQ field using below switches. \c -- Repeats the closest preceding sequence number. \h -- Hides the field result unless a general-formatting-switch is also present. \n -- Inserts the next sequence number for the specified items. This is the default switch. -\r -- Resets the sequence number to the number following “r”. +\r -- Resets the sequence number to the number following "r". \s -- Resets the sequence number at the heading level following the "s". ### Apply Number format @@ -841,7 +841,7 @@ seqField.BookmarkName = "BkmkPurchase"; paragraph = document.LastSection.Paragraphs[5] as WParagraph; seqField = paragraph.ChildEntities[1] as WSeqField; //Adds bookmark reference to the sequence field -seqField.BookmarkName = "BkkmUnitPrice"; +seqField.BookmarkName = "BkmkUnitPrice"; //Updates the document fields document.UpdateDocumentFields(); //Saves the Word document to MemoryStream @@ -852,7 +852,7 @@ document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Opens an exixting word document +//Opens an existing word document WordDocument document = new WordDocument("Template.docx"); //Accesses sequence field in the document WParagraph paragraph = document.LastSection.Body.ChildEntities[4] as WParagraph; @@ -863,7 +863,7 @@ seqField.BookmarkName = "BkmkPurchase"; paragraph = document.LastSection.Paragraphs[5] as WParagraph; seqField = paragraph.ChildEntities[1] as WSeqField; //Adds bookmark reference to the sequence field -seqField.BookmarkName = "BkkmUnitPrice"; +seqField.BookmarkName = "BkmkUnitPrice"; //Updates the document fields document.UpdateDocumentFields(); //Saves and closes the Word document @@ -872,7 +872,7 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Opens an exixting word document +'Opens an existing word document Dim document As WordDocument = New WordDocument("Template.docx") 'Accesses sequence field in the document Dim paragraph As WParagraph = CType(document.LastSection.Body.ChildEntities(4), WParagraph) @@ -883,7 +883,7 @@ seqField.BookmarkName = "BkmkPurchase" paragraph = CType(document.LastSection.Paragraphs(5), WParagraph) seqField = CType(paragraph.ChildEntities(1), WSeqField) 'Adds bookmark reference to the sequence field -seqField.BookmarkName = "BkkmUnitPrice" +seqField.BookmarkName = "BkmkUnitPrice" 'Updates the document fields document.UpdateDocumentFields() 'Saves and closes the Word document @@ -900,7 +900,7 @@ By executing the above code example, it generates output Word document as follow ![Output document of Bookmark referred in SEQ field](workingwithfields_images/file-formats-word-seql-field-bookmark-output.png) ### Reset numbering -You can reset the numbering for sequence field (\r) using [ResetNumber](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSeqField.html#Syncfusion_DocIO_DLS_WSeqField_ResetNumber) property and reset the numbering based on heading level (\s) in the Word document using [ResetHeadingLevel](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSeqField.html#Syncfusion_DocIO_DLS_WSeqField_ResetHeadingLevel) property. +You can reset the numbering for sequence field (\r) using [ResetNumber](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSeqField.html#Syncfusion_DocIO_DLS_WSeqField_ResetNumber) property and reset the numbering based on the heading level (\s) in the Word document using [ResetHeadingLevel](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSeqField.html#Syncfusion_DocIO_DLS_WSeqField_ResetHeadingLevel) property. The following code example shows how to reset the numbering for sequence field. @@ -1534,7 +1534,7 @@ WordDocument document = CreateDocument(); //Accesses sequence field in the document WTable table = document.LastSection.Body.ChildEntities[1] as WTable; WSeqField field = ((table[2, 1].ChildEntities[0] as WParagraph).ChildEntities[0] as WSeqField); -//Enables a flag to to hide the sequence field result +//Enables a flag to hide the sequence field result field.HideResult = true; //Accesses sequence field in the document field = ((table[4, 1].ChildEntities[0] as WParagraph).ChildEntities[0] as WSeqField); @@ -1555,7 +1555,7 @@ WordDocument document = CreateDocument(); //Accesses sequence field in the document WTable table = document.LastSection.Body.ChildEntities[1] as WTable; WSeqField field = ((table[2, 1].ChildEntities[0] as WParagraph).ChildEntities[0] as WSeqField); -//Enables a flag to to hide the sequence field result +//Enables a flag to hide the sequence field result field.HideResult = true; //Accesses sequence field in the document field = ((table[4, 1].ChildEntities[0] as WParagraph).ChildEntities[0] as WSeqField); @@ -1574,7 +1574,7 @@ Dim document As WordDocument = CreateDocument() 'Accesses sequence field in the document Dim table As WTable = CType(document.LastSection.Body.ChildEntities(1), WTable) Dim field As WSeqField = CType(CType(table(2, 1).ChildEntities(0), WParagraph).ChildEntities(0), WSeqField) -'Enables a flag to to hide the sequence field result +'Enables a flag to hide the sequence field result field.HideResult = True 'Accesses sequence field in the document field = CType(CType(table(4, 1).ChildEntities(0), WParagraph).ChildEntities(0), WSeqField) @@ -1779,7 +1779,7 @@ document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Opens an exixting word document +//Opens an existing word document WordDocument document = new WordDocument("Template.docx"); //Accesses sequence field in the document WParagraph paragraph = document.LastSection.Body.ChildEntities[4] as WParagraph; @@ -1794,7 +1794,7 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Opens an exixting word document +'Opens an existing word document Dim document As WordDocument = New WordDocument("Template.docx") 'Accesses sequence field in the document diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Hyperlinks.md b/Document-Processing/Word/Word-Library/NET/Working-with-Hyperlinks.md index 9213d5fa2b..6411d3dab1 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Hyperlinks.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Hyperlinks.md @@ -5,45 +5,75 @@ platform: document-processing control: DocIO documentation: UG --- -# Working with Hyperlinks in Word Library +# Working with Hyperlinks in the Word Library -Hyperlinks have two parts: the address and display content. +Hyperlinks have two parts: the address and the display content. The Syncfusion® .NET Word (DocIO) library supports the following hyperlink types: + +* Web hyperlink +* Email hyperlink +* File hyperlink +* Bookmark hyperlink +* Image hyperlink + +## Prerequisites + +To use the DocIO library, add a reference to the **Syncfusion.DocIO.Net.Core** (cross-platform) or **Syncfusion.DocIO.WinForms** (Windows-specific) NuGet package from [nuget.org](https://www.nuget.org/). For more information, refer to [NuGet packages required](https://help.syncfusion.com/document-processing/word/word-library/net/nuget-packages-required). + +**Starting with v16.2.0.x**, you must also install the **Syncfusion.Licensing** package and register a valid license key in your application. For details, refer to the [Syncfusion licensing documentation](https://help.syncfusion.com/common/essential-studio/licensing/overview). + +The following namespaces are required in the samples below. + +{% tabs %} + +{% highlight c# tabtitle="C#" %} +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +{% endhighlight %} + +{% highlight vb.net tabtitle="VB.NET" %} +Imports Syncfusion.DocIO +Imports Syncfusion.DocIO.DLS +{% endhighlight %} + +{% endtabs %} ## Web hyperlink -The following code example explains how to insert a web link. +The following code example shows how to insert a web link. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Add-web-link/.NET/Add-web-link/Program.cs" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -paragraph.AppendText("Web Hyperlink: "); +paragraph.AppendText("Web hyperlink: "); paragraph = section.AddParagraph(); -//Appends web hyperlink to the paragraph -IWField field = paragraph.AppendHyperlink("http://www.syncfusion.com", "Syncfusion", HyperlinkType.WebLink); -//Saves the Word document to MemoryStream. -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document. +//Appends a web hyperlink to the paragraph +paragraph.AppendHyperlink("http://www.syncfusion.com", "Syncfusion", HyperlinkType.WebLink); +//Saves the Word document to a MemoryStream +using (MemoryStream stream = new MemoryStream()) +{ + document.Save(stream, FormatType.Docx); +} +//Closes the Word document document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -paragraph.AppendText("Web Hyperlink: "); +paragraph.AppendText("Web hyperlink: "); paragraph = section.AddParagraph(); -//Appends web hyperlink to the paragraph -IWField field = paragraph.AppendHyperlink("http://www.syncfusion.com", "Syncfusion", HyperlinkType.WebLink); +//Appends a web hyperlink to the paragraph +paragraph.AppendHyperlink("http://www.syncfusion.com", "Syncfusion", HyperlinkType.WebLink); //Saves the Word document document.Save("Sample.docx", FormatType.Docx); //Closes the document @@ -51,16 +81,16 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Creates a new Word document +'Creates a new Word document Dim document As New WordDocument() 'Adds new section to the document Dim section As IWSection = document.AddSection() 'Adds new paragraph to the section Dim paragraph As IWParagraph = section.AddParagraph() -paragraph.AppendText("Web Hyperlink: ") +paragraph.AppendText("Web hyperlink: ") paragraph = section.AddParagraph() -'Appends web hyperlink to the paragraph -Dim field As IWField = paragraph.AppendHyperlink("http://www.syncfusion.com", "Syncfusion", HyperlinkType.WebLink) +'Appends a web hyperlink to the paragraph +paragraph.AppendHyperlink("http://www.syncfusion.com", "Syncfusion", HyperlinkType.WebLink) 'Saves the Word document document.Save("Sample.docx", FormatType.Docx) 'Closes the document @@ -73,12 +103,12 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Email hyperlink -The following code example illustrates how to add an email link. +The following code example shows how to add an email link. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Add-an-email-link/.NET/Add-an-email-link/Program.cs" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); @@ -86,17 +116,19 @@ IWSection section = document.AddSection(); IWParagraph paragraph = section.AddParagraph(); paragraph.AppendText("Email hyperlink: "); paragraph = section.AddParagraph(); -//Appends Email hyperlink to the paragraph +//Appends an email hyperlink to the paragraph paragraph.AppendHyperlink("mailto:sales@syncfusion.com", "Sales", HyperlinkType.EMailLink); -//Saves the Word document to MemoryStream. -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document. +//Saves the Word document to a MemoryStream +using (MemoryStream stream = new MemoryStream()) +{ + document.Save(stream, FormatType.Docx); +} +//Closes the Word document document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); @@ -104,8 +136,8 @@ IWSection section = document.AddSection(); IWParagraph paragraph = section.AddParagraph(); paragraph.AppendText("Email hyperlink: "); paragraph = section.AddParagraph(); -//Appends Email hyperlink to the paragraph -paragraph.AppendHyperlink("mailto:sales@syncfusion.com","Sales" , HyperlinkType.EMailLink); +//Appends an email hyperlink to the paragraph +paragraph.AppendHyperlink("mailto:sales@syncfusion.com", "Sales", HyperlinkType.EMailLink); //Saves the Word document document.Save("Sample.docx", FormatType.Docx); //Closes the document @@ -113,7 +145,7 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Creates a new Word document +'Creates a new Word document Dim document As New WordDocument() 'Adds new section to the document Dim section As IWSection = document.AddSection() @@ -121,8 +153,8 @@ Dim section As IWSection = document.AddSection() Dim paragraph As IWParagraph = section.AddParagraph() paragraph.AppendText("Email hyperlink: ") paragraph = section.AddParagraph() -'Appends Email hyperlink to the paragraph -paragraph.AppendHyperlink("mailto:sales@syncfusion.com","Sales" , HyperlinkType.EMailLink) +'Appends an email hyperlink to the paragraph +paragraph.AppendHyperlink("mailto:sales@syncfusion.com", "Sales", HyperlinkType.EMailLink) 'Saves the Word document document.Save("Sample.docx", FormatType.Docx) 'Closes the document @@ -135,39 +167,41 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## File hyperlink -The following code example explains how to add a file hyperlink. +The following code example shows how to add a file hyperlink. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Add-file-hyperlink/.NET/Add-file-hyperlink/Program.cs" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -paragraph.AppendText("File Hyperlinks: "); +paragraph.AppendText("File hyperlink: "); paragraph = section.AddParagraph(); -//Appends hyperlink field to the paragraph +//Appends a file hyperlink to the paragraph paragraph.AppendHyperlink(@"Template.docx", "File", HyperlinkType.FileLink); -//Saves the Word document to MemoryStream. -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document. +//Saves the Word document to a MemoryStream +using (MemoryStream stream = new MemoryStream()) +{ + document.Save(stream, FormatType.Docx); +} +//Closes the Word document document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -paragraph.AppendText("File Hyperlinks: "); +paragraph.AppendText("File hyperlink: "); paragraph = section.AddParagraph(); -//Appends hyperlink field to the paragraph -paragraph.AppendHyperlink(@"Template.docx","File", HyperlinkType.FileLink); +//Appends a file hyperlink to the paragraph +paragraph.AppendHyperlink(@"Template.docx", "File", HyperlinkType.FileLink); //Saves the Word document document.Save("Sample.docx", FormatType.Docx); //Closes the document @@ -175,15 +209,15 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Creates a new Word document +'Creates a new Word document Dim document As New WordDocument() 'Adds new section to the document Dim section As IWSection = document.AddSection() 'Adds new paragraph to the section Dim paragraph As IWParagraph = section.AddParagraph() -paragraph.AppendText("File Hyperlinks: ") +paragraph.AppendText("File hyperlink: ") paragraph = section.AddParagraph() -'Appends hyperlink field to the paragraph +'Appends a file hyperlink to the paragraph paragraph.AppendHyperlink("Template.docx", "File", HyperlinkType.FileLink) 'Saves the Word document document.Save("Sample.docx", FormatType.Docx) @@ -202,45 +236,47 @@ The following code example explains how to add a bookmark hyperlink. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Add-bookmark-hyperlink/.NET/Add-bookmark-hyperlink/Program.cs" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -//Creates new Bookmark +//Creates a new bookmark paragraph.AppendBookmarkStart("Introduction"); paragraph.AppendText("Hyperlink"); paragraph.AppendBookmarkEnd("Introduction"); paragraph.AppendText("\nA hyperlink is a reference or navigation element in a document to another section of the same document or to another document that may be on or part of a (different) domain."); paragraph = section.AddParagraph(); -paragraph.AppendText("Bookmark Hyperlink: "); +paragraph.AppendText("Bookmark hyperlink: "); paragraph = section.AddParagraph(); -//Appends Bookmark hyperlink to the paragraph +//Appends a bookmark hyperlink to the paragraph paragraph.AppendHyperlink("Introduction", "Bookmark", HyperlinkType.Bookmark); -//Saves the Word document to MemoryStream. -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document. +//Saves the Word document to a MemoryStream +using (MemoryStream stream = new MemoryStream()) +{ + document.Save(stream, FormatType.Docx); +} +//Closes the Word document document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -//Creates new Bookmark +//Creates a new bookmark paragraph.AppendBookmarkStart("Introduction"); paragraph.AppendText("Hyperlink"); paragraph.AppendBookmarkEnd("Introduction"); paragraph.AppendText("\nA hyperlink is a reference or navigation element in a document to another section of the same document or to another document that may be on or part of a (different) domain."); paragraph = section.AddParagraph(); -paragraph.AppendText("Bookmark Hyperlink: "); +paragraph.AppendText("Bookmark hyperlink: "); paragraph = section.AddParagraph(); -//Appends Bookmark hyperlink to the paragraph +//Appends a bookmark hyperlink to the paragraph paragraph.AppendHyperlink("Introduction", "Bookmark", HyperlinkType.Bookmark); //Saves the Word document document.Save("Sample.docx", FormatType.Docx); @@ -249,21 +285,21 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Creates a new Word document +'Creates a new Word document Dim document As New WordDocument() 'Adds new section to the document Dim section As IWSection = document.AddSection() 'Adds new paragraph to the section Dim paragraph As IWParagraph = section.AddParagraph() -'Creates new Bookmark +'Creates a new bookmark paragraph.AppendBookmarkStart("Introduction") paragraph.AppendText("Hyperlink") paragraph.AppendBookmarkEnd("Introduction") paragraph.AppendText(vbLf & "A hyperlink is a reference or navigation element in a document to another section of the same document or to another document that may be on or part of a (different) domain.") paragraph = section.AddParagraph() -paragraph.AppendText("Bookmark Hyperlink: ") +paragraph.AppendText("Bookmark hyperlink: ") paragraph = section.AddParagraph() -'Appends Bookmark hyperlink to the paragraph +'Appends a bookmark hyperlink to the paragraph paragraph.AppendHyperlink("Introduction", "Bookmark", HyperlinkType.Bookmark) 'Saves the Word document document.Save("Sample.docx", FormatType.Docx) @@ -277,47 +313,51 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Image hyperlink -The display content for the Hyperlinks can also be an image that may redirect to some other contents. +The display content for a hyperlink can also be an image that redirects to other content. The following code example explains how to add an image hyperlink. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Add-image-hyperlink/.NET/Add-image-hyperlink/Program.cs" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -paragraph.AppendText("Image Hyperlink"); +paragraph.AppendText("Image hyperlink: "); paragraph = section.AddParagraph(); -//Creates a new image instance and load image +//Creates a new image instance and loads the image WPicture picture = new WPicture(document); -FileStream imageStream = new FileStream(@"Mountain-200.jpg", FileMode.Open, FileAccess.ReadWrite); -picture.LoadImage(imageStream); -//Appends new image hyperlink to the paragraph +using (FileStream imageStream = new FileStream(@"Mountain-200.jpg", FileMode.Open, FileAccess.ReadWrite)) +{ + picture.LoadImage(imageStream); +} +//Appends an image hyperlink to the paragraph paragraph.AppendHyperlink("http://www.syncfusion.com", picture, HyperlinkType.WebLink); -//Saves the Word document to MemoryStream. -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document. +//Saves the Word document to a MemoryStream +using (MemoryStream stream = new MemoryStream()) +{ + document.Save(stream, FormatType.Docx); +} +//Closes the Word document document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Creates a new Word document +//Creates a new Word document WordDocument document = new WordDocument(); //Adds new section to the document IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -paragraph.AppendText("Image Hyperlink"); +paragraph.AppendText("Image hyperlink: "); paragraph = section.AddParagraph(); -//Creates a new image instance and load image +//Creates a new image instance and loads the image WPicture picture = new WPicture(document); picture.LoadImage(Image.FromFile("Image.png")); -//Appends new image hyperlink to the paragraph +//Appends an image hyperlink to the paragraph paragraph.AppendHyperlink("http://www.syncfusion.com", picture, HyperlinkType.WebLink); //Saves the Word document document.Save("Sample.docx", FormatType.Docx); @@ -326,18 +366,18 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Creates a new Word document +'Creates a new Word document Dim document As New WordDocument() 'Adds new section to the document Dim section As IWSection = document.AddSection() 'Adds new paragraph to the section Dim paragraph As IWParagraph = section.AddParagraph() -paragraph.AppendText("Image Hyperlink") +paragraph.AppendText("Image hyperlink: ") paragraph = section.AddParagraph() -'Creates a new image instance and load image +'Creates a new image instance and loads the image Dim picture As New WPicture(document) picture.LoadImage(Image.FromFile("Image.png")) -'Appends new image hyperlink to the paragraph +'Appends an image hyperlink to the paragraph paragraph.AppendHyperlink("http://www.syncfusion.com", picture, HyperlinkType.WebLink) 'Saves the Word document document.Save("Sample.docx", FormatType.Docx) @@ -356,38 +396,42 @@ The following code example explains how to modify the URL of an existing hyperli {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Modify-url-of-hyperlink/.NET/Modify-url-of-hyperlink/Program.cs" %} -FileStream fileStream = new FileStream(@"Sample.docx", FileMode.Open, FileAccess.ReadWrite); -//Loads the template document -WordDocument document = new WordDocument(fileStream, FormatType.Docx); -WParagraph paragraph = document.LastParagraph; -//Iterates through the paragraph items -foreach (ParagraphItem item in paragraph.ChildEntities) +using (FileStream fileStream = new FileStream(@"Sample.docx", FileMode.Open, FileAccess.ReadWrite)) { - if (item is WField) + //Loads the template document + WordDocument document = new WordDocument(fileStream, FormatType.Docx); + WParagraph paragraph = document.LastParagraph; + //Iterates through the paragraph items + foreach (ParagraphItem item in paragraph.ChildEntities) { - if ((item as WField).FieldType == FieldType.FieldHyperlink) + if (item is WField) { - //Gets the hyperlink field - Hyperlink link = new Hyperlink(item as WField); - if (link.Type == HyperlinkType.WebLink) + if ((item as WField).FieldType == FieldType.FieldHyperlink) { - //Modifies the url of the hyperlink - link.Uri = "http://www.google.com"; - link.TextToDisplay = "Google"; - break; + //Gets the hyperlink field + Hyperlink link = new Hyperlink(item as WField); + if (link.Type == HyperlinkType.WebLink) + { + //Modifies the URL of the hyperlink + link.Uri = "http://www.google.com"; + link.TextToDisplay = "Google"; + break; + } } } } + //Saves the Word document to a MemoryStream + using (MemoryStream stream = new MemoryStream()) + { + document.Save(stream, FormatType.Docx); + } + //Closes the Word document + document.Close(); } -//Saves the Word document to MemoryStream. -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document. -document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Loads the template document +//Loads the template document WordDocument document = new WordDocument("Sample.docx", FormatType.Docx); WParagraph paragraph = document.LastParagraph; //Iterates through the paragraph items @@ -401,7 +445,7 @@ foreach (ParagraphItem item in paragraph.ChildEntities) Hyperlink link = new Hyperlink(item as WField); if (link.Type == HyperlinkType.WebLink) { - //Modifies the url of the hyperlink + //Modifies the URL of the hyperlink link.Uri = "http://www.google.com"; link.TextToDisplay = "Google"; break; @@ -415,17 +459,18 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Loads the template document +'Loads the template document Dim document As New WordDocument("Sample.docx", FormatType.Docx) Dim paragraph As WParagraph = document.LastParagraph 'Iterates through the paragraph items For Each item As ParagraphItem In paragraph.ChildEntities If TypeOf item Is WField Then - If TryCast(item, WField).FieldType = FieldType.FieldHyperlink Then + Dim field As WField = DirectCast(item, WField) + If field.FieldType = FieldType.FieldHyperlink Then 'Gets the hyperlink field - Dim link As New Hyperlink(TryCast(item, WField)) + Dim link As New Hyperlink(field) If link.Type = HyperlinkType.WebLink Then - 'Modifies the url of the hyperlink + 'Modifies the URL of the hyperlink link.Uri = "http://www.google.com" link.TextToDisplay = "Google" Exit For @@ -444,6 +489,8 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## See Also +The following knowledge base articles cover scenarios not discussed above — removing hyperlinks, replacing text with hyperlinks, and stripping hyperlink styling. + * [How to find and modify hyperlink address in Word document in C#, VB.NET](https://support.syncfusion.com/kb/article/12198/find-and-modify-hyperlink-address-in-word-document) * [How to replace particular text with hyperlink in the Word document](https://support.syncfusion.com/kb/article/10326/how-to-replace-the-particular-text-with-hyperlink-in-word-document) * [How to replace the URL of image hyperlink in Word document in C# and VB](https://support.syncfusion.com/kb/article/11259/how-to-replace-url-of-image-hyperlink-in-word-document) diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Paragraph.md b/Document-Processing/Word/Word-Library/NET/Working-with-Paragraph.md index 17c59714a3..d333b3332c 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Paragraph.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Paragraph.md @@ -7,7 +7,7 @@ documentation: UG --- # Working with Paragraph in Word Library -Paragraph is the basic element in a Word document that contains a textual and graphical contents. Each paragraph has its own formatting such as line spacing, alignment, indentation, and more. Within a paragraph, the contents are represented by one or more child elements such as [WTextRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextRange.html), [WPicture](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WPicture.html), and [Hyperlink](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyperlink.html) and more. The [ParagraphItem](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.ParagraphItem.html) is the base class for the child elements of paragraph. The following elements can be the child elements of a paragraph: +Paragraph is the basic element in a Word document that contains textual and graphical content. Each paragraph has its own formatting such as line spacing, alignment, indentation, and more. Within a paragraph, the contents are represented by one or more child elements such as [WTextRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextRange.html), [WPicture](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WPicture.html), [Hyperlink](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyperlink.html), and more. The [ParagraphItem](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.ParagraphItem.html) is the base class for the child elements of paragraph. The following elements can be the child elements of a paragraph: * Text: Represented by an instance of [WTextRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextRange.html). * Image: Represented by an instance of [WPicture](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WPicture.html). @@ -85,34 +85,37 @@ The following code example illustrates how to modify an existing paragraph. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Modify-an-existing-paragraph/.NET/Modify-an-existing-paragraph/Program.cs" %} -FileStream fileStream = new FileStream(@"Test.docx", FileMode.Open, FileAccess.ReadWrite); -//Loads the template document -WordDocument document = new WordDocument(fileStream, FormatType.Docx); -//Gets the text body of first section -WTextBody textBody = document.Sections[0].Body; -//Gets the paragraph at index 1 -WParagraph paragraph = textBody.Paragraphs[1]; -//Iterates through the child elements of paragraph -foreach (ParagraphItem item in paragraph.ChildEntities) +//Opens the file as Stream +using (FileStream fileStream = new FileStream(@"Test.docx", FileMode.Open, FileAccess.ReadWrite)) { - if (item is WTextRange) + //Loads the template document + WordDocument document = new WordDocument(fileStream, FormatType.Docx); + //Gets the text body of first section + WTextBody textBody = document.Sections[0].Body; + //Gets the paragraph at index 1 + WParagraph paragraph = textBody.Paragraphs[1]; + //Iterates through the child elements of paragraph + foreach (ParagraphItem item in paragraph.ChildEntities) { - WTextRange text = item as WTextRange; - //Modifies the character format of the text - text.CharacterFormat.Bold = true; - break; + if (item is WTextRange) + { + WTextRange text = item as WTextRange; + //Modifies the character format of the text + text.CharacterFormat.Bold = true; + break; + } } + //Saves the Word document to MemoryStream + MemoryStream stream = new MemoryStream(); + document.Save(stream, FormatType.Docx); + //Closes the Word document + document.Close(); } -///Saves the Word document to MemoryStream -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document -document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} //Loads the template document -WordDocument document = new WordDocument("Template.docx"); +WordDocument document = new WordDocument("Test.docx"); //Gets the text body of first section WTextBody textBody = document.Sections[0].Body; //Gets the paragraph at index 1 @@ -136,7 +139,7 @@ document.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Loads the template document -Dim document As New WordDocument("Template.docx") +Dim document As New WordDocument("Test.docx") 'Gets the text body of first section Dim textBody As WTextBody = document.Sections(0).Body 'Gets the paragraph at index 1 @@ -423,6 +426,8 @@ A tab stop is a horizontal position that is set for aligning text of the paragra Each paragraph has its own tab stop collection where the new tab stop can be added and existing tab stop can be removed. +N> The tab position value is specified in points (1 inch = 72 points). + The following code example explains how to add tab stops to the paragraph. {% tabs %} @@ -496,6 +501,8 @@ You can download a complete working sample from [GitHub](https://github.com/Sync You can set RTL (Right-to-left) direction to the paragraph in a Word document. The following code example shows how to set RTL (Right-to-left) for a paragraph in Word document. +N> Setting RTL (Right-to-left) direction also affects the alignment of the paragraph. Set the `HorizontalAlignment` to `Right` for proper RTL alignment. + {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/RTL-paragraph/.NET/RTL-paragraph/Program.cs" %} @@ -761,6 +768,8 @@ You can remove the styles present in the existing document using the [Remove](ht The following code example explains how to remove the style from the word document. +N> Removing a style that is applied to paragraphs will revert those paragraphs to the default formatting. Built-in styles cannot be removed using this method. + {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Word-document/Remove-particular-style-from-document/.NET/Remove-particular-style-from-document/Program.cs" %} @@ -802,7 +811,7 @@ Dim styleCollection As IStyleCollection = document.Styles 'Finds the style with the name "Style1." Dim style As WParagraphStyle = CType(styleCollection.FindByName("Style1"), WParagraphStyle) 'Remove the "Style1" style from the Word document. -style.Remove +style.Remove() 'Saves and closes the document instance. document.Save("Sample.docx", FormatType.Docx) document.Close() @@ -831,7 +840,7 @@ IWParagraph firstParagraph = section.AddParagraph(); IWTextRange firstText = firstParagraph.AppendText("A new text is added to the paragraph."); firstText.CharacterFormat.FontSize = 14; firstText.CharacterFormat.Bold = true; -firstText.CharacterFormat.TextColor = Color.Green; +firstText.CharacterFormat.TextColor = Syncfusion.Drawing.Color.Green; //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); document.Save(stream, FormatType.Docx); @@ -977,11 +986,11 @@ firstText.CharacterFormat.Shadow = true; firstText.CharacterFormat.SmallCaps = true; IWTextRange secondText = firstParagraph.AppendText("This the second text range"); //Apply formatting for second text range -secondText.CharacterFormat.HighlightColor = Color.GreenYellow; +secondText.CharacterFormat.HighlightColor = Syncfusion.Drawing.Color.GreenYellow; secondText.CharacterFormat.UnderlineStyle = UnderlineStyle.DotDash; secondText.CharacterFormat.Italic = true; secondText.CharacterFormat.FontName = "Times New Roman"; -secondText.CharacterFormat.TextColor = Color.Green; +secondText.CharacterFormat.TextColor = Syncfusion.Drawing.Color.Green; //Add new paragraph to the section IWParagraph secondParagraph = section.AddParagraph(); //Add new text to the paragraph @@ -1138,7 +1147,9 @@ For further information, click [here](https://help.syncfusion.com/document-proce ## Working with symbols -Symbols are used to add contents such as currencies, numbers, punctuations, etc. DocIO represents symbols with [WSymbol](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSymbol.html) instance. Each symbol can be identified with their character codes. +Symbols are used to add contents such as currencies, numbers, punctuation, etc. DocIO represents symbols with [WSymbol](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSymbol.html) instance. Each symbol can be identified with their character codes. + +N> The character code corresponds to the symbol's position in the selected font's character map. Refer the [WSymbol](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSymbol.html) API for details on character codes and font names. The following code example explains how to add new symbol to the document. @@ -1232,7 +1243,7 @@ document.Close(); {% highlight c# tabtitle="C# [Windows-specific]" %} //Loads the template document -WordDocument document = new WordDocument("Sample.docx", FormatType.Docx); +WordDocument document = new WordDocument("Sample1.docx", FormatType.Docx); //Gets the textbody content WTextBody textbody = document.Sections[0].Body; //Iterates through the paragraphs @@ -1293,7 +1304,7 @@ Breaks allow the document contents to split into multiple parts to customize the * Page break: Starts the content on the next page. * Line break: Starts the content in a new line. * Column break: Starts the content in the next column. -* Text wrapping break: Starts the content below to the picture, table, or other items. +* Text wrapping break: Starts the content below the picture, table, or other items. The following code example explains how various types of breaks can be appended to the paragraphs. @@ -1397,7 +1408,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ### Text wrapping break -When including images or other objects in a Word document, the text is wrapped around the objects as per wrapping behavior. If you wish to move the text below to the picture (as like caption), instead of adding an extra line break or empty paragraphs, you can add the text wrapping break to achieve it. +When including images or other objects in a Word document, the text is wrapped around the objects as per wrapping behavior. If you wish to move the text below the picture (as a caption), instead of adding an extra line break or empty paragraphs, you can add the text wrapping break to achieve it. The following code example illustrates how to insert a text wrapping break to move the text below to the picture. @@ -1475,7 +1486,7 @@ For further information, click [here](https://help.syncfusion.com/document-proce ## Working with Text Box -Text box contains a group of textual and graphical contents. DocIO supports to create and manipulate the text box and its formatting by using the [WTextBox](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextBox.html) instance. +Text box contains a group of textual and graphical contents. DocIO supports creating and manipulating the text box and its formatting by using the [WTextBox](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextBox.html) instance. The following code example explains how to add new text box to the paragraph. @@ -1495,10 +1506,12 @@ IWParagraph textboxParagraph = textbox.TextBoxBody.AddParagraph(); textboxParagraph.AppendText("Text inside text box"); textboxParagraph = textbox.TextBoxBody.AddParagraph(); //Adds new picture to textbox body -FileStream imagestream = new FileStream(@"Mountain-200.jpg", FileMode.Open, FileAccess.ReadWrite); -IWPicture picture = textboxParagraph.AppendPicture(imagestream); -picture.Height = 75; -picture.Width = 50; +using (FileStream imagestream = new FileStream(@"Mountain-200.jpg", FileMode.Open, FileAccess.ReadWrite)) +{ + IWPicture picture = textboxParagraph.AppendPicture(imagestream); + picture.Height = 75; + picture.Width = 50; +} //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); document.Save(stream, FormatType.Docx); @@ -1560,6 +1573,8 @@ Text box has its own formatting such as outline color, fill effects, text direct The following code example explains how to apply formatting and rotation for text box. +N> The valid value for `Rotation` ranges from 0 to 359 degrees. + {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Format-and-rotate-text-box/.NET/Format-and-rotate-text-box/Program.cs" %} @@ -1701,7 +1716,6 @@ You can download a complete working sample from [GitHub](https://github.com/Sync * [How to find and modify hyperlink address in Word document?](https://support.syncfusion.com/kb/article/12198/find-and-modify-hyperlink-address-in-word-document) * [How to change the character/symbol used for bullet points in Word document?](https://support.syncfusion.com/kb/article/12099/how-to-change-the-character-symbol-used-for-bullet-points-in-word-document) * [How to resize list character in a Word document?](https://support.syncfusion.com/kb/article/12327/how-to-resize-list-character-in-a-word-document) -* [How to resize list character in a Word document?](https://support.syncfusion.com/kb/article/12327/how-to-resize-list-character-in-a-word-document) * [How to modify the formatting for the default format of sections, paragraphs, and tables in a Word document?](https://support.syncfusion.com/kb/article/15884/how-to-modify-the-formatting-for-the-default-format-of-sections-paragraphs-and-tables-in-a-word-document?) * [How to extract images from tables in a Word document?](https://support.syncfusion.com/kb/article/15812/how-to-extract-images-from-tables-in-a-word-document) * [How to replace all OLE objects with text in a Word document?](https://support.syncfusion.com/kb/article/15654/how-to-replace-all-ole-objects-with-text-in-a-word-document) diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Sections.md b/Document-Processing/Word/Word-Library/NET/Working-with-Sections.md index d73f3c6d3f..181be49e75 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Sections.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Sections.md @@ -8,7 +8,7 @@ documentation: UG # Working with Sections -A section contains the contents present in Headers, Footers and main document through the instances of [WTextBody](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextBody.html). A section also has a specific set of properties used to define the page settings, number of columns, headers and footers and so on that decide how the text appears. [WTextBody](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextBody.html) represents group of paragraphs and tables etc. +A section contains the contents of the headers, footers, and main document body through the instances of [WTextBody](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextBody.html). A section also has a specific set of properties used to define the page settings, number of columns, headers and footers and so on that decide how the text appears. [WTextBody](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTextBody.html) represents a group of paragraphs and tables, etc. N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. @@ -52,7 +52,7 @@ Dim section As IWSection = document.AddSection() Dim paragraph As IWParagraph = section.AddParagraph() 'Appends the text to the created paragraph paragraph.AppendText("AdventureWorks Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company.") -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -61,9 +61,9 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Sections/Add-sections-in-Word-document). -You can add the multiple sections into the document. When you add more than one section into the word document, the section starts from the next page by default. +You can add multiple sections to the document. When you add more than one section to the Word document, the section starts on a new page by default. -You can also add a new section that starts on a same page by specifying the [BreakCode](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSection.html#Syncfusion_DocIO_DLS_WSection_BreakCode) as shown in following code example. +You can also add a new section that starts on the same page by specifying the [BreakCode](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WSection.html#Syncfusion_DocIO_DLS_WSection_BreakCode) as shown in the following code example. {% tabs %} @@ -132,7 +132,7 @@ section.BreakCode = SectionBreakCode.NoBreak paragraph = section.AddParagraph() 'Appends the text to the created paragraph paragraph.AppendText(paraText) -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -209,7 +209,7 @@ section.PageSetup.OtherPagesTray = PrinterPaperTray.MiddleBin Dim paragraph As IWParagraph = section.AddParagraph() 'Appends the text to the created paragraph. paragraph.AppendText("AdventureWorks Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company.") -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -218,7 +218,7 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Sections/Page-setup-properties). -## Creating Multi-column document +## Creating a Multi-column Document You can split the contents into two or more columns by specifying the column width and spacing between columns. @@ -328,7 +328,7 @@ paragraph.AppendBreak(BreakType.ColumnBreak) paragraph = section.AddParagraph() 'Appends the text to the created paragraph paragraph.AppendText(paraText) -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -339,7 +339,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Creating document with different page settings -You can prefer to have more sections in a Word document when you need to have different page settings or headers and footers for a specific set of contents. The following code example illustrates how to create a Word document with multiple sections whose page orientation are portrait and landscape respectively. +You can prefer to have more sections in a Word document when you need to have different page settings or headers and footers for a specific set of contents. The following code example illustrates how to create a Word document with multiple sections whose page orientation is portrait and landscape, respectively. {% tabs %} @@ -430,7 +430,7 @@ section.PageSetup.PageSize = PageSize.A4; section.PageSetup.Orientation = PageOrientation.Landscape 'Appends the text to the paragraph paragraph.AppendText(paraText) -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -538,7 +538,7 @@ paragraph.AppendText("[ Default Page Header ]") 'Inserts the default Page footer paragraph = section.HeadersFooters.OddFooter.AddParagraph() paragraph.AppendText("[ Default Page Footer ]") -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -659,7 +659,7 @@ paragraph.AppendText("[ Default Page Header ]") 'Inserts the default page footer paragraph = section.HeadersFooters.OddFooter.AddParagraph() paragraph.AppendText("[ Default Page Footer ]") -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -782,7 +782,7 @@ paragraph.AppendText("[Even Page Header ]") 'Inserts the even page footer paragraph = section.HeadersFooters.EvenFooter.AddParagraph() paragraph.AppendText("[ Even Page Footer ]") -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -911,7 +911,7 @@ section.HeadersFooters.Footer.AddParagraph().AppendText("[ Third Section Footer 'Appends some text to the third page in document paragraph = section.AddParagraph() paragraph.AppendText(Convert.ToString(vbCr & vbCr & "[ Third Page ] " & vbCr & vbCr) & paraText) -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -1180,7 +1180,7 @@ paragraph.AppendField("TotalNumberOfPages", FieldType.FieldNumPages) paragraph = section.AddParagraph() 'Appends the text to the created paragraph paragraph.AppendText("AdventureWorks Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company.") -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -1287,7 +1287,7 @@ paragraph.AppendText("[ Default Page Header ]") 'Inserts the default page footer paragraph = section.HeadersFooters.OddFooter.AddParagraph() paragraph.AppendText("[ Default Page Footer ]") -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -1366,11 +1366,11 @@ Using document As WordDocument = New WordDocument() section.PageSetup.Borders.Color = Color.Blue 'Set the linewidth of the borders. section.PageSetup.Borders.LineWidth = 0.75F - //Set the page border margins. - section.PageSetup.Borders.Top.Space = 5F; - section.PageSetup.Borders.Bottom.Space = 5F; - section.PageSetup.Borders.Right.Space = 5F; - section.PageSetup.Borders.Left.Space = 5F; + 'Set the page border margins. + section.PageSetup.Borders.Top.Space = 5F + section.PageSetup.Borders.Bottom.Space = 5F + section.PageSetup.Borders.Right.Space = 5F + section.PageSetup.Borders.Left.Space = 5F 'Add a paragraph to a section. Dim paragraph As IWParagraph = section.AddParagraph() paragraph.AppendText("AdventureWorks Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company.") @@ -1504,7 +1504,7 @@ document.Close(); Dim document As New WordDocument(inputFileName) 'Removes the second section from the collection document.Sections.RemoveAt(1) -‘Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Shapes.md b/Document-Processing/Word/Word-Library/NET/Working-with-Shapes.md index 9ff2566e65..841cdd3d78 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Shapes.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Shapes.md @@ -6,15 +6,13 @@ control: DocIO documentation: UG keywords: --- -# Working with Shapes for File-Formats Platform DocIO Control +# Working with Shapes in .NET Word (DocIO) Library -Shapes are drawing objects that include lines, curves, circles, rectangles, etc. It can be preset or custom geometry. You can create and manipulate the pre-defined shape in DOCX and WordML format documents. +Shapes are drawing objects that can include lines, curves, circles, rectangles, and so on. A shape can have preset or custom geometry. You can create and manipulate preset shapes in DOCX and WordML format documents. ## Adding shapes -The following code example illustrates how to add pre-defined shape to the document. - -N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. +The following code example illustrates how to add a preset shape to the document. {% tabs %} @@ -70,10 +68,10 @@ IWTextRange text = paragraph.AppendText("This text is in rounded rectangle shape text.CharacterFormat.TextColor = Color.Green; text.CharacterFormat.Bold = true; //Adds another shape to the document -paragraph = section.AddParagraph()as WParagraph; +paragraph = section.AddParagraph() as WParagraph; paragraph.AppendBreak(BreakType.LineBreak); Shape pentagon = paragraph.AppendShape(AutoShapeType.Pentagon, 100, 100); -paragraph = pentagon.TextBody.AddParagraph()as WParagraph; +paragraph = pentagon.TextBody.AddParagraph() as WParagraph; paragraph.AppendText("This text is in pentagon shape"); pentagon.HorizontalPosition = 72; pentagon.VerticalPosition = 200; @@ -121,7 +119,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ### Format shapes -Shape can have formatting such as line color, fill color, positioning, wrap formats, etc. The following code example illustrates how to apply formatting options for shape. +A shape can have formatting such as line color, fill color, positioning, and wrap formats. The following code example illustrates how to apply formatting options to a shape. + +N> `FillFormat.Transparency` accepts a value from 0 to 100 (percentage). {% tabs %} @@ -230,7 +230,7 @@ text.CharacterFormat.Bold = True rectangle.FillFormat.Fill = True rectangle.FillFormat.Color = Color.LightGray 'Set transparency (opacity) to the shape fill color. -rectangle.FillFormat.Transparency = 75; +rectangle.FillFormat.Transparency = 75 'Apply wrap formats rectangle.WrapFormat.TextWrappingStyle = TextWrappingStyle.Square rectangle.WrapFormat.TextWrappingType = TextWrappingType.Right @@ -331,7 +331,7 @@ paragraph = TryCast(rectangle.TextBody.AddParagraph(), WParagraph) Dim text As IWTextRange = paragraph.AppendText("This text is in rounded rectangle shape") 'Saves and closes the Word document document.Save("Sample.docx", FormatType.Docx) -document.Close +document.Close() {% endhighlight %} {% endtabs %} @@ -340,20 +340,21 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Grouping shapes -Word library now allows you to create or group multiple shapes, pictures, text boxes, and charts as a group shape in Word document (DOCX) and preserve it as in DOCX and WordML format conversions. +The .NET Word (DocIO) library allows you to group multiple shapes, pictures, text boxes, and charts as a single group shape in a Word document (DOCX). These group shapes are preserved in DOCX and WordML format conversions. -You can create a document with group shapes by using Microsoft Word. It provides an option to group a set of shapes and images as a single shape and a group shape as individual item. +Microsoft Word provides an option to group a set of shapes and images as a single shape and to later ungroup it back into individual items. ![Create Group shape in Microsoft Word](Working-with-Shapes_images/Working-with-Shapes_img1.jpeg) **Key Features:** -1. You can easily manage group of shapes, pictures, text boxes, or charts as a group shape. -2. You can move several shapes or images simultaneously and apply the same formatting properties for children of group shapes. +1. You can easily manage a group of shapes, pictures, text boxes, or charts as a group shape. +2. You can move several shapes or images simultaneously and apply the same formatting properties to the children of a group shape. -N> 1. While grouping the shapes or other objects, the shapes should be positioned relative to the “Page”. -N> 2. While grouping the shapes or other objects, the wrapping style should not be "In Line with Text". +N> The following constraints apply while grouping shapes or other objects: +N> 1. The shapes should be positioned relative to the "Page". +N> 2. The wrapping style should not be "In Line with Text". -The following code example illustrates how to create group shape in Word document. +The following code example illustrates how to create a group shape in a Word document. In the sample, an `Image.png` file must be present in the working directory (replace the path as needed). {% tabs %} @@ -490,67 +491,67 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -‘Creates a new Word document +'Creates a new Word document Dim document As WordDocument = New WordDocument() -‘Adds new section to the document +'Adds new section to the document Dim section As IWSection = document.AddSection() -‘Adds new paragraph to the section +'Adds new paragraph to the section Dim paragraph As WParagraph = TryCast(section.AddParagraph(), WParagraph) -‘Creates new group shape +'Creates new group shape Dim groupShape As GroupShape = New GroupShape(document) -‘Adds group shape to the paragraph +'Adds group shape to the paragraph paragraph.ChildEntities.Add(groupShape) -‘Creates new shape +'Creates new shape Dim shape As Shape = New Shape(document, AutoShapeType.RoundedRectangle) -‘Sets height and width for shape +'Sets height and width for shape shape.Height = 100 shape.Width = 150 -‘Sets horizontal and vertical position +'Sets horizontal and vertical position shape.HorizontalPosition = 72 shape.VerticalPosition = 72 -‘Sets wrapping style for shape +'Sets wrapping style for shape shape.WrapFormat.TextWrappingStyle = TextWrappingStyle.InFrontOfText -‘Sets horizontal and vertical origin +'Sets horizontal and vertical origin shape.HorizontalOrigin = HorizontalOrigin.Page shape.VerticalOrigin = VerticalOrigin.Page -‘Adds the specified shape to group shape +'Adds the specified shape to group shape groupShape.Add(shape) -‘Creates new picture +'Creates new picture Dim picture As WPicture = New WPicture(document) picture.LoadImage(Image.FromFile("Image.png")) -‘Sets wrapping style for picture +'Sets wrapping style for picture picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText -‘Sets height and width for the image +'Sets height and width for the image picture.Height = 100 picture.Width = 100 -‘Sets horizontal and vertical position +'Sets horizontal and vertical position picture.HorizontalPosition = 400 picture.VerticalPosition = 150 -‘Sets horizontal and vertical origin +'Sets horizontal and vertical origin picture.HorizontalOrigin = HorizontalOrigin.Page picture.VerticalOrigin = VerticalOrigin.Page -‘Adds the specified picture to group shape +'Adds the specified picture to group shape groupShape.Add(picture) -‘Creates new textbox +'Creates new textbox Dim textbox As WTextBox = New WTextBox(document) textbox.TextBoxFormat.Width = 150 textbox.TextBoxFormat.Height = 75 -‘Adds new text to the textbox body +'Adds new text to the textbox body Dim textboxParagraph As IWParagraph = textbox.TextBoxBody.AddParagraph() textboxParagraph.AppendText("Text inside text box") -‘Sets wrapping style for textbox +'Sets wrapping style for textbox textbox.TextBoxFormat.TextWrappingStyle = TextWrappingStyle.Behind -‘Sets horizontal and vertical position +'Sets horizontal and vertical position textbox.TextBoxFormat.HorizontalPosition = 200 textbox.TextBoxFormat.VerticalPosition = 200 -‘Sets horizontal and vertical origin +'Sets horizontal and vertical origin textbox.TextBoxFormat.VerticalOrigin = VerticalOrigin.Page textbox.TextBoxFormat.HorizontalOrigin = HorizontalOrigin.Page -‘Adds the specified textbox to group shape +'Adds the specified textbox to group shape groupShape.Add(textbox) -‘Saves the Word document +'Saves the Word document document.Save("Sample.docx", FormatType.Docx) -‘Closes the document +'Closes the document document.Close() {% endhighlight %} @@ -558,7 +559,7 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Shapes/Add-group-shape-in-Word). -The following code example illustrates how to add collection of shapes or images as a group shape in Word document. +The following code example illustrates how to add a collection of shapes, text boxes, and charts as a group shape by passing an array of paragraph items to the `GroupShape` constructor. {% tabs %} @@ -579,7 +580,7 @@ shape.Width = 150; //Sets Wrapping style for shape shape.WrapFormat.TextWrappingStyle = TextWrappingStyle.InFrontOfText; //Sets horizontal and vertical position for shape -shape.HorizontalPosition = 7; +shape.HorizontalPosition = 72; shape.VerticalPosition = 72; //Sets horizontal and vertical origin for shape shape.HorizontalOrigin = HorizontalOrigin.Page; @@ -687,7 +688,7 @@ shape.Width = 150; //Sets Wrapping style for shape shape.WrapFormat.TextWrappingStyle = TextWrappingStyle.InFrontOfText; //Sets horizontal and vertical position for shape -shape.HorizontalPosition = 7; +shape.HorizontalPosition = 72; shape.VerticalPosition = 72; //Sets horizontal and vertical origin for shape shape.HorizontalOrigin = HorizontalOrigin.Page; @@ -768,7 +769,7 @@ chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 11, 1]; paragraphItems[2] = chart; //Creates new group shape GroupShape groupShape = new GroupShape(document, paragraphItems); - groupShape.HorizontalPosition = 72; +groupShape.HorizontalPosition = 72; //Adds the group shape to the paragraph paragraph.ChildEntities.Add(groupShape); //Saves the Word document @@ -778,64 +779,64 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -‘Creates a new Word document +'Creates a new Word document Dim document As WordDocument = New WordDocument() -‘Adds new section to the document +'Adds new section to the document Dim section As IWSection = document.AddSection() -‘Adds new paragraph to the section +'Adds new paragraph to the section Dim paragraph As WParagraph = TryCast(section.AddParagraph(), WParagraph) -‘Creates paragraph item collections to add child shapes +'Creates paragraph item collections to add child shapes Dim paragraphItems As ParagraphItem() = New ParagraphItem(2) {} -‘Creates new shape +'Creates new shape Dim shape As Shape = New Shape(document, AutoShapeType.RoundedRectangle) -‘Sets height and width for shape +'Sets height and width for shape shape.Height = 100 shape.Width = 150 -‘Sets Wrapping style for shape +'Sets Wrapping style for shape shape.WrapFormat.TextWrappingStyle = TextWrappingStyle.InFrontOfText -‘Sets horizontal and vertical position for shape -shape.HorizontalPosition = 7 +'Sets horizontal and vertical position for shape +shape.HorizontalPosition = 72 shape.VerticalPosition = 72 -‘Sets horizontal and vertical origin for shape +'Sets horizontal and vertical origin for shape shape.HorizontalOrigin = HorizontalOrigin.Page shape.VerticalOrigin = VerticalOrigin.Page -‘Sets the shape as paragraph item +'Sets the shape as paragraph item paragraphItems(0) = shape -‘Appends new textbox to the document +'Appends new textbox to the document Dim textbox As WTextBox = New WTextBox(document) -‘Sets height and width for textbox +'Sets height and width for textbox textbox.TextBoxFormat.Width = 150 textbox.TextBoxFormat.Height = 75 -‘Adds new text to the textbox body +'Adds new text to the textbox body Dim textboxParagraph As IWParagraph = textbox.TextBoxBody.AddParagraph() -‘Adds new text to the textbox paragraph +'Adds new text to the textbox paragraph textboxParagraph.AppendText("Text inside text box") -‘Sets wrapping style for textbox +'Sets wrapping style for textbox textbox.TextBoxFormat.TextWrappingStyle = TextWrappingStyle.Behind -‘Sets horizontal and vertical position for textbox +'Sets horizontal and vertical position for textbox textbox.TextBoxFormat.HorizontalPosition = 200 textbox.TextBoxFormat.VerticalPosition = 200 -‘Sets horizontal and vertical origin for textbox +'Sets horizontal and vertical origin for textbox textbox.TextBoxFormat.VerticalOrigin = VerticalOrigin.Page textbox.TextBoxFormat.HorizontalOrigin = HorizontalOrigin.Page -‘Sets the textbox as paragraph item +'Sets the textbox as paragraph item paragraphItems(1) = textbox -‘Appends new chart to the document +'Appends new chart to the document Dim chart As WChart = New WChart(document) -‘Sets height and width for chart +'Sets height and width for chart chart.Height = 270 chart.Width = 446 -‘Sets wrapping style for chart +'Sets wrapping style for chart chart.WrapFormat.TextWrappingStyle = TextWrappingStyle.InFrontOfText -‘Sets chart type +'Sets chart type chart.ChartType = OfficeChartType.Pie chart.VerticalPosition = 350 -‘Sets chart title -‘Sets font and size for chart title +'Sets chart title +'Sets font and size for chart title chart.ChartTitle = "Best Selling Products" chart.ChartTitleArea.FontName = "Calibri" chart.ChartTitleArea.Size = 14 -‘Sets data for chart +'Sets data for chart chart.ChartData.SetValue(1, 1, "") chart.ChartData.SetValue(1, 2, "Sales") chart.ChartData.SetValue(2, 1, "Phyllis Lapin") @@ -858,29 +859,29 @@ chart.ChartData.SetValue(10, 1, "Christina Berglund") chart.ChartData.SetValue(10, 2, 29.171) chart.ChartData.SetValue(11, 1, "Elizabeth Lincoln") chart.ChartData.SetValue(11, 2, 25.696) -‘Creates a new chart series with the name “Sales” +'Creates a new chart series with the name "Sales" Dim pieSeries As IOfficeChartSerie = chart.Series.Add("Sales") -‘Sets value for the chart series +'Sets value for the chart series pieSeries.Values = chart.ChartData(2, 2, 11, 2) -‘Sets data label +'Sets data label pieSeries.DataPoints.DefaultDataPoint.DataLabels.IsValue = True pieSeries.DataPoints.DefaultDataPoint.DataLabels.Position = OfficeDataLabelPosition.Outside -‘Sets background color +'Sets background color chart.ChartArea.Fill.ForeColor = Color.FromArgb(242, 242, 242) chart.PlotArea.Fill.ForeColor = Color.FromArgb(242, 242, 242) chart.ChartArea.Border.LinePattern = OfficeChartLinePattern.None -‘Sets category labels +'Sets category labels chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 11, 1) -‘Sets the chart as paragraph item +'Sets the chart as paragraph item paragraphItems(2) = chart -‘Creates new group shape +'Creates new group shape Dim groupShape As GroupShape = New GroupShape(document, paragraphItems) groupShape.HorizontalPosition = 72 -‘Adds the group shape to the paragraph +'Adds the group shape to the paragraph paragraph.ChildEntities.Add(groupShape) -‘Saves the Word document +'Saves the Word document document.Save("Sample.docx", FormatType.Docx) -‘Closes the document +'Closes the document document.Close() {% endhighlight %} @@ -890,7 +891,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ### Nested group shapes -The following code example illustrates how to group the nested group shapes as a group shape in Word document. +You can nest one group shape inside another. The following code example illustrates how to group nested group shapes as a single group shape in a Word document. {% tabs %} @@ -1073,91 +1074,91 @@ document.Close(); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -‘Creates a new Word document +'Creates a new Word document Dim document As WordDocument = New WordDocument() -‘Adds new section to the document +'Adds new section to the document Dim section As IWSection = document.AddSection() -‘Adds new paragraph to the section +'Adds new paragraph to the section Dim paragraph As WParagraph = TryCast(section.AddParagraph(), WParagraph) -‘Creates new group shape +'Creates new group shape Dim groupShape As GroupShape = New GroupShape(document) -‘Adds group shape to the paragraph +'Adds group shape to the paragraph paragraph.ChildEntities.Add(groupShape) -‘Appends new shape to the document +'Appends new shape to the document Dim shape As Shape = New Shape(document, AutoShapeType.RoundedRectangle) -‘Sets height and width for shape +'Sets height and width for shape shape.Height = 100 shape.Width = 150 -‘Sets Wrapping style for shape +'Sets Wrapping style for shape shape.WrapFormat.TextWrappingStyle = TextWrappingStyle.InFrontOfText -‘Sets horizontal and vertical position for shape +'Sets horizontal and vertical position for shape shape.HorizontalPosition = 72 shape.VerticalPosition = 72 -‘Sets horizontal and vertical origin for shape +'Sets horizontal and vertical origin for shape shape.HorizontalOrigin = HorizontalOrigin.Page shape.VerticalOrigin = VerticalOrigin.Page -‘Adds the specified shape to group shape +'Adds the specified shape to group shape groupShape.Add(shape) -‘Appends new picture to the document +'Appends new picture to the document Dim picture As WPicture = New WPicture(document) -‘Loads image from the file -picture.LoadImage(Image.FromFile("Image.jpg")) -‘Sets wrapping style for picture +'Loads image from the file +picture.LoadImage(Image.FromFile("Image.png")) +'Sets wrapping style for picture picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText -‘Sets height and width for the picture +'Sets height and width for the picture picture.Height = 100 picture.Width = 100 -‘Sets horizontal and vertical position for the picture +'Sets horizontal and vertical position for the picture picture.HorizontalPosition = 400 picture.VerticalPosition = 150 -‘Sets horizontal and vertical origin for the picture +'Sets horizontal and vertical origin for the picture picture.HorizontalOrigin = HorizontalOrigin.Page picture.VerticalOrigin = VerticalOrigin.Page -‘Adds specified picture to the group shape +'Adds specified picture to the group shape groupShape.Add(picture) -‘Creates new nested group shape +'Creates new nested group shape Dim nestedGroupShape As GroupShape = New GroupShape(document) -‘Appends new textbox to the document +'Appends new textbox to the document Dim textbox As WTextBox = New WTextBox(document) -‘Sets width and height for the textbox +'Sets width and height for the textbox textbox.TextBoxFormat.Width = 150 textbox.TextBoxFormat.Height = 75 -‘Adds new text to the textbox body +'Adds new text to the textbox body Dim textboxParagraph As IWParagraph = textbox.TextBoxBody.AddParagraph() -‘Adds new text to the textbox paragraph +'Adds new text to the textbox paragraph textboxParagraph.AppendText("Text inside text box") -‘Sets wrapping style for the textbox +'Sets wrapping style for the textbox textbox.TextBoxFormat.TextWrappingStyle = TextWrappingStyle.Behind -‘Sets horizontal and vertical position for the textbox +'Sets horizontal and vertical position for the textbox textbox.TextBoxFormat.HorizontalPosition = 200 textbox.TextBoxFormat.VerticalPosition = 200 -‘Sets horizontal and vertical origin for the textbox +'Sets horizontal and vertical origin for the textbox textbox.TextBoxFormat.VerticalOrigin = VerticalOrigin.Page textbox.TextBoxFormat.HorizontalOrigin = HorizontalOrigin.Page -‘Adds specified textbox to the nested group shape +'Adds specified textbox to the nested group shape nestedGroupShape.Add(textbox) -‘Appends new shape to the document +'Appends new shape to the document shape = New Shape(document, AutoShapeType.Oval) -‘Sets height and width for the new shape +'Sets height and width for the new shape shape.Height = 100 shape.Width = 150 -‘Sets horizontal and vertical position for the shape +'Sets horizontal and vertical position for the shape shape.HorizontalPosition = 200 shape.VerticalPosition = 72 -‘Sets horizontal and vertical origin for the shape +'Sets horizontal and vertical origin for the shape shape.HorizontalOrigin = HorizontalOrigin.Page shape.VerticalOrigin = VerticalOrigin.Page -‘Sets horizontal and vertical position for the nested group shape +'Sets horizontal and vertical position for the nested group shape nestedGroupShape.HorizontalPosition = 72 nestedGroupShape.VerticalPosition = 72 -‘Adds specified shape to the nested group shape +'Adds specified shape to the nested group shape nestedGroupShape.Add(shape) -‘Adds nested group shape to the group shape of the paragraph +'Adds nested group shape to the group shape of the paragraph groupShape.Add(nestedGroupShape) groupShape.HorizontalPosition = 142 -‘Saves the Word document +'Saves the Word document document.Save("Sample.docx", FormatType.Docx) -‘Closes the document +'Closes the document document.Close() {% endhighlight %} @@ -1167,9 +1168,11 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Ungrouping shapes -You can ungroup the group shapes in the Word document to preserve each shape as individual item. +You can ungroup group shapes in a Word document so that each shape is preserved as an individual item. + +N> The following example assumes that the template document (`Template.docx`) contains a `GroupShape` in its last paragraph. To locate group shapes in arbitrary documents, iterate through the paragraphs and paragraph items of each section. -The following code example illustrates how to ungroup the group shape in Word document. +The following code example illustrates how to ungroup a group shape in a Word document. {% tabs %} @@ -1245,7 +1248,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Online Demo * Explore how to create a Word document with shapes using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/autoshapes#/tailwind). -* See how to create a Word document with group shapes using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/groupshapes#/tailwind). +* See how to create a Word document with group shapes using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/groupshapes#/tailwind). ## See Also diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Tables.md b/Document-Processing/Word/Word-Library/NET/Working-with-Tables.md index cb1cad82f4..daa6b88b1d 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Tables.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Tables.md @@ -5,14 +5,14 @@ platform: document-processing control: DocIO documentation: UG --- -# Working with Tables in Word document +# Working with Tables in a Word document A table in Word document is used to arrange document content in rows and columns. [WTable](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTable.html) instance represents a table in Word document. A table must contain at least one row. 1. A row is a collection of cells and it is represented by an instance of [WTableRow](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTableRow.html). Each row must contain at least one cell. 2. A cell can contain one or more paragraphs and tables. An instance of [WTableCell](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTableCell.html) represents a table cell. Each table cell must contain at least one paragraph. -N> Adding more than 63 columns not supported in Word document using Microsoft Word application. It shows alert when you attempt to insert table with more than 64 columns, which is a one of the behaviors of Microsoft Word and Essential® DocIO does the same. +N> Adding more than 63 columns is not supported in Word document using Microsoft Word application. It shows an alert when you attempt to insert a table with more than 64 columns, which is one of the behaviors of Microsoft Word and Essential® DocIO does the same. The following image illustrates how a table in Word document is organized in EssentialDocIO’s DOM: @@ -364,7 +364,7 @@ nestedCell.Width = 200; nestedCell.AddParagraph().AppendText("Mango"); //Accesses the instance of the cell (second row, second cell) nestedCell = table.Rows[1].Cells[1]; -table[1, 1].AddParagraph().AppendText("85"); +nestedCell.AddParagraph().AppendText("85"); table[2, 0].AddParagraph().AppendText("Pomegranate"); table[2, 1].AddParagraph().AppendText("70"); //Saves the Word document to MemoryStream @@ -408,7 +408,7 @@ nestedCell.Width = 200; nestedCell.AddParagraph().AppendText("Mango"); //Accesses the instance of the cell (second row, second cell) nestedCell = table.Rows[1].Cells[1]; -table[1, 1].AddParagraph().AppendText("85"); +nestedCell.AddParagraph().AppendText("85"); table[2, 0].AddParagraph().AppendText("Pomegranate"); table[2, 1].AddParagraph().AppendText("70"); //Saves and closes the document instance @@ -450,7 +450,7 @@ nestedCell.Width = 200 nestedCell.AddParagraph().AppendText("Mango") 'Accesses the instance of the cell (second row, second cell) nestedCell = table.Rows(1).Cells(1) -table(1, 1).AddParagraph().AppendText("85") +nestedCell.AddParagraph().AppendText("85") table(2, 0).AddParagraph().AppendText("Pomegranate") table(2, 1).AddParagraph().AppendText("70") 'Saves and closes the document instance @@ -464,7 +464,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Align text within a table -You can iterate the cells within a table and align text for each cell. Find more information about iterating the cells from [here](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-tables#iterating-through-table-elements) +You can iterate the cells within a table and align text for each cell. Find more information about iterating the cells from [here](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-tables#iterating-through-table-elements). The following code example illustrates how to align text within a table. @@ -680,7 +680,7 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Tables/Insert-image-in-cell). -## Apply formatting to Table, Row and Cell +## Apply formatting to Table and Row The following code example illustrates how to load an existing document and apply table formatting options such as [Borders](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.RowFormat.html#Syncfusion_DocIO_DLS_RowFormat_Borders), [LeftIndent](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.RowFormat.html#Syncfusion_DocIO_DLS_RowFormat_LeftIndent), [Paddings](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.RowFormat.html#Syncfusion_DocIO_DLS_RowFormat_Paddings), [IsAutoResized](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.RowFormat.html#Syncfusion_DocIO_DLS_RowFormat_IsAutoResized), etc. @@ -692,9 +692,8 @@ N> 4. As in the Microsoft Word, DocIO supports [RowFormat.Borders](https://help. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Tables/Apply-table-formatting/.NET/Apply-table-formatting/Program.cs" %} -//Creates an instance of WordDocument class (Empty Word Document) -FileStream fileStreamPath = new FileStream("Table.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); //Opens an existing Word document into DocIO instance +FileStream fileStreamPath = new FileStream("Table.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); //Accesses the instance of the first section in the Word document WSection section = document.Sections[0]; @@ -845,6 +844,8 @@ You can download a complete working sample from [GitHub](https://github.com/Sync Using DocIO, you can format table cells by setting text wrapping to control content flow and adjusting text direction for better readability. You can also customize cell borders, apply vertical alignment, and set a background color to enhance the table’s appearance. +N> In the following snippets, the `row` and `cell` variables are assumed to be obtained from an existing table (for example, `WTableRow row = table.Rows[0];` and `WTableCell cell = row.Cells[0];`). See the [Apply formatting to Table and Row](#apply-formatting-to-table-and-row) section for how to access a table and its rows. + #### Set cell background color The following code snippet illustrates how to specify the background color of a table cell using the [CellFormat.BackColor](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.CellFormat.html#Syncfusion_DocIO_DLS_CellFormat_BackColor) property. @@ -1054,15 +1055,15 @@ WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); WSection section = document.Sections[0]; //Accesses the instance of the first table in the section WTable table = section.Tables[0] as WTable; -//Resizes the table to fit the contents respect to the contents +//Resizes the table to fit its contents table.AutoFit(AutoFitType.FitToContent); //Accesses the instance of the second table in the section table = section.Tables[1] as WTable; -//Resizes the table to fit the contents respect to window/page width +//Resizes the table to fit the window/page width table.AutoFit(AutoFitType.FitToWindow); //Accesses the instance of the third table in the section table = section.Tables[2] as WTable; -//Resizes the table to fit the contents respect to fixed column width +//Resizes the table to fit the fixed column width table.AutoFit(AutoFitType.FixedColumnWidth); //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); @@ -1072,23 +1073,23 @@ document.Close(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Creates an instance of WordDocument class (Empty Word Document)*'| markdownify }} +//Creates an instance of WordDocument class (Empty Word Document) WordDocument document = new WordDocument(); //Opens an existing Word document into DocIO instance -document.Open("Template", FormatType.Docx); +document.Open("Template.docx", FormatType.Docx); //Accesses the instance of the first section in the Word document WSection section = document.Sections[0]; //Accesses the instance of the first table in the section WTable table = section.Tables[0] as WTable; -//Resizes the table to fit the contents respect to the contents +//Resizes the table to fit its contents table.AutoFit(AutoFitType.FitToContent); //Accesses the instance of the second table in the section table = section.Tables[1] as WTable; -//Resizes the table to fit the contents respect to window/page width +//Resizes the table to fit the window/page width table.AutoFit(AutoFitType.FitToWindow); //Accesses the instance of the third table in the section table = section.Tables[2] as WTable; -//Resizes the table to fit the contents respect to fixed column width +//Resizes the table to fit the fixed column width table.AutoFit(AutoFitType.FixedColumnWidth); //Saves and closes the document instance document.Save("Sample.docx", FormatType.Docx); @@ -1099,18 +1100,18 @@ document.Close(); 'Creates an instance of WordDocument class (Empty Word Document) Dim document As WordDocument = New WordDocument 'Opens an existing Word document into DocIO instance -document.Open("Template", FormatType.Docx) +document.Open("Template.docx", FormatType.Docx) Dim section As WSection = document.Sections(0) Dim table As WTable = CType(section.Tables(0), WTable) -'Resizes the table to fit the contents respect to the contents +'Resizes the table to fit its contents table.AutoFit(AutoFitType.FitToContent) 'Accesses the instance of the second table in the section table = CType(section.Tables(1), WTable) -'Resizes the table to fit the contents respect to window/page width +'Resizes the table to fit the window/page width table.AutoFit(AutoFitType.FitToWindow) 'Accesses the instance of the third table in the section table = CType(section.Tables(2), WTable) -'Resizes the table to fit the contents respect to fixed column width +'Resizes the table to fit the fixed column width table.AutoFit(AutoFitType.FixedColumnWidth) 'Saves and closes the document instance document.Save("Sample.docx", FormatType.Docx) @@ -1127,7 +1128,7 @@ N> In ASP.NET Core, UWP, and Xamarin platforms, to apply autofit for table in a A table style defines a set of table, row, cell and paragraph level formatting that can be applied to a table. [WTableStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WTableStyle.html) instance represents table style in a Word document. -N> Essential® DocIO currently provides support for table styles in DOCX and WordML formats alone. The visual appearance is also preserved in Word to PDF, Word to Image, and Word to HTML conversions. +N> Essential® DocIO currently provides support for table styles in DOCX and WordML formats only. The visual appearance is also preserved in Word to PDF, Word to Image, and Word to HTML conversions. The following code example illustrates how to apply the built-in table styles to the table. @@ -1180,7 +1181,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync Once you have applied a table style, you can enable or disable the special formatting of the table. There are six options: first column, last column, banded rows, banded columns, header row and last row. -The following code example illustrates how to enable and disable the special table formatting options of the table styles +The following code example illustrates how to enable and disable the special table formatting options of the table styles. {% tabs %} @@ -1372,11 +1373,11 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Tables/Apply-custom-table-style). -### Apply Base Style +### Apply base style Table styles can be based on other table styles also. When applying a base style, the new style will inherit the values of the base style that are not explicitly redefined in the new style. You can apply a custom table style or a built-in table style as a base for the table style. -The following code example illustrates how to apply built-in and custom table styles as base styles for another custom table. +The following code example illustrates how to apply built-in and custom table styles as base styles for another custom table style. {% tabs %} @@ -1662,7 +1663,7 @@ IWSection section = document.AddSection(); section.AddParagraph().AppendText("Vertical merging of Table cells"); IWTable table = section.AddTable(); table.ResetCells(5, 5); -// Specifies the vertical merge to the third cell, from second row to fifth row +// Specifies the vertical merge to the third column, from second row to fifth row table.ApplyVerticalMerge(2, 1, 4); //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); @@ -1678,7 +1679,7 @@ IWSection section = document.AddSection(); section.AddParagraph().AppendText("Vertical merging of Table cells"); IWTable table = section.AddTable(); table.ResetCells(5, 5); -//Specifies the vertical merge to the third cell, from second row to fifth row +//Specifies the vertical merge to the third column, from second row to fifth row table.ApplyVerticalMerge(2, 1, 4); //Saves and closes the document instance document.Save("VerticalMerge.docx", FormatType.Docx); @@ -1692,7 +1693,7 @@ Dim section As IWSection = document.AddSection() section.AddParagraph().AppendText("Vertical merging of Table cells") Dim table As IWTable = section.AddTable() table.ResetCells(5, 5) -'Specifies the vertical merge to the third cell, from second row to fifth row +'Specifies the vertical merge to the third column, from second row to fifth row table.ApplyVerticalMerge(2, 1, 4) 'Saves and closes the document instance document.Save("VerticalMerge.docx", FormatType.Docx) @@ -1703,7 +1704,9 @@ document.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Tables/Apply-vertical-merge-to-cells). -The following code example illustrate how to create a table that contains horizontal merged cells. +To merge cells manually, set the [HorizontalMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.CellFormat.html#Syncfusion_DocIO_DLS_CellFormat_HorizontalMerge) or [VerticalMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.CellFormat.html#Syncfusion_DocIO_DLS_CellFormat_VerticalMerge) property of [CellFormat](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.CellFormat.html) to [CellMerge.Start](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.CellMerge.html) for the first cell of the merge range and to [CellMerge.Continue](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.CellMerge.html) for the cells being merged into it. + +The following code example illustrates how to create a table that contains horizontal merged cells. {% tabs %} @@ -1868,7 +1871,7 @@ You can specify one or more rows in a table to be repeated as header row at the * In the case of a single header row, it must be the first row in the table. * In the case of multiple header rows, then header rows must be consecutive from the first row of the table. -N> Heading rows do not have any effect with nested tables in Microsoft Word as well as DocIO +N> Header rows have no effect on nested tables in Microsoft Word or DocIO. The following code example illustrates how to create a table with a single header row. @@ -1962,7 +1965,7 @@ The following code example illustrates how to disable all the table rows from sp {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Tables/Disable-row-to-break-across-pages/.NET/Disable-row-to-break-across-pages/Program.cs" %} //Creates an instance of WordDocument class FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -WordDocument document = new WordDocument(fileStreamPath); +WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); WSection section = document.Sections[0]; WTable table = section.Tables[0] as WTable; //Disables breaking across pages for all rows in the table. @@ -2027,7 +2030,7 @@ foreach (WTableRow row in table.Rows) //Iterates through the paragraphs of the cell foreach (WParagraph paragraph in cell.Paragraphs) { - //When the paragraph contains text Panda then apply green as back color to cell + //When the paragraph contains the text 'panda', apply green as the back color to the cell if (paragraph.Text.Contains("panda")) cell.CellFormat.BackColor = Color.Green; } @@ -2054,7 +2057,7 @@ foreach (WTableRow row in table.Rows) //Iterates through the paragraphs of the cell foreach (WParagraph paragraph in cell.Paragraphs) { - //When the paragraph contains text Panda then apply green as back color to cell + //When the paragraph contains the text 'panda', apply green as the back color to the cell if (paragraph.Text.Contains("panda")) cell.CellFormat.BackColor = Color.Green; } @@ -2076,7 +2079,7 @@ For Each row As WTableRow In table.Rows For Each cell As WTableCell In row.Cells 'Iterates through the paragraphs of the cell For Each paragraph As WParagraph In cell.Paragraphs - 'When the paragraph contains text Panda then apply green as back color to cell + 'When the paragraph contains the text 'panda', apply green as the back color to the cell If paragraph.Text.Contains("panda") Then cell.CellFormat.BackColor = Color.Green End If @@ -2234,7 +2237,6 @@ You can download a complete working sample from [GitHub](https://github.com/Sync * [How to split a table by columns in a Word document](https://support.syncfusion.com/kb/article/17714/how-to-split-a-table-by-columns-in-a-word-document) * [How to add rows with dynamic data into an existing table in Word document](https://support.syncfusion.com/kb/article/17819/how-to-add-rows-with-dynamic-data-into-an-existing-table-in-word-document) * [How to copy table from another Word document with its style?](https://support.syncfusion.com/kb/article/17897/how-to-copy-table-from-another-word-document-with-its-style) -* [How to copy table from another Word document with its style?](https://support.syncfusion.com/kb/article/17897/how-to-copy-table-from-another-word-document-with-its-style) * [How to Replace Field with Table in ASP.NET Core Word Document?](https://support.syncfusion.com/kb/article/17134/how-to-replace-field-with-table-in-aspnet-core-word-document?) * [How to extract tables and add to a new Document in ASP.NETCore Word?](https://support.syncfusion.com/kb/article/19585/how-to-extract-tables-and-add-to-a-new-document-in-aspnetcore-word?) * [How to remove multiple rows from a table in a Word Document?](https://support.syncfusion.com/kb/article/19642/how-to-remove-multiple-rows-from-a-table-in-a-word-document) diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-events.md b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-events.md index dd4639a7d6..5043f13d8c 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-events.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-events.md @@ -8,15 +8,15 @@ documentation: UG # Event support for Mail merge -The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides event support to customize the document contents and merging image data during the Mail merge process. The following events are supported by Essential® DocIO during Mail merge process: +The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides event support to customize the document contents and merge image data during the Mail merge process. The following events are supported by Syncfusion® DocIO during Mail merge process: -* [MergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeFieldEventHandler.html)- occurs when a **Mail merge field** except image Mail merge field is encountered. +* [MergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeFieldEventHandler.html) — occurs when a **Mail merge field** except image Mail merge field is encountered. -* [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html)- occurs when an **image Mail merge field** is encountered. +* [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html) — occurs when an **image Mail merge field** is encountered. -* [BeforeClearField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearFieldEventHandler.html)- occurs when an **unmerged field** is encountered. +* [BeforeClearField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearFieldEventHandler.html) — occurs when an **unmerged field** is encountered. -* [BeforeClearGroupField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearGroupFieldEventHandler.html)- occurs when an **unmerged group field** is encountered. +* [BeforeClearGroupField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearGroupFieldEventHandler.html) — occurs when an **unmerged group field** is encountered. ## MergeField Event @@ -106,8 +106,8 @@ End Sub {% endtabs %} -N> 1. While executing mail merge, DocIO internally uses a copy of a particular region for populating the contents. Sometimes, unexpected problems may arise due to inserting multiple body items into the region through the mail merge process. So, to insert multiple body items using the merge field event handler, you are recommended to use this [approach](https://www.syncfusion.com/kb/11701/how-to-replace-merge-field-with-html-string-using-mail-merge) at your side. -N> 2. The [ExecuteGroup(DataTable)](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteGroup_System_Data_DataTable_) method is not supported on the UWP platform. +N> 1. While executing mail merge, DocIO internally uses a copy of a particular region for populating the contents. Sometimes, unexpected problems may arise due to inserting multiple body items into the region through the mail merge process. So, to insert multiple body items using the merge field event handler, we recommend using this [approach](https://www.syncfusion.com/kb/11701/how-to-replace-merge-field-with-html-string-using-mail-merge). +N> 2. The [ExecuteGroup(DataTable)](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteGroup_System_Data_DataTable_) method is not supported on the UWP platform. The cross-platform sample above is not valid for UWP; use an alternative data-binding approach on UWP. The following code example shows GetDataTable method which is used to get data for mail merge. @@ -170,7 +170,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync You can format the merged image like resizing the image and more during mail merge process using the [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html) Event. -N> The [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html) event triggers only for image merge fields. Ensure you have a valid image merge field in the template document, following the syntax: **{ MERGEFIELD Image:logo }**. +N> The [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html) event triggers only for image merge fields. Ensure you have a valid image merge field in the template document, following the syntax: **{ MERGEFIELD Image:Logo }**. The following code example shows how to use the [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html) event during Mail merge process. @@ -183,9 +183,9 @@ WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); //Uses the mail merge events handler for image fields document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_ProductImage); //Specifies the field names and field values -string[] fieldNames = new string[] { "Logo"}; -string[] fieldValues = new string[] { "Logo.png"}; -//Executes the mail merge with groups +string[] fieldNames = new string[] { "Logo" }; +string[] fieldValues = new string[] { "Logo.png" }; +//Executes the mail merge document.MailMerge.Execute(fieldNames, fieldValues); //Saves the Word document to MemoryStream MemoryStream stream = new MemoryStream(); @@ -200,9 +200,9 @@ WordDocument document = new WordDocument("Template.docx"); //Uses the mail merge events handler for image fields document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_ProductImage); //Specifies the field names and field values -string[] fieldNames = new string[] { "Logo"}; -string[] fieldValues = new string[] { "Logo.png"}; -//Executes the mail merge with groups +string[] fieldNames = new string[] { "Logo" }; +string[] fieldValues = new string[] { "Logo.png" }; +//Executes the mail merge document.MailMerge.Execute(fieldNames, fieldValues); //Saves and closes WordDocument instance document.Save("Sample.docx"); @@ -217,7 +217,7 @@ AddHandler document.MailMerge.MergeImageField, AddressOf MergeField_ProductImage 'Specifies the field names and field values Dim fieldNames As String() = New String() {"Logo"} Dim fieldValues As String() = New String() {"Logo.png"} -'Executes the mail merge with groups +'Executes the mail merge document.MailMerge.Execute(fieldNames, fieldValues) 'Saves and closes WordDocument instance document.Save("Sample.docx") @@ -298,10 +298,10 @@ The following code example shows how to use the [BeforeClearField](https://help. {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Event-to-bind-data-for-unmerged-fields/.NET/Event-to-bind-data-for-unmerged-fields/Program.cs" %} //Opens the template document FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -WordDocument document = new WordDocument(fileStreamPath); -//Sets “ClearFields” to true to remove empty mail merge fields from document +WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); +//Sets “ClearFields” to false to keep empty mail merge fields in the document document.MailMerge.ClearFields = false; -//Uses the mail merge event to clear the unmerged field while perform mail merge execution +//Uses the mail merge event to clear the unmerged field while performing mail merge execution document.MailMerge.BeforeClearField += new BeforeClearFieldEventHandler(BeforeClearFieldEvent); //Execute mail merge document.MailMerge.ExecuteGroup(GetDataTable()); @@ -315,9 +315,9 @@ document.Close(); {% highlight c# tabtitle="C# [Windows-specific]" %} //Opens the template document WordDocument document = new WordDocument("Template.docx"); -//Sets “ClearFields” to true to remove empty mail merge fields from document +//Sets “ClearFields” to false to keep empty mail merge fields in the document document.MailMerge.ClearFields = false; -//Uses the mail merge event to clear the unmerged field while perform mail merge execution +//Uses the mail merge event to clear the unmerged field while performing mail merge execution document.MailMerge.BeforeClearField += new BeforeClearFieldEventHandler(BeforeClearFieldEvent); //Execute mail merge document.MailMerge.ExecuteGroup(GetDataTable()); @@ -329,10 +329,10 @@ document.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Opens the template document Dim document As WordDocument = New WordDocument("Template.docx") -'Sets “ClearFields” to true to remove empty mail merge fields from document +'Sets “ClearFields” to false to keep empty mail merge fields in the document document.MailMerge.ClearFields = False -'Uses the mail merge event to clear the unmerged field while perform mail merge execution -document.MailMerge.BeforeClearField += New BeforeClearFieldEventHandler(AddressOf BeforeClearField) +'Uses the mail merge event to clear the unmerged field while performing mail merge execution +AddHandler document.MailMerge.BeforeClearField, AddressOf BeforeClearFieldEvent 'Execute mail merge document.MailMerge.ExecuteGroup(GetDataTable()) 'Saves and closes the WordDocument instance @@ -559,13 +559,13 @@ document.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Opens the template document Dim document As WordDocument = New WordDocument("Template.docx") -'Sets “ClearFields” to true to remove empty mail merge fields from document +'Sets “ClearFields” to false to keep empty mail merge fields in the document document.MailMerge.ClearFields = False -'Uses the mail merge event to clear the unmerged field while perform mail merge execution +'Uses the mail merge event to clear the unmerged field while performing mail merge execution AddHandler document.MailMerge.BeforeClearGroupField, AddressOf BeforeClearFields 'Gets the employee details as “IEnumerable” collection Dim employeeList As List(Of Employees) = GetEmployees() -'Creates an instance of MailMergeDataTableby specifying mail merge group name and “IEnumerable” collection +'Creates an instance of MailMergeDataTable by specifying mail merge group name and “IEnumerable” collection Dim dataTable As MailMergeDataTable = New MailMergeDataTable("Employees", employeeList) 'Performs Mail merge document.MailMerge.ExecuteNestedGroup(dataTable) @@ -589,6 +589,7 @@ private static void BeforeClearFields(object sender, BeforeClearGroupFieldEventA string[] groupName = args.GroupName.Split(':'); if (groupName[groupName.Length - 1] == "Orders") { + //Gets the field names in the group string[] fields = args.FieldNames; List orderList = GetOrders(); //Binds the data to the unmerged fields in group as alternative values @@ -626,16 +627,16 @@ private static void BeforeClearFields(object sender, BeforeClearGroupFieldEventA {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} Private Sub BeforeClearFields(ByVal sender As Object, ByVal args As BeforeClearGroupFieldEventArgs) If Not args.HasMappedGroupInDataSource Then - ‘Gets the Current unmerged group name from the event argument + 'Gets the Current unmerged group name from the event argument Dim groupName As String() = args.GroupName.Split(":"c) If groupName(groupName.Length - 1) = "Orders" Then 'Gets the field names in the group Dim fields As String() = args.FieldNames Dim orderList As List(Of OrderDetails) = GetOrders() - ‘Binds the data to the unmerged fields in group as alternative values + 'Binds the data to the unmerged fields in group as alternative values args.AlternateValues = orderList Else - ‘If group value is empty, you can set whether the unmerged merge group field can be clear or not + 'If group value is empty, you can set whether the unmerged merge group field can be clear or not args.ClearGroup = True End If End If @@ -698,7 +699,7 @@ public static List GetEmployees() 'Gets orders list Private Shared Function GetOrders() As List(Of OrderDetails) Dim orders As List(Of OrderDetails) = New List(Of OrderDetails)() - orders.Add(New OrderDetails("10835", New DateTime(2015, 1, 5), New DateTime(2015, 1, 12), New DateTime(2015, 1, 21))) + orders.Add(New OrderDetails("10952", New DateTime(2015, 2, 5), New DateTime(2015, 2, 12), New DateTime(2015, 2, 21))) Return orders End Function diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-group.md b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-group.md index 220a6074e9..1c19ce5156 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-group.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-group.md @@ -8,7 +8,7 @@ documentation: UG # Mail merge for a group -You can perform Mail merge and append multiple records from data source within a specified region to a template document. The region between start and end groups merge fields. It gets repeated for every record from the data source. +You can perform Mail merge and append multiple records from data source within a specified region to a template document. The region is bounded by start and end group merge fields. The region gets repeated for every record from the data source. The following table illustrates the supported mail merge overloads for ExecuteGroup method. @@ -38,11 +38,10 @@ The following table illustrates the supported mail merge overloads for ExecuteGr The region where the Mail merge operations are to be performed must be marked by two merge fields with the following names. * «TableStart:TableName» and «BeginGroup:GroupName» - For the entry point of the region. - * «TableEnd:TableName» and «EndGroup:GroupName» - For the end point of the region. - 1. *TableStart* and *TableEnd* region is preferred for performing Mail merge inside the table cell. - 2. *BeginGroup* and *EndGroup* region is preferred for performing Mail merge inside the document body contents. + * *TableStart* and *TableEnd* regions are preferred for performing Mail merge inside the table cell. + * *BeginGroup* and *EndGroup* regions are preferred for performing Mail merge inside the document body contents. For example, consider that you have a template document as shown. @@ -54,7 +53,7 @@ In this template, Employees is the group name and the same name should be used w The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides various overloads for [ExecuteGroup](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteGroup_System_Data_DataTable_) method to perform Mail merge within a group from various data sources. -N> For group mail merge, declare a class with the field names, create a list, and pass it to [MailMergeDataTable](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteGroup_Syncfusion_DocIO_DLS_MailMergeDataTable_). Ensure that the property and field names in the input document match when creating the data table. +N> For group mail merge, declare a class with the field names, create a list, and pass it to [MailMergeDataTable](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMergeDataTable.html). Ensure that the property and field names in the input document match when creating the data table. The following code example shows how to perform Mail merge in the specific region with **data source retrieved from SQL connection**. @@ -108,8 +107,8 @@ private DataTable GetDataTable() adapter.Fill(dataset); adapter.Dispose(); conn.Close(); - System.Data.DataTable table = dataset.Tables[0]; - //Sets table name as Employees for template merge field reference. + DataTable table = dataset.Tables[0]; + //Sets the table name to "Employees" to match the template merge field. table.TableName = "Employees"; return table; } @@ -125,7 +124,7 @@ Private Function GetDataTable() As DataTable adapter.Dispose() conn.Close() Dim table As System.Data.DataTable = DataSet.Tables(0) - 'Sets table name as Employees for template merge field reference. + 'Sets the table name to "Employees" to match the template merge field. table.TableName = "Employees" Return table End Function @@ -149,9 +148,9 @@ You can perform Mail merge with .NET objects in a template document. The followi //Opens the template document FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); -//Gets the employee details as “IEnumerable” collection +//Gets the employee details as IEnumerable collection List employeeList = GetEmployees(); -//Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection +//Creates an instance of MailMergeDataTable by specifying mail merge group name and IEnumerable collection MailMergeDataTable dataTable = new MailMergeDataTable("Employees", employeeList); //Uses the mail merge events handler for image fields. document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_EmployeeImage); @@ -179,9 +178,9 @@ private void MergeField_EmployeeImage(object sender, MergeImageFieldEventArgs ar {% highlight c# tabtitle="C# [Windows-specific]" %} //Opens the template document WordDocument document = new WordDocument("Template.docx"); -//Gets the employee details as “IEnumerable” collection +//Gets the employee details as IEnumerable collection List employeeList = GetEmployees(); -//Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection +//Creates an instance of MailMergeDataTable by specifying mail merge group name and IEnumerable collection MailMergeDataTable dataTable = new MailMergeDataTable("Employees", employeeList); //Uses the mail merge events handler for image fields. document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_EmployeeImage); @@ -207,9 +206,9 @@ private void MergeField_EmployeeImage(object sender, MergeImageFieldEventArgs ar {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Opens the template document Dim document As New WordDocument("Template.docx") -'Gets the employee details as “IEnumerable” collection +'Gets the employee details as IEnumerable collection Dim employeeList As List(Of Employee) = GetEmployees() -'Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection +'Creates an instance of MailMergeDataTable by specifying mail merge group name and IEnumerable collection Dim dataTable As New MailMergeDataTable("Employees", employeeList) 'Uses the mail merge events handler for image fields. AddHandler document.MailMerge.MergeImageField, AddressOf MergeField_EmployeeImage diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md index 1d35ce169b..7c2cb63ab0 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md @@ -6,9 +6,9 @@ control: DocIO documentation: UG --- -# Nested Mail merge for group +# Mail merge for nested groups -You can perform nested Mail merge with relational or hierarchical data source and independent data tables in a template document. +You can perform nested mail merge with relational or hierarchical data source and independent data tables in a template document. The following table illustrates the supported mail merge overloads for ExecuteNestedGroup method. @@ -43,9 +43,9 @@ The following table illustrates the supported mail merge overloads for ExecuteNe ## Create template for nested group mail merge -Nested Mail merge operation automatically replaces the merge field with immediate group data. You can also predefine the group data that is populated to a merge field. - -To execute nested mail merge, design your Word document template as follow. +Nested mail merge operation automatically replaces the merge field with immediate group data. You can also predefine the group data that is populated in a merge field. + +To execute nested mail merge, design your Word document template as follows. ![Word document template for nested groups](../MailMerge_images/file-formats-word-nested-group-mail-merge-template.png) @@ -53,13 +53,13 @@ In this template, Employees is the owner group and it has two child groups Custo ## Execute nested group mail merge -The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides various overloads for the [ExecuteNestedGroup](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteNestedGroup_System_Data_Common_DbConnection_System_Collections_ArrayList_) method to perform Mail merge for nested groups or regions in the Word document. - -You need to define commands with the table name and expression for linking the multiple data tables **(explicit relation data)** during nested Mail merge process. You can use the “%TableName.ColumnName%” expression for getting the current value of specified column or field from the table. +The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides various overloads for the [ExecuteNestedGroup](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteNestedGroup_System_Data_Common_DbConnection_System_Collections_ArrayList_) method to perform mail merge for nested groups or regions in the Word document. -The following code example shows how to perform a nested Mail merge. +The following code example shows how to perform a nested mail merge. -N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. +> **NOTE** +> `OleDbConnection` is supported only on Windows. It is not available on Linux or macOS, including in ASP.NET Core on non-Windows platforms. Use `Microsoft.ACE.OLEDB.12.0` instead of the deprecated `Microsoft.Jet.OLEDB.4.0` provider on modern Windows. +N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. {% tabs %} @@ -154,7 +154,7 @@ The resultant document looks as follows. Essential® DocIO allows you to perform Mail merge with the dynamic objects. The [ExpandoObject](https://docs.microsoft.com/en-us/dotnet/api/system.dynamic.expandoobject?view=net-6.0) is like a collection of key and value pairs, which means IDictionary. So, you can also use IDictionary collection instead of [ExpandoObject](https://docs.microsoft.com/en-us/dotnet/api/system.dynamic.expandoobject?view=net-6.0) to execute mail merge. -The following code snippet shows how to perform the Mail merge with dynamic objects ([ExpandoObject](https://docs.microsoft.com/en-us/dotnet/api/system.dynamic.expandoobject?view=net-6.0)). +The following code snippet shows how to perform the mail merge with dynamic objects ([ExpandoObject](https://learn.microsoft.com/en-us/dotnet/api/system.dynamic.expandoobject)). {% tabs %} @@ -170,7 +170,7 @@ dataSet.Add(dataTable); dataTable = new MailMergeDataTable("Orders", GetOrders()); dataSet.Add(dataTable); List commands = new List(); -//DictionaryEntry contain "Source table" (key) and "Command" (value) +//DictionaryEntry contains "Source table" (key) and "Command" (value) DictionaryEntry entry = new DictionaryEntry("Customers", string.Empty); commands.Add(entry); //Retrieves the customer details @@ -196,7 +196,7 @@ dataSet.Add(dataTable); dataTable = new MailMergeDataTable("Orders", GetOrders()); dataSet.Add(dataTable); List commands = new List(); -//DictionaryEntry contain "Source table" (key) and "Command" (value) +//DictionaryEntry contains "Source table" (key) and "Command" (value) DictionaryEntry entry = new DictionaryEntry("Customers", string.Empty); commands.Add(entry); //Retrieves the customer details @@ -220,7 +220,7 @@ dataSet.Add(dataTable) dataTable = New MailMergeDataTable("Orders", GetOrders()) dataSet.Add(dataTable) Dim commands As New List(Of DictionaryEntry)() -'DictionaryEntry contain "Source table" (key) and "Command" (value) +'DictionaryEntry contains "Source table" (key) and "Command" (value) Dim entry As New DictionaryEntry("Customers", String.Empty) commands.Add(entry) 'Retrieves the customer details @@ -361,23 +361,28 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Mail merge with implicit relational data -You can perform **nested Mail merge with implicit relational data** objects without any explicit relational commands by using the [ExecuteNestedGroup](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteNestedGroup_Syncfusion_DocIO_DLS_MailMergeDataTable_) overload method. +You can perform **nested mail merge with implicit relational data** objects without any explicit relational commands by using the [ExecuteNestedGroup](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ExecuteNestedGroup_Syncfusion_DocIO_DLS_MailMergeDataTable_) overload method. + +DocIO automatically maps child collections to nested groups by matching the property name on the data object to the group name declared in the template (for example, a property named `Departments` on the `Organization` class maps to the `Departments` group region). Ensure property names match the group names used in the template. -### Map the field of ancestor group +### Map fields of ancestor groups -You can also merge any field in the nested group by **mapping the field or column of its ancestor group or table** in the data source. To achieve this, you need to add a corresponding group name or table name as a prefix to the merge field name along with “:” separator. +You can also merge any field in the nested group by **mapping the field or column of its ancestor group or table** in the data source. To achieve this, add the corresponding group name or table name as a prefix to the merge field name along with the `:` separator. For example: - * The merge field name should be like “TableName:Id” (<>) - * The merge field name should be like “Image:TableName:Photo” (<>) - -For example, consider that you have a template document as follow. + * The merge field name should be like `TableName:Id` (<>) + * The merge field name should be like `Image:TableName:Photo` (<>) + +> **NOTE** +> Image merge fields require the merge field to be configured with the `Image:` prefix in the template and the data value to be a byte array or `Image` instance. + +For example, consider that you have a template document as follows. ![Word document template to map the fields of ancestor group](../MailMerge_images/file-formats-word-mapping-template.png) -In the above template, Organizations is the owner group and it has two child groups Departments and Employees. The Supervisor merge field of Departments group is used in Employees group. +In the above template, Organizations is the owner group and it has two child groups Departments and Employees. The `Supervisor` merge field of the Departments group is used in the Employees group. -The following code example shows how to perform nested Mail merge with the implicit relational data objects. +The following code example shows how to perform nested mail merge with the implicit relational data objects. {% tabs %} @@ -385,9 +390,9 @@ The following code example shows how to perform nested Mail merge with the impli //Opens the template document FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); -//Gets the organization details as “IEnumerable” collection +//Gets the organization details as IEnumerable collection List organizationList = GetOrganizations(); -//Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection +//Creates an instance of MailMergeDataTable by specifying mail merge group name and IEnumerable collection MailMergeDataTable dataTable = new MailMergeDataTable("Organizations", organizationList); //Performs Mail merge document.MailMerge.ExecuteNestedGroup(dataTable); @@ -401,9 +406,9 @@ document.Close(); {% highlight c# tabtitle="C# [Windows-specific]" %} //Opens the template document WordDocument document = new WordDocument("Template.docx"); -//Gets the organization details as “IEnumerable” collection +//Gets the organization details as IEnumerable collection List organizationList = GetOrganizations(); -//Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection +//Creates an instance of MailMergeDataTable by specifying mail merge group name and IEnumerable collection MailMergeDataTable dataTable = new MailMergeDataTable("Organizations", organizationList); //Performs Mail merge document.MailMerge.ExecuteNestedGroup(dataTable); @@ -415,9 +420,9 @@ document.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Opens the template document Dim document As WordDocument = New WordDocument("Template.docx") -'Gets the organization details as “IEnumerable” collection +'Gets the organization details as IEnumerable collection Dim organizationList As List(Of Organization) = GetOrganizations() -'Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection +'Creates an instance of MailMergeDataTable by specifying mail merge group name and IEnumerable collection Dim dataTable As MailMergeDataTable = New MailMergeDataTable("Organizations", organizationList) 'Performs Mail merge document.MailMerge.ExecuteNestedGroup(dataTable) @@ -477,7 +482,7 @@ public static List GetOrganizations() {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -Public Function GetOrganizations() As List(Of Organization) +Public Shared Function GetOrganizations() As List(Of Organization) 'Creates Employee details Dim employees As List(Of EmployeeDetails) = New List(Of EmployeeDetails) employees.Add(New EmployeeDetails("Thomas Hardy", "1001", "05/27/1996")) diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-options.md b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-options.md index 3336f510f3..4b9f0556e0 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-options.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-options.md @@ -8,11 +8,11 @@ documentation: UG # Mail merge options in Word Library -The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class allows you to customize the Mail merge process with the following options. +The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class allows you to customize the mail merge process with the following options. ## Field Mapping -The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class can automatically **maps the merge field names with data source column names** during Mail merge process. You can also customize the field mapping when the merge field names in the template document varies with the column names in the data source by using [MappedFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_MappedFields) collection. +The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class can automatically **map the merge field names with data source column names** during mail merge process. You can also customize the field mapping when the merge field names in the template document vary with the column names in the data source by using [MappedFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_MappedFields) collection. The following code example shows how to add mapping when a merge field name in a document and column name in data source have different names. @@ -132,29 +132,29 @@ The following code example shows how to retrieve the merge field names for a spe {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Retrieve-merge-field-names/.NET/Retrieve-merge-field-names/Program.cs" %} -//Gets the fields from the specified groups. +//Gets the fields from the specified group. string[] fieldNames = document.MailMerge.GetMergeFieldNames(groupName); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Gets the fields from the specified groups +//Gets the fields from the specified group string[] fieldNames = document.MailMerge.GetMergeFieldNames(groupName); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Gets the fields from the specified groups +'Gets the fields from the specified group Dim fieldNames As String() = document.MailMerge.GetMergeFieldNames(groupName) {% endhighlight %} {% endtabs %} -You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Mail-Merge/Retrieve-merge-field-names). +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Mail-Merge/Retrieve-merge-field-names). This sample demonstrates all three methods shown above (`GetMergeFieldNames`, `GetMergeGroupNames`, and `GetMergeFieldNames(groupName)`). ## Remove empty paragraphs -You can remove the empty paragraphs when the paragraph has only a merge field item, without any data during Mail merge process. +You can remove the empty paragraphs when the paragraph has only a merge field item, without any data during mail merge process. -The following code example shows how to remove the empty paragraphs during Mail merge process. +The following code example shows how to remove the empty paragraphs during mail merge process. {% tabs %} @@ -215,15 +215,15 @@ Essential® DocIO removes or keeps the unmerged merge fields in th When a merge field is considered as unmerged during mail merge process? -1. The merge field doesn't have mapping field in data source. +1. The merge field doesn't have a mapping field in data source. -2. The merge field has mapping field in data source, but the data is null or string.Empty. +2. The merge field has a mapping field in data source, but the data is null or string.Empty. -Mail merge operation automatically removes the unmerged merge fields since the default value of [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property is true. +The mail merge operation automatically removes the unmerged merge fields since the default value of the [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property is true. T> 1. Set [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property to false before the mail merge execution statement if your requirement is to keep the unmerged merge fields in the output document. T> 2. Modify the [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property before each mail merge execution statement while performing multiple mail merge executions if your requirement is to remove the unmerged merge fields in one mail merge execution and keep the unmerged merge fields in another mail merge execution. -T> 3. Order the mail merge executions with the [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property false as first to avoid removal merge fields that are required for next mail merge execution in the same document. +T> 3. Order the mail merge executions with the [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property false as first to avoid removal of merge fields that are required for next mail merge execution in the same document. T> 4. You can get the unmerged fields in your document, customize the mail merge process using the BeforeClearField Event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#beforeclearfield-event). The following code example shows how to keep the unmerged merge fields in the generated Word document. @@ -234,7 +234,7 @@ The following code example shows how to keep the unmerged merge fields in the ge //Opens the template document FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); -//Sets “ClearFields” to true to remove empty mail merge fields from document +//Sets “ClearFields” to false to keep the unmerged mail merge fields in document document.MailMerge.ClearFields = false; string[] fieldNames = new string[] { "EmployeeId", "Phone", "City" }; string[] fieldValues = new string[] { "1001", "+91-9999999999", "London" }; @@ -250,7 +250,7 @@ document.Close(); {% highlight c# tabtitle="C# [Windows-specific]" %} //Opens the template document WordDocument document = new WordDocument("Template.docx"); -//Sets “ClearFields” to true to remove empty mail merge fields from document +//Sets “ClearFields” to false to keep the unmerged mail merge fields in document document.MailMerge.ClearFields = false; string[] fieldNames = new string[] { "EmployeeId", "Phone", "City" }; string[] fieldValues = new string[] { "1001", "+91-9999999999", "London" }; @@ -264,7 +264,7 @@ document.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Opens the template document Dim document As New WordDocument("Template.docx") -'Sets “ClearFields” to true to remove empty mail merge fields from document +'Sets “ClearFields” to false to keep the unmerged mail merge fields in document document.MailMerge.ClearFields = False Dim fieldNames As String() = New String() {"EmployeeId", "Phone", "City"} Dim fieldValues As String() = New String() {"1001", "+91-9999999999", "London"} @@ -281,7 +281,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Remove empty group -You can remove the empty merge field groups which contains unmerged merge fields after executing mail merge for a group in a Word document. +You can remove the empty merge field groups which contain unmerged merge fields after executing mail merge for a group in a Word document. The following code example shows how to remove empty merge field group during mail merge process in a Word document. @@ -544,15 +544,15 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Restart numbering in lists -You can restart the list numbering for each records while performing mail merge for a group in Word document. +You can restart the list numbering for each record while performing mail merge for a group in Word document by setting the [ImportOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.ImportOptions.html) to [ListRestartNumbering](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.ImportOptions.html). -The following code example shows how to restart the list numbering in a Word documents while performing mail merge. +The following code example shows how to restart the list numbering in a Word document while performing mail merge. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Restart-list-numbering-in-mail-merge/.NET/Restart-list-numbering-in-mail-merge/Program.cs" %} //Loads an existing Word document -FileStream fileStream = new FileStream("Template.docx", FileMode.Open); +FileStream fileStream = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); WordDocument document = new WordDocument(fileStream, FormatType.Docx); //Sets ImportOptions to restart the list numbering document.ImportOptions = ImportOptions.ListRestartNumbering; @@ -583,7 +583,7 @@ employeeList.Add(new Employee("101", "Nancy Davolio", "Seattle, WA, USA")); employeeList.Add(new Employee("102", "Andrew Fuller", "Tacoma, WA, USA")); employeeList.Add(new Employee("103", "Janet Leverling", "Kirkland, WA, USA")); //Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection -MailMergeDataTable dataTable = new MailMergeDataTable("Employee", employeeList); +MailMergeDataTable dataTable = new MailMergeDataTable("Employees", employeeList); //Performs mail merge document.MailMerge.ExecuteGroup(dataTable); //Saves the Word document @@ -603,7 +603,7 @@ employeeList.Add(New Employee("101", "Nancy Davolio", "Seattle, WA, USA")) employeeList.Add(New Employee("102", "Andrew Fuller", "Tacoma, WA, USA")) employeeList.Add(New Employee("103", "Janet Leverling", "Kirkland, WA, USA")) 'Creates an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection -Dim dataTable As MailMergeDataTable = New MailMergeDataTable("Employee", employeeList) +Dim dataTable As MailMergeDataTable = New MailMergeDataTable("Employees", employeeList) 'Performs mail merge document.MailMerge.ExecuteGroup(dataTable) 'Saves the Word document @@ -774,7 +774,7 @@ document.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Opens the template document -Dim document As WordDocument = New WordDocument("Data/Template.docx") +Dim document As WordDocument = New WordDocument("Template.docx") 'Creates a data table Dim table As DataTable = New DataTable("CompatibleVersions") table.Columns.Add("WordVersion") @@ -867,7 +867,7 @@ document.Close() {% endtabs %} -The following code example shows how to skip merging particular image during mail merge process using MergeImageFieldEventHandler. +The following code example shows how to skip merging particular image during mail merge process using [MergeImageFieldEventHandler](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html). For details on the event arguments, see [MergeImageFieldEventArgs](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventArgs.html) (members: `Skip`, `FieldName`, `FieldValue`, `ImageStream`, `ImageFileName`, `Picture`). {% tabs %} @@ -876,7 +876,10 @@ private void MergeEmployeePhoto(object sender, MergeImageFieldEventArgs args) { //Skip to merge particular image if (args.FieldName == "Andrew") + { args.Skip = true; + return; + } //Sets image string ProductFileName = args.FieldValue.ToString(); FileStream imageStream = new FileStream(ProductFileName, FileMode.Open, FileAccess.Read); @@ -892,7 +895,10 @@ private void MergeEmployeePhoto(object sender, MergeImageFieldEventArgs args) { //Skip to merge particular image if (args.FieldName == "Andrew") + { args.Skip = true; + return; + } //Sets image args.ImageFileName = args.FieldValue.ToString(); } @@ -903,6 +909,7 @@ Private Sub MergeEmployeePhoto(ByVal sender As Object, ByVal args As MergeImageF 'Skip to merge particular image If args.FieldName = "Andrew" Then args.Skip = True + Return End If 'Sets image Dim ProductFileName As String = args.FieldValue.ToString() @@ -920,6 +927,8 @@ You can start a new page for each group of records while performing a mail merge The following code example illustrates how to start a new page for each group of records during the mail merge process. +N> The `GetInvoice` helper method and the `Invoice`, `Orders`, `Order`, and `OrderTotals` classes used by this snippet are shown below the tabs. + {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Start-at-new-page/.NET/Start-at-new-page/Program.cs" %} @@ -1105,7 +1114,7 @@ Public Function GetInvoice() As List(Of Invoice) invoices.Add(New Invoice(orders, order, orderTotals)) orders = New List(Of Orders)() - orders.Add(New Orders("10250", "Hanari Carnes", "Rua do Paço, 67", "Rio de Janeiro", "05454-876", "Brazil", "VINET", "Rua do Paço, "1996-07-04T00:00:00-04:00", "1996-08-01T00:00:00-04:00", "1996-07-16T00:00:00-04:00", "United Package")) + orders.Add(New Orders("10250", "Hanari Carnes", "Rua do Paço, 67", "Rio de Janeiro", "05454-876", "Brazil", "VINET", "Rua do Paço, 67", "51100", "Rio de Janeiro", "Brazil", "Margaret Peacock", "Hanari Carnes", "1996-07-04T00:00:00-04:00", "1996-08-01T00:00:00-04:00", "1996-07-16T00:00:00-04:00", "United Package")) order = New List(Of Order)() order.Add(New Order("65", "Louisiana Fiery Hot Pepper Sauce", "16.8", "15", "0.15", "214.2")) @@ -2020,7 +2029,7 @@ By executing the above code example, it generates the resultant Word document as ![Output Word document of start at new page](../mailmerge_images/generated-word-document-in-file-formats.png) -N> This [StartAtNewPage](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_StartAtNewPage) property is valid for group mail merge and also that the corresponding group start and group end should be present in the text body of the Word document. This [StartAtNewPage](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_StartAtNewPage) property is not valid when the group start and group end are present in the table, headers, and footers. +N> The [StartAtNewPage](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_StartAtNewPage) property is valid only for group mail merge where the group start and group end are present in the text body of the Word document. It is not valid when the group start and group end are present inside a table, header, or footer. ## Remove mail merge settings @@ -2066,7 +2075,7 @@ Dim document As New WordDocument("Template.docx", FormatType.Docx) If document.MailMerge.Settings.HasData Then document.MailMerge.Settings.RemoveData() End If -Saves and closes the Word document instance +'Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx) document.Close() {% endhighlight %} @@ -2081,6 +2090,8 @@ You can change the linked **data source file path from a Word mail merge main do The following code example shows how to change the data source file path in the template Word document. +N> The path can be relative or absolute and should point to a file format supported by Microsoft Word for mail merge (for example, `.txt`, `.csv`, `.xls`/`.xlsx`, or `.mdb`). + {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Change-mail-merge-data-source-path/.NET/Change-mail-merge-data-source-path/Program.cs" %} diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md index 3598869836..efae8d65cd 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md @@ -1,25 +1,26 @@ --- -title: Troubleshooting tips for Mail merge | DocIO | Syncfusion +title: Troubleshooting tips for Mail Merge | DocIO | Syncfusion description: Learn how to troubleshoot Mail Merge issues in the .NET Word (DocIO) library, including common errors. platform: document-processing control: DocIO documentation: UG --- -# Troubleshooting Mail merge Issues in .NET Word Library +# Troubleshooting Mail Merge Issues in .NET Word Library ## Why is mail merge not working correctly in DocIO? Mail merge issues can arise due to incorrect merge fields, mismatched data sources, or missing fields in the template. Ensure the following: * Merge fields (<>) are used instead of plain text. -* **Data Source Check:** Ensure the required fields exist in the data source. -* **Match Field Names:** Sometimes, the field names in the Word document are different from the property names in your data source class. For example, if your document has "FirstName" and "LastName", but your Employee class uses different names, mail merge will not work correctly. +* **Data Source Check:** Ensure the required fields exist in the data source. Verify the data source column/property names against the merge field names in the Word template. +* **Match Field Names:** Sometimes, the field names in the Word document are different from the property names in your data source class. For example, if your document has "FirstName" and "LastName", but your Employee class uses different names, Mail Merge will not work correctly. **How to fix this:** - * The property names in your MergeField class should be exactly the same as the merge field names in your Word document. + * The property names in your data source class should be exactly the same as the merge field names in your Word document. * Field names are case-sensitive, so make sure they match exactly. - * You can press **Alt + F9** in Microsoft Word to see the actual field codes and check if they are correct. + +**How to verify the merge fields:** Press **Alt + F9** in Microsoft Word to reveal the actual field codes and confirm the merge field names are correct. **Example:** @@ -37,14 +38,6 @@ public class Employee } {% endhighlight %} -{% highlight c# tabtitle="C# [Windows-specific]" %} -public class Employee -{ - public string FirstName { get; set; } // Matches merge field name - public string LastName { get; set; } // Matches merge field name -} -{% endhighlight %} - {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} Public Class Employee 'Matches merge field name @@ -70,8 +63,11 @@ Mail merge only works with merge fields, not manually typed placeholders. If tex Refer to [Syncfusion® Documentation](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-find-and-replace#find-and-replace-a-pattern-of-text-with-a-merge-field) for detailed implementation. -## Why is nested group mail merge not functioning correctly? +## Why is nested group Mail Merge not functioning correctly? + +Nested Mail Merge requires proper execution using the correct method and structure. +* Use the appropriate overload of the [`ExecuteNestedGroup`](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) method to handle nested groups effectively. Supported overloads include: + * `ExecuteNestedGroup(MailMergeDataTable)` — for implicit relational data, where the child groups are nested within the parent table's data. + * `ExecuteNestedGroup(MailMergeDataSet, List)` — for explicit relational data, where the relations between parent and child groups are defined using command entries. +* Ensure the data structure follows the correct hierarchy for nested groups to maintain implicit relational data. Each child group must be represented as a relation between the parent table and the child table in the data source. -Nested mail merge requires proper execution using the correct method and structure. -* Use the appropriate overload of the ExecuteNestedGroup method to handle nested groups effectively. Refer to the Syncfusion documentation for supported overloads. -* Ensure the data structure follows the correct hierarchy for nested groups to maintain implicit relational data. diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/simple-mail-merge.md b/Document-Processing/Word/Word-Library/NET/mail-merge/simple-mail-merge.md index b0e6fec7af..e064cfc78b 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/simple-mail-merge.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/simple-mail-merge.md @@ -1,12 +1,12 @@ --- -title: Simple Mail merge in C# | DocIO | Syncfusion -description: Learn how to Mail merge - replace all merge fields with data, by repeating whole document for each record in data source using the .NET Word (DocIO) library. +title: Simple mail merge in C# | DocIO | Syncfusion +description: Learn how to mail merge - replace all merge fields with data, by repeating whole document for each record in data source using the .NET Word (DocIO) library. platform: document-processing control: DocIO documentation: UG --- -# Simple Mail merge in Word document +# Simple mail merge in a Word document You can create a Word document template using Microsoft Word application or by adding merge fields in the Word document programmatically. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-mail-merge#create-word-document-template). @@ -51,9 +51,9 @@ The following table illustrates the supported mail merge overloads for Execute m ## Mail merge with string arrays -The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides various overloads for [Execute](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_Execute_System_String___System_String___) method to perform Mail merge from various data sources. The Mail merge operation replaces the matching merge fields with the respective data. +The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides various overloads for the [Execute](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_Execute_System_String___System_String___) method to perform a mail merge from various data sources. The mail merge operation replaces the matching merge fields with the respective data. Unmatched merge fields are left unchanged in the output document by default. -### Create Word document template +### Create a Word document template The following code example shows how to create a Word template document with merge fields. @@ -78,9 +78,9 @@ document.LastParagraph.AppendText("\nPhone: "); document.LastParagraph.AppendField("Phone", FieldType.FieldMergeField); document.LastParagraph.AppendText("\nCity: "); document.LastParagraph.AppendField("City", FieldType.FieldMergeField); -//Saves the Word document to MemoryStream -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); +//Saves the Word document to a file +FileStream fileStream = new FileStream("Template.docx", FileMode.Create, FileAccess.ReadWrite); +document.Save(fileStream, FormatType.Docx); //Closes the Word document document.Close(); {% endhighlight %} @@ -139,8 +139,7 @@ The generated template document looks as follows. ### Execute mail merge -The following code example shows how to perform a simple Mail merge in the generated template document with string array as data source. - +The following code example shows how to perform a simple mail merge in the generated template document with a string array as the data source. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Mail-merge-with-string-arrays/.NET/Mail-merge-with-string-arrays/Program.cs" %} @@ -191,4 +190,10 @@ You can download a complete working sample from [GitHub](https://github.com/Sync The resultant document looks as follows. -![Mail merged Word document](../MailMerge_images/file-formats-word-simple-mail-merge-output.png) \ No newline at end of file +![Mail merged Word document](../MailMerge_images/file-formats-word-simple-mail-merge-output.png) + +## See also + +- [Mail merge using nested groups](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-mail-merge#mail-merge-using-nested-groups) +- [Conditional merge fields](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-mail-merge#conditional-merge-fields) +- [Mail merge for regions](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-mail-merge#region-mail-merge) diff --git a/Document-Processing/Word/Word-Library/NET/working-with-lists.md b/Document-Processing/Word/Word-Library/NET/working-with-lists.md index fde55427a9..15ae799f59 100644 --- a/Document-Processing/Word/Word-Library/NET/working-with-lists.md +++ b/Document-Processing/Word/Word-Library/NET/working-with-lists.md @@ -26,7 +26,7 @@ WordDocument document = new WordDocument(); IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -//Applies default numbered list style +//Applies default bulleted list style paragraph.ListFormat.ApplyDefBulletStyle(); //Adds text to the paragraph paragraph.AppendText("List item 1"); @@ -56,7 +56,7 @@ WordDocument document = new WordDocument(); IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -//Applies default numbered list style +//Applies default bulleted list style paragraph.ListFormat.ApplyDefBulletStyle(); //Adds text to the paragraph paragraph.AppendText("List item 1"); @@ -85,7 +85,7 @@ Dim document As New WordDocument() Dim section As IWSection = document.AddSection() 'Adds new paragraph to the section Dim paragraph As IWParagraph = section.AddParagraph() -'Applies default numbered list style +'Applies default bulleted list style paragraph.ListFormat.ApplyDefBulletStyle() 'Adds text to the paragraph paragraph.AppendText("List item 1") @@ -109,7 +109,7 @@ document.Close() {% endtabs %} -By running the above code, you will generate a **Bullet List** as shown below. +By running the above code, you will generate a **Bulleted List** as shown below. ![List](Lists_images/CreateBulletedList.png) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Simple-bulleted-list). @@ -228,7 +228,7 @@ WordDocument document = new WordDocument(); IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -//Applies default numbered list style +//Applies default bulleted list style paragraph.ListFormat.ApplyDefBulletStyle(); //Adds text to the paragraph paragraph.AppendText("List item 1 - Level 0"); @@ -262,7 +262,7 @@ WordDocument document = new WordDocument(); IWSection section = document.AddSection(); //Adds new paragraph to the section IWParagraph paragraph = section.AddParagraph(); -//Applies default numbered list style +//Applies default bulleted list style paragraph.ListFormat.ApplyDefBulletStyle(); //Adds text to the paragraph paragraph.AppendText("List item 1 - Level 0"); @@ -295,7 +295,7 @@ Dim document As New WordDocument() Dim section As IWSection = document.AddSection() 'Adds new paragraph to the section Dim paragraph As IWParagraph = section.AddParagraph() -'Applies default numbered list style +'Applies default bulleted list style paragraph.ListFormat.ApplyDefBulletStyle() 'Adds text to the paragraph paragraph.AppendText("List item 1 - Level 0") @@ -323,14 +323,14 @@ document.Close() {% endtabs %} -By running the above code, you will generate a **Multilevel Bullet List** as shown below. +By running the above code, you will generate a **Multilevel Bulleted List** as shown below. ![List](Lists_images/MultilevelBulletList.png) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Multilevel-bulleted-list). ## Create Multilevel Numbered List -The following code example explains how to create multilevel numbered list. +The following code example explains how to create a multilevel numbered list. {% tabs %} @@ -441,7 +441,7 @@ By running the above code, you will generate a **Multilevel Numbered List** as s You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Multilevel-numbered-list). -## List number format +## List Number Format The ListPatternType enum in DocIO lets you customize how list numbers appear in Word documents. It supports 61 styles, including Arabic, Hebrew, and more. This is useful for creating region-specific documents or applying culturally appropriate numbering formats. @@ -515,7 +515,7 @@ levelOne.PatternType = ListPatternType.Hebrew1; levelOne.StartAt = 1; // Adds a heading paragraph for the Hebrew1 list. paragraph = section.AddParagraph(); -paragraph.AppendText("List pattern Herbrew"); +paragraph.AppendText("List pattern Hebrew"); // Adds first list item using Hebrew1 style. paragraph = section.AddParagraph(); paragraph.AppendText("List item 1"); @@ -604,7 +604,7 @@ levelOne.PatternType = ListPatternType.Hebrew1; levelOne.StartAt = 1; // Adds a heading paragraph for the Hebrew1 list. paragraph = section.AddParagraph(); -paragraph.AppendText("List pattern Herbrew"); +paragraph.AppendText("List pattern Hebrew"); // Adds first list item using Hebrew1 style. paragraph = section.AddParagraph(); paragraph.AppendText("List item 1"); @@ -716,7 +716,7 @@ document.Close() {% endtabs %} -By running the above code, you will generate a **List Numbered Format** as shown below. +By running the above code, you will generate a **List Number Format** as shown below. ![List](Lists_images/ListNumberFormat.png) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/List-number-format). @@ -727,7 +727,7 @@ N> Except for the following [ListPatternType](https://help.syncfusion.com/cr/doc You can customize lists in Word documents using DocIO, allowing you to define numbering styles, bullet symbols, indentation levels, and list patterns to suit your formatting needs. -The following code example explains how to create user defined list styles. +The following code example explains how to create a user-defined numbered list style. For a user-defined bulleted list style, see [Bulleted List Styles](#bulleted-list-styles). {% tabs %} @@ -890,7 +890,7 @@ paragraph = section.AddParagraph(); paragraph.AppendText("Multilevel numbered list - Level 0"); //Continues last defined list paragraph.ListFormat.ContinueListNumbering(); -//Increases the level indent +//Decreases the level indent paragraph.ListFormat.DecreaseIndentLevel(); //Adds new paragraph paragraph = section.AddParagraph(); @@ -931,7 +931,7 @@ paragraph = section.AddParagraph(); paragraph.AppendText("Multilevel numbered list - Level 0"); //Continues last defined list paragraph.ListFormat.ContinueListNumbering(); -//Increases the level indent +//Decreases the level indent paragraph.ListFormat.DecreaseIndentLevel(); //Adds new paragraph paragraph = section.AddParagraph(); @@ -971,7 +971,7 @@ paragraph = section.AddParagraph() paragraph.AppendText("Multilevel numbered list - Level 0") 'Continues last defined list paragraph.ListFormat.ContinueListNumbering() -'Increases the level indent +'Decreases the level indent paragraph.ListFormat.DecreaseIndentLevel() 'Adds new paragraph paragraph = section.AddParagraph() @@ -988,7 +988,7 @@ document.Close() {% endtabs %} -By running the above code, you will generate a **Increase or Decrease List indent** as shown below. +By running the above code, you will generate the **Increase or Decrease List Indent** output as shown below. ![List](Lists_images/ChangeListLevels.png) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Increase-or-decrease-list-indent). @@ -1007,18 +1007,18 @@ IWSection section = document.AddSection(); //Add a new list style to the document. ListStyle listStyle = document.AddListStyle(ListType.Bulleted, "UserDefinedList"); WListLevel levelOne = listStyle.Levels[0]; -//Define the following character, pattern and start index for level 0. +//Define the pattern, bullet character, and start index for level 0. levelOne.PatternType = ListPatternType.Bullet; levelOne.BulletCharacter = "*"; levelOne.StartAt = 1; WListLevel levelTwo = listStyle.Levels[1]; -//Define the following character, pattern and start index for level 1. +//Define the pattern, bullet character, and start index for level 1. levelTwo.PatternType = ListPatternType.Bullet; levelTwo.BulletCharacter = "\u00A9"; levelTwo.CharacterFormat.FontName = "Wingdings"; levelTwo.StartAt = 1; WListLevel levelThree = listStyle.Levels[2]; -//Define the following character, pattern and start index for level 2. +//Define the pattern, bullet character, and start index for level 2. levelThree.PatternType = ListPatternType.Bullet; levelThree.BulletCharacter = "\u0076"; levelThree.CharacterFormat.FontName = "Wingdings"; @@ -1058,18 +1058,18 @@ IWSection section = document.AddSection(); //Add a new list style to the document. ListStyle listStyle = document.AddListStyle(ListType.Bulleted, "UserDefinedList"); WListLevel levelOne = listStyle.Levels[0]; -//Define the following character, pattern and start index for level 0. +//Define the pattern, bullet character, and start index for level 0. levelOne.PatternType = ListPatternType.Bullet; levelOne.BulletCharacter = "*"; levelOne.StartAt = 1; WListLevel levelTwo = listStyle.Levels[1]; -//Define the following character, pattern and start index for level 1. +//Define the pattern, bullet character, and start index for level 1. levelTwo.PatternType = ListPatternType.Bullet; levelTwo.BulletCharacter = "\u00A9"; levelTwo.CharacterFormat.FontName = "Wingdings"; levelTwo.StartAt = 1; WListLevel levelThree = listStyle.Levels[2]; -//Define the following character, pattern and start index for level 2. +//Define the pattern, bullet character, and start index for level 2. levelThree.PatternType = ListPatternType.Bullet; levelThree.BulletCharacter = "\u0076"; levelThree.CharacterFormat.FontName = "Wingdings"; @@ -1108,18 +1108,18 @@ Dim section As IWSection = document.AddSection() 'Add a new list style to the document. Dim listStyle As ListStyle = document.AddListStyle(ListType.Bulleted, "UserDefinedList") Dim levelOne As WListLevel = listStyle.Levels(0) -'Define the following character, pattern and start index for level 0. +'Define the pattern, bullet character, and start index for level 0. levelOne.PatternType = ListPatternType.Bullet levelOne.BulletCharacter = "*" levelOne.StartAt = 1 Dim levelTwo As WListLevel = listStyle.Levels(1) -'Define the following character, pattern and start index for level 1. +'Define the pattern, bullet character, and start index for level 1. levelTwo.PatternType = ListPatternType.Bullet levelTwo.BulletCharacter = ChrW(169) levelTwo.CharacterFormat.FontName = "Wingdings" levelTwo.StartAt = 1 Dim levelThree As WListLevel = listStyle.Levels(2) -'Define the following character, pattern and start index for level 2. +'Define the pattern, bullet character, and start index for level 2. levelThree.PatternType = ListPatternType.Bullet levelThree.BulletCharacter = ChrW(118) levelThree.CharacterFormat.FontName = "Wingdings" @@ -1159,7 +1159,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Numbered List with Prefix -The following code example explains how to create numbered list with prefix from previous level. +The following code example explains how to create a numbered list with prefix from previous level. N> The [NumberPrefix](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WListLevel.html#Syncfusion_DocIO_DLS_WListLevel_NumberPrefix) value for the numbered list should meet the syntax "\u000N" to update the previous list level value as prefix to the current list level. For example, it should be represented as (“\u0000.” or “\u0000.\u0001.”). @@ -1184,7 +1184,7 @@ levelTwo.NumberPrefix = "\u0000."; levelTwo.PatternType = ListPatternType.Arabic; levelTwo.StartAt = 1; WListLevel levelThree = listStyle.Levels[2]; -//Defines the follow character, prefix from previous level, pattern, start index for level 1 +//Defines the follow character, prefix from previous level, pattern, start index for level 2 levelThree.FollowCharacter = FollowCharacterType.Nothing; levelThree.NumberPrefix = "\u0000.\u0001."; levelThree.PatternType = ListPatternType.Arabic; @@ -1235,7 +1235,7 @@ levelTwo.NumberPrefix = "\u0000."; levelTwo.PatternType = ListPatternType.Arabic; levelTwo.StartAt = 1; WListLevel levelThree = listStyle.Levels[2]; -//Defines the follow character, prefix from previous level, pattern, start index for level 1 +//Defines the follow character, prefix from previous level, pattern, start index for level 2 levelThree.FollowCharacter = FollowCharacterType.Nothing; levelThree.NumberPrefix = "\u0000.\u0001."; levelThree.PatternType = ListPatternType.Arabic; @@ -1285,7 +1285,7 @@ levelTwo.NumberPrefix = vbNullChar & "." levelTwo.PatternType = ListPatternType.Arabic levelTwo.StartAt = 1 Dim levelThree As WListLevel = listStyle.Levels(2) -'Defines the follow character, prefix from previous level, pattern, start index for level 1 +'Defines the follow character, prefix from previous level, pattern, start index for level 2 levelThree.FollowCharacter = FollowCharacterType.[Nothing] levelThree.NumberPrefix = vbNullChar & "." & ChrW(1) & "." levelThree.PatternType = ListPatternType.Arabic diff --git a/Document-Processing/Word/Word-Library/NET/working-with-mail-merge.md b/Document-Processing/Word/Word-Library/NET/working-with-mail-merge.md index a756e7dde0..3f03da5e4c 100644 --- a/Document-Processing/Word/Word-Library/NET/working-with-mail-merge.md +++ b/Document-Processing/Word/Word-Library/NET/working-with-mail-merge.md @@ -7,7 +7,7 @@ documentation: UG --- # Working with Mail merge -Mail merge is a process of merging data from data source to a Word template document. The [WMergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WMergeField.html) class provides support to bind template document and data source. The [WMergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WMergeField.html) instance is replaced with the actual data retrieved from data source for the given merge field name in a template document. +Mail merge is a process of merging data from a data source into a Word template document. The [WMergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WMergeField.html) class provides support to bind template document and data source. The [WMergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WMergeField.html) instance is replaced with the actual data retrieved from the data source for the given merge field name in a template document. ## Supported data sources @@ -16,7 +16,7 @@ The following data sources are supported by Essential® DocIO for - + @@ -98,12 +98,12 @@ The mail merge process involves three documents: 3. **Final merged document**: This resultant document is a combination of the template Word document and the data from data source. -T> 1. You can use conditional fields ([IF](https://support.microsoft.com/en-us/office/field-codes-if-field-9f79e82f-e53b-4ff5-9d2c-ae3b22b7eb5e?ui=en-us&rs=en-us&ad=us), [Formula](https://support.microsoft.com/en-us/office/field-codes-formula-field-32d5c9de-3516-4ec3-80ed-d1fc2b5bc21d?ui=en-us&rs=en-us&ad=us)) combined with merge fields, when you require intelligent decisions in addition to simple mail merge (replace merge fields with result text). To use conditional fields, execute mail merge and then update fields in the Word document using [UpdateDocumentFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html#Syncfusion_DocIO_DLS_WordDocument_UpdateDocumentFields) API. -T> 2. You can replace the fields ([IF](https://support.microsoft.com/en-us/office/field-codes-if-field-9f79e82f-e53b-4ff5-9d2c-ae3b22b7eb5e?ui=en-us&rs=en-us&ad=us), [Formula](https://support.microsoft.com/en-us/office/field-codes-formula-field-32d5c9de-3516-4ec3-80ed-d1fc2b5bc21d?ui=en-us&rs=en-us&ad=us)) combined with merge fields, with its most recent result and **generates the plain Word document** by unlinking the fields. Refer to this [link](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-fields#unlink-fields) for more information. +T> 1. You can use conditional fields ([IF](https://support.microsoft.com/en-us/office/field-codes-if-field-9f79e82f-e53b-4ff5-9d2c-ae3b22b7eb5e?ui=en-us&rs=en-us&ad=us), [Formula](https://support.microsoft.com/en-us/office/field-codes-formula-field-32d5c9de-3516-4ec3-80ed-d1fc2b5bc21d?ui=en-us&rs=en-us&ad=us)) combined with merge fields, when you require intelligent decisions in addition to simple mail merge (i.e., replacing merge fields with result text). To use conditional fields, execute mail merge and then update fields in the Word document using [UpdateDocumentFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html#Syncfusion_DocIO_DLS_WordDocument_UpdateDocumentFields) API. +T> 2. You can replace the fields ([IF](https://support.microsoft.com/en-us/office/field-codes-if-field-9f79e82f-e53b-4ff5-9d2c-ae3b22b7eb5e?ui=en-us&rs=en-us&ad=us), [Formula](https://support.microsoft.com/en-us/office/field-codes-formula-field-32d5c9de-3516-4ec3-80ed-d1fc2b5bc21d?ui=en-us&rs=en-us&ad=us)) combined with merge fields, with its most recent result and convert the field results to static text by unlinking the fields. Refer to this [link](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-fields#unlink-fields) for more information. ### Create Word document template -You can create a template document with merge fields by using any Word editor application, like Microsoft Word. By using Word editor application, you can take the advantage of the visual interface to design unique layout, formatting, and more for your Word document template interactively. +You can create a template document with merge fields by using any Word editor application, like Microsoft Word. By using a Word editor application, you can take the advantage of the visual interface to design unique layout, formatting, and more for your Word document template interactively. The following screenshot shows how to insert a merge field in the Word document by **using the Microsoft Word.** @@ -111,9 +111,9 @@ The following screenshot shows how to insert a merge field in the Word document You need to add a prefix (“Image:”) to the merge field name for merging an image in the place of a merge field. -**For example:** The merge field name should be like “Image:Photo” (<>) +**For example:** The merge field name should be like "Image:Photo" (<>) -You can **create Word document template programmatically** by adding merge fields to the Word document using Essential® DocIO. +You can **create Word document template programmatically** by adding merge fields to the Word document using Essential® DocIO. DocIO supports the following template formats: `.docx`, `.doc`, `.rtf`, and `.dotx`. The following code example shows how to create a merge field in the Word document. @@ -123,16 +123,20 @@ N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-plat {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Create-merge-field/.NET/Create-merge-field/Program.cs" %} //Creates an instance of a WordDocument -WordDocument document = new WordDocument(); -//Adds a section and a paragraph in the document -document.EnsureMinimal(); -//Appends merge field to the last paragraph. -document.LastParagraph.AppendField("FullName", FieldType.FieldMergeField); -//Saves the Word document to MemoryStream -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document -document.Close(); +using (WordDocument document = new WordDocument()) +{ + //Adds a section and a paragraph in the document + document.EnsureMinimal(); + //Appends merge field to the last paragraph. + document.LastParagraph.AppendField("FullName", FieldType.FieldMergeField); + //Saves the Word document to MemoryStream + using (MemoryStream stream = new MemoryStream()) + { + document.Save(stream, FormatType.Docx); + //Writes the Word document to a file + File.WriteAllBytes("Template.docx", stream.ToArray()); + } +} {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} @@ -171,17 +175,21 @@ The following code example shows how to perform mail merge in above Word documen {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Mail-Merge/Getting-started-mail-merge/.NET/Getting-started-mail-merge/Program.cs" %} //Opens the template document -FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); -string[] fieldNames = new string[] { "FullName" }; -string[] fieldValues = new string[] { "Nancy Davolio" }; -//Performs the mail merge -document.MailMerge.Execute(fieldNames, fieldValues); -//Saves the Word document to MemoryStream -MemoryStream stream = new MemoryStream(); -document.Save(stream, FormatType.Docx); -//Closes the Word document -document.Close(); +using (FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) +{ + WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx); + string[] fieldNames = new string[] { "FullName" }; + string[] fieldValues = new string[] { "Nancy Davolio" }; + //Performs the mail merge + document.MailMerge.Execute(fieldNames, fieldValues); + //Saves the Word document to MemoryStream + using (MemoryStream stream = new MemoryStream()) + { + document.Save(stream, FormatType.Docx); + //Writes the Word document to a file + File.WriteAllBytes("Sample.docx", stream.ToArray()); + } +} {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} @@ -222,15 +230,15 @@ The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.Do ## Performing Mail merge for a group -You can perform Mail merge and append multiple records from data source within a specified region to a template document. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-for-group). +You can perform Mail merge and append multiple records from the data source within a specified region to a template document. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-for-group). -## Performing Nested Mail merge for group +## Performing Nested Mail merge for a group -You can perform nested Mail merge with relational or hierarchical data source and independent data tables in a template document. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-for-nested-groups). +You can perform nested Mail merge with a relational or hierarchical data source and independent data tables in a template document. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-for-nested-groups). ## Performing Mail merge with dynamic objects -Essential® DocIO allows you to perform Mail merge with the dynamic objects. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-for-nested-groups#mail-merge-with-dynamic-objects). +Essential® DocIO allows you to perform Mail merge with dynamic objects. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-for-nested-groups#mail-merge-with-dynamic-objects). ## Performing Mail merge with business objects @@ -242,9 +250,9 @@ Essential® DocIO supports performing nested Mail merge with impli ## Event support for mail merge -The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides event support to customize the document contents and merging image data during the Mail merge process. The following events are supported by Essential® DocIO in Mail merge process: +The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html) class provides event support to customize the document contents and merging image data during the Mail merge process. The following events are supported by Essential® DocIO in the Mail merge process: -* [MergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeFieldEventHandler.html): Occurs when a **Mail merge field** except image Mail merge field is encountered. +* [MergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeFieldEventHandler.html): Occurs when a **Mail merge field** except an image Mail merge field is encountered. * [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html): Occurs when an **image Mail merge field** is encountered. @@ -254,19 +262,19 @@ The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.Do ### MergeField event -You can customize the merging text during Mail merge process by using the [MergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#mergefield-event). +You can customize the merging text during the Mail merge process by using the [MergeField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#mergefield-event). ### MergeImageField event -You can customize the merging image during Mail merge process by using the [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#mergeimagefield-event). +You can customize the merging image during the Mail merge process by using the [MergeImageField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MergeImageFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#mergeimagefield-event). ### BeforeClearField event -You can get the unmerged fields during Mail merge process by using the [BeforeClearField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#beforeclearfield-event). +You can get the unmerged fields during the Mail merge process by using the [BeforeClearField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#beforeclearfield-event). ### BeforeClearGroupField event -You can get the unmerged groups during Mail merge process by using the [BeforeClearGroupField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearGroupFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#beforecleargroupfield-event). +You can get the unmerged groups during the Mail merge process by using the [BeforeClearGroupField](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.BeforeClearGroupFieldEventHandler.html) event. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-events#beforecleargroupfield-event). ## Mail merge options @@ -274,7 +282,7 @@ The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.Do ### Field mapping -You can automatically map the merge field names with data source column names during Mail merge process. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-options#field-mapping). +You can automatically map the merge field names with the data source column names during the Mail merge process. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-options#field-mapping). ### Retrieving the merge field names @@ -282,11 +290,11 @@ You can retrieve the merge field names and also merge field group names in the W ### Removing empty paragraphs -You can remove the empty paragraphs when the paragraph has a merge field item without any data during Mail merge process. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-options#remove-empty-paragraphs). +You can remove the empty paragraphs when the paragraph has a merge field item without any data during the Mail merge process. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-options#remove-empty-paragraphs). ### Removing empty merge fields -You can remove or keep the unmerged merge fields in the output document based on the [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property on each mail merge execution. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-options#remove-empty-merge-fields). +You can remove or keep the unmerged merge fields in the output document based on the [ClearFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.MailMerge.html#Syncfusion_DocIO_DLS_MailMerge_ClearFields) property on each mail merge execution. The default value of `ClearFields` is `true`, which removes unmerged merge fields. For further information, click [here](https://help.syncfusion.com/document-processing/word/word-library/net/mail-merge/mail-merge-options#remove-empty-merge-fields). ### Restart numbering in lists From 7ed69e86fc06964f188eb09997fe0e33214b54f8 Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Thu, 23 Jul 2026 16:21:55 +0530 Subject: [PATCH 003/513] 1043289-changed header-footer,history,add-save-button,save-document,auto-save --- .../Word-Processor/angular/header-footer.md | 49 ++++++++++--------- .../Word/Word-Processor/angular/history.md | 25 +++++----- .../how-to/add-save-button-in-toolbar.md | 14 +++--- .../auto-save-document-in-document-editor.md | 38 +++++++------- .../angular/how-to/auto-save-document.md | 34 +++++++------ 5 files changed, 83 insertions(+), 77 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/header-footer.md b/Document-Processing/Word/Word-Processor/angular/header-footer.md index 8056e220d3..084752fbac 100644 --- a/Document-Processing/Word/Word-Processor/angular/header-footer.md +++ b/Document-Processing/Word/Word-Processor/angular/header-footer.md @@ -1,22 +1,22 @@ --- layout: post -title: Header footer in Angular Document editor component | Syncfusion -description: Learn here all about Header footer in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Header and Footer in Angular DOCX Editor component | Syncfusion +description: Learn about headers and footers in the Syncfusion Angular Document Editor component. platform: document-processing -control: Header footer +control: Header and Footer documentation: ug domainurl: ##DomainURL## --- -# Header footer in Angular Document editor component +# Header and Footer in Angular DOCX Editor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports headers and footers in its document. Each section in the document can have the following types of headers and footers: +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports headers and footers. Each section in the document can have the following types of headers and footers: * First page: Used only on the first page of the section. -* Even pages: Used on all even numbered pages in the section. -* Default: Used on all pages of the section, where first or even pages are not applicable or not specified. +* Even pages: Used on all even-numbered pages of the section. +* Default: Used on all pages of the section where first or even pages are not applicable or not specified. -You can define this by setting format properties of the corresponding section using the following sample code. +Set the corresponding section-format properties as shown in the following code. ```typescript //Defines whether different header footer is required for first page of the section @@ -25,9 +25,9 @@ this.documentEditor.selection.sectionFormat.differentFirstPage = true; this.documentEditor.selection.sectionFormat.differentOddAndEvenPages = true; ``` -## Go to header footer region +## Go to Header Footer Region -Double click in header or footer region to move the selection into it. You can also do this by using the following code. +Double-click in the header or footer region to move the selection into it. You can also use the following code to achieve the same result. ```typescript this.documentEditor.selection.goToHeader(); @@ -37,13 +37,13 @@ this.documentEditor.selection.goToHeader(); this.documentEditor.selection.goToFooter(); ``` -## Link to previous +## Link to Previous -Link to previous is enabled by default when document has more than one section. If you're using different headers and footers such as different first page or different odd and even pages, they can't be linked together because they're all separate. +Link to Previous is enabled by default when the document has more than one section. Different header/footer types (first page, odd, even) cannot be linked together because they are independent. -Before setting or getting the link to previous value, use the ['goToHeader'](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotoheader) or ['goToFooter'](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotofooter) API to move the current selection to the header or footer region. +Before setting or getting the Link to Previous value, call [`goToHeader()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotoheader) or [`goToFooter()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotofooter) to move the selection into the corresponding region. -You can get or set the default header footer link to previous value of a section at cursor position by using the following sample code. +You can get or set the default header/footer Link to Previous value of the section at the cursor position using the following code. ```typescript this.container.documentEditor.selection.sectionFormat.oddPageHeader.linkToPrevious = false; @@ -56,30 +56,31 @@ In case the document has different header and footer types, such as different fi // Different first page this.container.documentEditor.selection.sectionFormat.firstPageHeader.linkToPrevious = false; this.container.documentEditor.selection.sectionFormat.firstPageFooter.linkToPrevious = false; -//Even page -this.container.documentEditor.selection.sectionFormat.firstPageHeader.linkToPrevious = false; -this.container.documentEditor.selection.sectionFormat.firstPageFooter.linkToPrevious = false; +// Even page +this.container.documentEditor.selection.sectionFormat.evenPageHeader.linkToPrevious = false; +this.container.documentEditor.selection.sectionFormat.evenPageFooter.linkToPrevious = false; ``` ->Note: When there is more than one section in the document, the Link to Previous option becomes available. By default, this feature is disabled state in UI and set to return false for the first section. +N> 1. When there is more than one section in the document, the Link to Previous option becomes available. +N> 2. By default, the Link to Previous option is disabled in the UI and returns `false` for the first section. -## Header and footer distance +## Header and Footer Distance -You can define the distance of header region content from the top of the page. Refer to the following sample code. +You can define the distance of header region content from the top of the page. Use the following code to set the distance of the header region from the top of the page. ```typescript this.documentEditor.selection.sectionFormat.headerDistance = 36; ``` -Same way, you can define the distance of footer region content from the bottom of the page. Refer to the following sample code. +Similarly, you can set the distance of the footer region from the bottom of the page using the following code. ```typescript -this.documentEditor.selection.sectionFormat.footerDistace = 36; +this.documentEditor.selection.sectionFormat.footerDistance = 36; ``` -## Close header footer region +## Close Header Footer Region -Move the selection to the document body from header or footer region by double clicking or tapping the document area. You can also perform this by using the following sample code. +Move the selection from the header or footer region back to the document body by double-clicking the document area, or use the following code. ```typescript this.documentEditor.selection.closeHeaderFooter(); diff --git a/Document-Processing/Word/Word-Processor/angular/history.md b/Document-Processing/Word/Word-Processor/angular/history.md index a30177984d..532081c727 100644 --- a/Document-Processing/Word/Word-Processor/angular/history.md +++ b/Document-Processing/Word/Word-Processor/angular/history.md @@ -1,18 +1,18 @@ --- layout: post -title: History in Angular Document editor component | Syncfusion -description: Learn here all about History in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: History in Angular DOCX Editor component | Syncfusion +description: Learn about the history (undo/redo) feature in the Syncfusion Angular Document Editor component. platform: document-processing control: History documentation: ug domainurl: ##DomainURL## --- -# History in Angular Document editor component +# History in Angular Document Editor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) tracks the history of all editing actions done in the document, which allows undo and redo functionality. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) tracks all editing actions performed on the document, enabling undo and redo functionality. -## Enable or disable history +## Enable or Disable History Inject the `EditorHistory` module in your application to provide history preservation functionality for `DocumentEditor`. Refer to the following code example. @@ -35,30 +35,31 @@ export class AppComponent { } ``` -You can enable or disable history preservation for a document editor instance any time using the ‘enableEditorHistory’ property. Refer to the following sample code. +You can enable or disable history preservation at any time using the `enableEditorHistory` property. Use the following code: ```typescript this.documentEditor.enableEditorHistory = false; ``` -## Undo and redo +## Undo and Redo -You can perform undo and redo by `CTRL+Z` and `CTRL+Y` keyboard shortcuts. Document Editor exposes API to do it programmatically. -To undo the last editing operation in document editor, refer to the following sample code. +You can perform undo and redo with the `Ctrl+Z` and `Ctrl+Y` keyboard shortcuts. The Document Editor also exposes APIs to perform undo and redo programmatically. + +To undo the last editing operation in the Document Editor, use the following code: ```typescript this.documentEditor.editorHistory.undo(); ``` -To redo the last undone action, refer to the following code example. +To redo the last undone action, use the following code: ```typescript this.documentEditor.editorHistory.redo(); ``` -## Stack size +## Stack Size -History of editing actions will be maintained in stack, so that the last item will be reverted first. By default, document editor limits the size of undo and redo stacks to 500 each respectively. However, you can customize this limit. Refer to the following sample code. +Editing actions are maintained in a stack, so the most recent action is reverted first. By default, the Document Editor limits both the undo and redo stacks to 500 entries each. You can customize these limits using the following code: ```typescript //Set undo limit. diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md b/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md index 906322595d..2d99486cf0 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md @@ -1,18 +1,18 @@ --- layout: post -title: Add save button in Angular Document editor component | Syncfusion -description: Learn here to add save button in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Add a Save Button in the Angular DOCX Editor Toolbar | Syncfusion +description: Learn how to add a save button to the Syncfusion Angular Document Editor toolbar. platform: document-processing control: Add save button tool bar documentation: ug domainurl: ##DomainURL## --- -# Add save button in Angular Document editor toolbar +# Add a Save Button in the Angular Document Editor Toolbar -## To add a save button to the existing toolbar in DocumentEditorContainer +## To Add a Save Button to the Existing Toolbar in DocumentEditorContainer -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) Container allows you to add a new button to the existing items in a toolbar using [`CustomToolbarItemModel`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/customToolbarItemModel/) and with existing items in [`toolbarItems`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#toolbaritems) property. Newly added item click action can be defined in [`toolbarClick`](https://ej2.syncfusion.com/angular/documentation/api/toolbar/clickEventArgs/). +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) Container allows you to add a new button to the existing items in a toolbar. Use [`CustomToolbarItemModel`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/customToolbarItemModel/) to define the custom item, combine it with the existing items in the [`toolbarItems`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#toolbaritems) property, and define the click action in the [`toolbarClick`](https://ej2.syncfusion.com/angular/documentation/api/toolbar/clickEventArgs/) event. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; @@ -96,7 +96,7 @@ export class AppComponent implements OnInit { onToolbarClick(args: ClickEventArgs): void { switch (args.item.id) { case 'save': - //Disable image toolbar item. + // Save the document (downloads as Docx). this.container?.documentEditor.save('sample', 'Docx'); break; } @@ -104,4 +104,4 @@ export class AppComponent implements OnInit { } ``` ->Note: Default value of `toolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl']`. \ No newline at end of file +N> The default value of `toolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl']`. \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md index 525ca8900c..2d6fa82504 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md @@ -1,26 +1,26 @@ --- layout: post -title: Auto save to AWS S3 in Angular Document editor | Syncfusion -description: Learn here all about Auto save document in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Auto Save to AWS S3 in Angular DOCX Editor | Syncfusion +description: Learn how to auto-save documents to AWS S3 from the Syncfusion Angular Document Editor component. platform: document-processing control: Auto save document in document editor documentation: ug domainurl: ##DomainURL## --- -# Auto save document to AWS S3 in Angular Document editor component +# Auto Save Document to AWS S3 in Angular Document Editor component -In this article, we are going to see how to auto save the document in AWS S3. You can automatically save the edited content in regular intervals of time. It helps reduce the risk of data loss by saving an open document automatically at customized intervals. +This article explains how to auto-save the document in AWS S3. You can save the edited content automatically at regular intervals, which reduces the risk of data loss by saving the open document at customized intervals. -The following example illustrates how to auto save the document in AWS S3. +The following example illustrates how to auto-save the document in AWS S3. -* In the client-side, using content change event, we can automatically save the edited content in regular intervals of time. Based on `contentChanged` boolean, the document send as DOCX format to server-side using [`saveAsBlob`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. +* On the client side, use the `contentChange` event to detect edits and save the document at regular intervals. When the `contentChanged` flag is `true`, the document is sent to the server in Document format using the [`saveAsBlob()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. ```typescript /** * Add below codes in app.component.html file */ - /** @@ -53,7 +53,7 @@ export class AppComponent { formData.append('data', exportedDocument); /* tslint:disable */ var req = new XMLHttpRequest(); - // Replace your running Url here + // Replace with your running URL here. req.open( 'POST', 'http://localhost:62869/api/documenteditor/SaveToS3', @@ -62,7 +62,7 @@ export class AppComponent { req.onreadystatechange = () => { if (req.readyState === 4) { if (req.status === 200 || req.status === 304) { - console.log('Saved sucessfully'); + console.log('Saved successfully'); } } }; @@ -79,9 +79,11 @@ export class AppComponent { } ``` -> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. +N> 1. The Web Service link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` used in the `serviceUrl` property of the Document Editor is intended solely for demonstration and evaluation purposes. +N> 2. For production deployment, please host your own Web Service with your required server configurations. +N> 3. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own Web Service and use it for the `serviceUrl` property. -* In server-side, configure the access key and secret key in `web.config` file and register profile in `startup.cs`. +* On the server side, configure the access key and secret key in the `web.config` file and register the profile in `startup.cs`. In `web.config`, add key like below format: @@ -99,7 +101,7 @@ In `startup.cs`, register profile in below format: Amazon.Util.ProfileManager.RegisterProfile("sync_development","", ""); ``` -* In server-side, Receives the stream content from client-side and process it to save the document in aws s3. Add Web API in controller file like below to save the document in aws s3. +* On the server side, receive the stream from the client and process it to save the document in AWS S3. Add a Web API method in a controller file to save the document in AWS S3, as shown below. ```c# [AcceptVerbs("Post")] @@ -113,7 +115,7 @@ public string SaveToS3() file.CopyTo(stream); UploadFileStreamToS3(stream, "documenteditor", "", "GettingStarted.docx"); stream.Close(); - return "Sucess"; + return "Success"; } public bool UploadFileStreamToS3(System.IO.Stream localFilePath, string bucketName, string subDirectoryInBucket, string fileNameInS3) @@ -125,15 +127,15 @@ public bool UploadFileStreamToS3(System.IO.Stream localFilePath, string bucketNa if (subDirectoryInBucket == "" || subDirectoryInBucket == null) { -request.BucketName = bucketName; //no subdirectory just bucket name + request.BucketName = bucketName; // No subdirectory; just the bucket name. } else - { // subdirectory and bucket name -request.BucketName = bucketName + @"/" + subDirectoryInBucket; + { // Subdirectory and bucket name. + request.BucketName = bucketName + @"/" + subDirectoryInBucket; } - request.Key = fileNameInS3; //file name up in S3 + request.Key = fileNameInS3; // File name in S3. request.InputStream = localFilePath; - utility.Upload(request); //commensing the transfer + utility.Upload(request); // Commence the transfer. return true; //indicate that the file was sent } diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md index b7f7e84330..9c9f204115 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md @@ -1,28 +1,28 @@ --- layout: post -title: Auto save to server in Angular Document editor | Syncfusion -description: Learn here all about Auto save document in document editor in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Auto Save to Server in Angular DOCX Editor | Syncfusion +description: Learn how to auto-save documents to a server from the Syncfusion Angular Document Editor component. platform: document-processing control: Auto save document in document editor documentation: ug domainurl: ##DomainURL## --- -# Auto save document to server in Angular Document editor component +# Auto Save Document to Server in Angular Document Editor component -In this article, we are going to see how to auto save the document to server. You can automatically save the edited content in regular intervals of time. It helps reduce the risk of data loss by saving an open document automatically at customized intervals. +This article explains how to auto-save the document to a server. You can save the edited content automatically at regular intervals, which reduces the risk of data loss by saving the open document at customized intervals. -The following example illustrates how to auto save the document in server. +The following example illustrates how to auto-save the document to a server. -* In the client-side, using content change event, we can automatically save the edited content in regular intervals of time. Based on `contentChanged` boolean, the document send as DOCX format to server-side using [`saveAsBlob`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. +* On the client side, use the `contentChange` event to detect edits and save the document at regular intervals. When the `contentChanged` flag is `true`, the document is sent to the server in Document format using the [`saveAsBlob()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; import { ToolbarService, DocumentEditorContainerComponent, + DocumentEditorContainerModule, } from '@syncfusion/ej2-angular-documenteditor'; -import { DocumentEditorContainerModule } from '@syncfusion/ej2-angular-documenteditor'; @Component({ selector: 'app-container', @@ -34,7 +34,7 @@ import { DocumentEditorContainerModule } from '@syncfusion/ej2-angular-documente serviceUrl="https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/" height="600px" style="display:block" - [enableToolbar]=true + [enableToolbar]="true" (created)="onCreate()" (contentChange)="onContentChange()"> @@ -51,17 +51,17 @@ export class AppComponent implements OnInit { setInterval(() => { if (this.contentChanged) { - //You can save the document as below + // Save the document as shown below. this.container?.documentEditor.saveAsBlob('Docx').then((blob: Blob) => { - console.log('Saved sucessfully'); + console.log('Saved successfully'); let exportedDocument: Blob = blob; - //Now, save the document where ever you want. + // Save the document wherever you want. let formData: FormData = new FormData(); formData.append('fileName', 'sample.docx'); formData.append('data', exportedDocument); /* tslint:disable */ var req = new XMLHttpRequest(); - // Replace your running Url here + // Replace with your running URL here. req.open( 'POST', 'http://localhost:62869/api/documenteditor/AutoSave', @@ -87,9 +87,11 @@ export class AppComponent implements OnInit { } ``` -> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. +N> 1. The Web Service link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` used in the `serviceUrl` property of the Document Editor is intended solely for demonstration and evaluation purposes. +N> 2. For production deployment, please host your own Web Service with your required server configurations. +N> 3. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own Web Service and use it for the `serviceUrl` property. -* In server-side, Receives the stream content from client-side and process it to save the document in Server or Database from the received stream. Add Web API in controller file like below to save the document. +* On the server side, receive the stream from the client and process it to save the document to a server or database. Add a Web API method in a controller file to save the document, as shown below. ```c# [AcceptVerbs("Post")] @@ -103,7 +105,7 @@ public string AutoSave() file.CopyTo(stream); //Save the stream to database or server as per the requirement. stream.Close(); - return "Sucess"; + return "Success"; } ``` @@ -112,4 +114,4 @@ public string AutoSave() Explore how to automatically save Word documents in the Angular Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/auto-save). ## See Also -* [AutoSave document in DocumentEditor](..//how-to/auto-save-document-in-document-editor) +* [AutoSave document in DocumentEditor](../how-to/auto-save-document-in-document-editor) From d013ee562f35b7cb4f3f027ed5cecb7282ccd8e6 Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Thu, 23 Jul 2026 19:05:35 +0530 Subject: [PATCH 004/513] 1043288: updated the md file for react --- ...-processor-server-docker-image-overview.md | 130 +++++++++--------- .../Word/Word-Processor/react/shapes.md | 16 +-- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md b/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md index 4d15697b29..f5c5b283b1 100644 --- a/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md +++ b/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md @@ -1,15 +1,15 @@ --- layout: post -title: Image overview in React Document editor component | Syncfusion -description: Learn here all about Word processor server docker image overview in Syncfusion React Document editor component of Syncfusion Essential JS 2 and more. +title: Image overview in React DOCX Editor component | Syncfusion +description: Learn here all about Word processor server docker image overview in Syncfusion React Document Editor component of Syncfusion Essential JS 2 and more. control: Word processor server docker image overview platform: document-processing documentation: ug domainurl: ##DomainURL## --- -# Word processor server docker image overview in React Document editor component +# Word processor server docker image overview in React Document Editor component -The [React DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/react-docx-editor) (also known as Document Editor)** is a component with editing capabilities like Microsoft Word. It is used to create, edit, view, and print Word documents. It provides all the common word processing abilities, including editing text; formatting contents; resizing images and tables; finding and replacing text; importing, exporting, and printing Word documents; and using bookmarks and tables of contents. +The [React Document Editor](https://www.syncfusion.com/docx-editor-sdk/react-docx-editor) (also known as Document Editor) is a component with editing capabilities like Microsoft Word. It is used to create, edit, view, and print Word documents. It provides all the common word processing abilities, including editing text; formatting contents; resizing images and tables; finding and replacing text; importing, exporting, and printing Word documents; and using bookmarks and tables of contents. This Docker image is the predefined Docker container of Syncfusion’s Word Processor backend. You can deploy it quickly to your infrastructure. @@ -22,7 +22,7 @@ The Word Processor is supported in the JavaScript, Angular, React, Vue, ASP.NET Have [`Docker`](https://www.docker.com/products/container-runtime#/download) installed in your environment: * On Windows, install [`Docker for Windows`](https://hub.docker.com/editions/community/docker-ce-desktop-windows). -* On macOS, install [`Docker for Mac`](https://hub.docker.com/editions/community/docker-ce-desktop-windows). +* On macOS, install [`Docker for Mac`](https://hub.docker.com/editions/community/docker-ce-desktop-mac). ## How to deploy Word Processor Docker image @@ -38,14 +38,14 @@ Have [`Docker`](https://www.docker.com/products/container-runtime#/download) ins version: '3.4' services: - word-processor-server: - image: syncfusion/word-processor-server:latest - environment: - #Provide your license key for activation - SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY - ports: - - "6002:80" - ``` + word-processor-server: + image: syncfusion/word-processor-server:latest + environment: + #Provide your license key for activation + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY + ports: + - "6002:80" + ``` **Step 3:** In a terminal tab, navigate to the directory where you’ve placed the docker-compose.yml file and execute the following. @@ -55,92 +55,92 @@ Have [`Docker`](https://www.docker.com/products/container-runtime#/download) ins Now the Word Processor server Docker instance runs in the localhost with the provided port number `http://localhost:6002`. Open this link in a browser and navigate to the Word Processor Web API control `http://localhost:6002/api/documenteditor`. It returns the default get method response. -**Step 4:** Append the Docker instance running the URL `(http://localhost:6002/api/documenteditor)` to the service URL in the client-side Word Processor control. For more information about how to get started with the Word Processor control, refer to this [`getting started page.`](../getting-started). +**Step 4:** Append the Docker instance running URL `(http://localhost:6002/api/documenteditor)` to the service URL in the client-side Word Processor control. For more information about how to get started with the Word Processor control, refer to this [`getting started page.`](../getting-started). -## How to configure spell checker dictionaries path in Docker compose file +## How to configure spell checker dictionary path in Docker compose file **Step 1:** In the Docker compose file, mount the local directory as a container volume using the following code. ``` - version: '3.4' + version: '3.4' services: - word-processor-server: - image: syncfusion/word-processor-server:latest - environment: - #Provide your license key for activation - SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY - volumes: - - ./data:/app/data - ports: - - "6002:80" - ``` + word-processor-server: + image: syncfusion/word-processor-server:latest + environment: + #Provide your license key for activation + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY + volumes: + - ./data:/app/data + ports: + - "6002:80" + ``` This YAML definition binds the data folder that is available in the Docker compose file directory. -**Step 2:** In the data folder, include the dictionary files (.dic, .aff) and JSON file. The JSON file should contain the language based dictionary file configuration in the following format. +**Step 2:** In the data folder, include the dictionary files (.dic, .aff) and JSON file. The JSON file should contain the language-based dictionary file configuration in the following format. ``` [ { - "LanguadeID": 1036, + "LanguageID": 1036, "DictionaryPath": "fr_FR.dic", "AffixPath": "fr_FR.aff", "PersonalDictPath": "customDict.dic" }, { - "LanguadeID": 1033, + "LanguageID": 1033, "DictionaryPath": "en_US.dic", "AffixPath": "en_US.aff", "PersonalDictPath": "customDict.dic" } - ] - ``` + ] + ``` ->Note: By default, the json file name should be "spellcheck.json". You can also use different file name by mounting the file name to 'SPELLCHECK_JSON_FILENAME' attribute in Docker compose file as below, +N> By default, the JSON file name should be "spellcheck.json". You can also use a different file name by mounting the file name to the 'SPELLCHECK_JSON_FILENAME' attribute in the Docker compose file as below. ``` - version: '3.4' - -services: - word-processor-server: - image: syncfusion/word-processor-server:latest - environment: - #Provide your license key for activation - SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY - SPELLCHECK_DICTIONARY_PATH: data - SPELLCHECK_JSON_FILENAME: spellcheck1.json - volumes: - - ./data:/app/data - ports: - - "6002:80" - ``` - -**Step 3:** For handling the personal dictionary, place an empty .dic file (e.g.,. customDict.dic file) in the data folder. + version: '3.4' + + services: + word-processor-server: + image: syncfusion/word-processor-server:latest + environment: + #Provide your license key for activation + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY + SPELLCHECK_DICTIONARY_PATH: data + SPELLCHECK_JSON_FILENAME: spellcheck1.json + volumes: + - ./data:/app/data + ports: + - "6002:80" + ``` + +**Step 3:** For handling the personal dictionary, place an empty .dic file (e.g., customDict.dic file) in the data folder. **Step 4:** Provide the configured volume path to the environment variable like in the following in the Docker compose file. ``` - version: '3.4' - services: - word-processor-server: - image: syncfusion/word-processo -server:latest - environment: - #Provide your license key for activation - SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY - SPELLCHECK_DICTIONARY_PATH: data - volumes: - - ./data:/app/data - ports: - - "6002:80" - ``` + version: '3.4' + services: + word-processor-server: + image: syncfusion/word-processor-server:latest + environment: + #Provide your license key for activation + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY + SPELLCHECK_DICTIONARY_PATH: data + volumes: + - ./data:/app/data + ports: + - "6002:80" + ``` ## How to copy template Word documents to Docker image -You can copy the required template Word documents into docker container while deploying the docker image to server. You can open these Word documents present in the server by passing the document path (name with relative path) to LoadDocument() web API. +You can copy the required template Word documents into the docker container while deploying the docker image to the server. You can open these Word documents present in the server by passing the document path (name with relative path) to the LoadDocument() web API. ->Note: Place the word files in the data folder mentioned in the volumes section(i.e., C:/Docker/Data) of the docker-compose.yml file. All the files present in the folder path (C:/Docker/Data) mentioned in the volumes section of ‘docker-compose.yml’ file will be copied to the respective folder (/app/Data) of docker container. The Word documents copied to docker container can be processed using the 'LoadDocument' web API. +N> Place the word files in the data folder mentioned in the volumes section (e.g., C:/Docker/Data) of the docker-compose.yml file. All the files present in the folder path (C:/Docker/Data) mentioned in the volumes section of the 'docker-compose.yml' file will be copied to the respective folder (/app/Data) of the docker container. The Word documents copied to the docker container can be processed using the 'LoadDocument' web API. -The following code example shows how to use LoadDocument() API in document editor. +The following code example shows how to use the LoadDocument() API in Document Editor. ```ts import * as ReactDOM from 'react-dom'; diff --git a/Document-Processing/Word/Word-Processor/react/shapes.md b/Document-Processing/Word/Word-Processor/react/shapes.md index dddf5db6da..9fb570617e 100644 --- a/Document-Processing/Word/Word-Processor/react/shapes.md +++ b/Document-Processing/Word/Word-Processor/react/shapes.md @@ -1,26 +1,26 @@ --- layout: post -title: Shapes in React Document editor component | Syncfusion -description: Learn here all about Shapes in Syncfusion React Document editor component of Syncfusion Essential JS 2 and more. +title: Shapes in React DOCX Editor component | Syncfusion +description: Learn here all about Shapes in Syncfusion React Document Editor component of Syncfusion Essential JS 2 and more. control: Shapes platform: document-processing documentation: ug domainurl: ##DomainURL## --- -# Shapes in React Document editor component +# Shapes in React Document Editor component -Shapes are drawing objects that include a text box, rectangles, lines, curves, circles, etc. It can be preset or custom geometry. +Shapes are drawing objects that include a text box, rectangles, lines, curves, circles, etc. They can have preset or custom geometry. ->Note: At present, [React DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/react-docx-editor) (Document Editor) does not have support to insert shapes. however, if the document contains a shape while importing, it will be preserved properly. +N> At present, [React Document Editor](https://www.syncfusion.com/docx-editor-sdk/react-docx-editor) (Document Editor) does not have support to insert shapes. However, if the document contains a shape while importing, it will be preserved properly. ## Supported shapes -The DocumentEditor has preservation support for Lines, Rectangle, Basic Shapes, Block Arrows, Equation Shapes,Flowchart and Stars and Banners. +The DocumentEditor has preservation support for Lines, Rectangle, Basic Shapes, Block Arrows, Equation Shapes, Flowchart and Stars and Banners. ![List of supported shapes in DocumentEditor](images/Shapes_images/supported_shapes.png) ->Note: When using ASP.NET MVC service, the unsupported shapes will be converted as image and preserved as image. +N> When using ASP.NET MVC service, the unsupported shapes will be converted to an image and preserved as an image. ## Text box Shape @@ -40,7 +40,7 @@ Text wrapping refers to how shapes fit with surrounding text in a document. Plea ## Positioning the shape -Document Editor preserves the position properties of the shape and displays the shape based on position properties. It does not support modifying the position properties. Whereas the shape will be automatically moved along with text edited if it is positioned relative to the line or paragraph. +Document Editor preserves the position properties of the shape and displays the shape based on position properties. It does not support modifying the position properties. However, the shape will be automatically moved along with the edited text if it is positioned relative to the line or paragraph. ## Online Demo From 5e8255bfec31e3b8a311cb2de678804488ac8ff8 Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Thu, 23 Jul 2026 19:26:24 +0530 Subject: [PATCH 005/513] 1043288: Updated the md file for react --- .../Word/Word-Processor/react/spell-check.md | 24 +++++----- .../Word/Word-Processor/react/styles.md | 46 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/react/spell-check.md b/Document-Processing/Word/Word-Processor/react/spell-check.md index 3f64097eff..1d10374fa8 100644 --- a/Document-Processing/Word/Word-Processor/react/spell-check.md +++ b/Document-Processing/Word/Word-Processor/react/spell-check.md @@ -1,16 +1,16 @@ --- layout: post title: Spell check in React DOCX Editor | Syncfusion -description: Learn how to use Spell check in the React DOCX Editor to detect and correct errors seamlessly- without relying on Microsoft Word. +description: Learn how to use Spell check in the React Document Editor to detect and correct errors seamlessly, without relying on Microsoft Word. control: Spell check platform: document-processing documentation: ug domainurl: ##DomainURL## --- -# Spell Check in React DOCX Editor +# Spell Check in React Document Editor -[React DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/react-docx-editor) (Document Editor) supports spell checking for document content. It identifies misspelled words and provides suggestions through a dialog and the context menu. The spell checker is compatible with [Hunspell](https://github.com/wooorm/dictionaries) dictionary files. +[React Document Editor](https://www.syncfusion.com/docx-editor-sdk/react-docx-editor) (Document Editor) supports spell checking for document content. It identifies misspelled words and provides suggestions through a dialog and the context menu. The spell checker is compatible with [Hunspell](https://github.com/wooorm/dictionaries) dictionary files. ## Features @@ -18,7 +18,7 @@ domainurl: ##DomainURL## * Provides options such as Ignore, Ignore All, Change, and Change All in the spell check dialog. -## Configure spell check in React DOCX Editor +## Configure spell check in React Document Editor Spell checking is enabled using the [enableSpellCheck](https://ej2.syncfusion.com/documentation/api/document-editor-container/index-default#enablespellcheck) property and by configuring the spellChecker settings. A server-side service is required to process text, detect misspelled words, and provide suggestions for display in the editor. @@ -41,11 +41,11 @@ function App() { let container: DocumentEditorContainerComponent = containerRef.current as DocumentEditorContainerComponent; // Get the SpellChecker instance from DocumentEditorContainer. let spellChecker: SpellChecker = container.documentEditor.spellChecker; - // set the language ID for spell checker. Here, 1033 is the language ID for English (United States). + // Set the language ID for spell checker. Here, 1033 is the language ID for English (United States). spellChecker.languageID = 1033; // remove the underline for misspelled words. spellChecker.removeUnderline = false; - // Allow suggestion for misspelled word + // Allow suggestions for misspelled words. spellChecker.allowSpellCheckAndSuggestion = true; } }, []); @@ -101,7 +101,7 @@ The following code example demonstrates how to configure this behavior. ```ts -container.documentEditor.spellChecker.removeUnderline = false; +container.documentEditor.spellChecker.removeUnderline = true; ``` @@ -113,7 +113,7 @@ The following code example demonstrates how to configure the languageID. ```ts -container.documentEditor.spellChecker.languageID = 1033; //LCID of "en-us"; +container.documentEditor.spellChecker.languageID = 1033; //LCID of "en-us" ``` @@ -173,21 +173,21 @@ container.documentEditor.spellChecker.enableOptimizedSpellCheck = true; ## Context menu -Right-click on an error word to open the context menu with spell check options. See the screenshot below for reference. +Right-click on a misspelled word to open the context menu with spell check options. See the screenshot below for reference. ### More suggestions -The context menu shows suggestions for misspelled words. By clicking the required word from the suggestions, the error word is replaced automatically. +The context menu shows suggestions for misspelled words. By clicking the required word from the suggestions, the misspelled word is replaced automatically. ### Add to dictionary -This option allows the current word to be added to the dictionary. As a result, the spell checker will not treat the word as an error in the future +This option allows the current word to be added to the dictionary. As a result, the spell checker will not treat the word as an error in the future. ### Ignore Once and Ignore All If the word should not be added to the dictionary and should not be marked as an error, the Ignore Once or Ignore All options can be used. -**Ignore**: Ignores only the current occurrence of a word. +**Ignore Once:** Ignores only the current occurrence of a word. **Ignore All:** Ignores all occurrences of a word in the entire document. diff --git a/Document-Processing/Word/Word-Processor/react/styles.md b/Document-Processing/Word/Word-Processor/react/styles.md index 7d68af8c96..10bd97ca8f 100644 --- a/Document-Processing/Word/Word-Processor/react/styles.md +++ b/Document-Processing/Word/Word-Processor/react/styles.md @@ -1,40 +1,40 @@ --- layout: post -title: Styles in React Document editor component | Syncfusion -description: Learn here all about Styles in Syncfusion React Document editor component of Syncfusion Essential JS 2 and more. +title: Styles in React DOCX Editor component | Syncfusion +description: Learn here all about Styles in Syncfusion React Document Editor component of Syncfusion Essential JS 2 and more. control: Styles platform: document-processing documentation: ug domainurl: ##DomainURL## --- -# Styles in React Document editor component +# Styles in React Document Editor component -Styles are useful for applying a set of formatting consistently throughout the document. In document editor, styles are created and added to a document programmatically or via the built-in Styles dialog. +Styles are useful for applying a set of formatting consistently throughout the document. In the Document Editor, styles are created and added to a document programmatically or via the built-in Styles dialog. ## Styles definition overview -A Style in document editor should have the following properties: +A style in the Document Editor should have the following properties: * **name**: Name of the style. All styles in a document have a unique name, which is used as an identifier when applying the style. * **type**: Specifies the document elements that the style will target. For example, paragraph or character. * **next**: Specifies the style that should be automatically applied to a new paragraph created after the current one. * **link**: Provides a relation between the paragraph and character style. -* **characterFormat**: Specifies the properties of paragraph and character style. +* **characterFormat**: Specifies the properties of paragraph and character styles. * **paragraphFormat**: Specifies the properties of paragraph style. * **basedOn**: Specifies that the current style inherits the style set to this property. This is how hierarchical styles are defined. It can be optional. -> The style type should match the inherited style type. For example, it is not possible to have a character style inherit a paragraph style. +N> The style type should match the inherited style type. For example, it is not possible to have a character style inherit a paragraph style. ## Default style -The default style for span and paragraph properties is normal. It internally inherits the default style of the document loaded or document editor component. +The default style for span and paragraph properties is the Normal style. It internally inherits the default style of the document loaded or Document Editor component. ## Style hierarchy -Each style initially checks its local value for the property that is being evaluated and turns to the style it is based on. If no local value is found, it turns to its default style. +Each style initially checks its local value for the property that is being evaluated and falls back to the style it is based on. If no local value is found, it falls back to its default style. -Style inheritance of different styles are listed as follows: +Style inheritance for different styles is listed as follows: ### Character style @@ -55,13 +55,13 @@ When a paragraph style is based on another paragraph style, the inheritance of t ### Linked style -Linked styles are composite styles and their components are paragraph and character styles with link between them. To apply paragraph properties, take the properties from the linked paragraph style. Similarly, to apply character properties, take the properties from linked character style. +Linked styles are composite styles and their components are paragraph and character styles with a link between them. To apply paragraph properties, take the properties from the linked paragraph style. Similarly, to apply character properties, take the properties from the linked character style. Linked styles are based on other linked styles or on paragraph styles. When a linked style is based on a paragraph style, the hierarchy of the properties is as follows: -* Paragraph properties are inherited from the ‘basedOn’ paragraph style. -* Character properties are inherited from the ‘basedOn’ paragraph style. +* Paragraph properties are inherited from the 'basedOn' paragraph style. +* Character properties are inherited from the 'basedOn' paragraph style. When a linked style is based on another linked style, the hierarchy of the properties is as follows: @@ -70,7 +70,7 @@ When a linked style is based on a paragraph style, the hierarchy of the properti ## Defining new styles -New Styles are defined and added to the style collection of the document. In this way, they will be discovered by the default UI and applied to the parts of a document. +New styles are defined and added to the style collection of the document. In this way, they will be discovered by the default UI and applied to the parts of a document. ### Defining a character style @@ -81,7 +81,7 @@ import * as ReactDOM from 'react-dom'; import * as React from 'react'; import { DocumentEditorComponent, SfdtExport, Selection, Editor } from '@syncfusion/ej2-react-documenteditor'; -//Inject require modules. +//Inject required modules. DocumentEditorComponent.Inject(SfdtExport, Selection, Editor); function App() { let documenteditor: DocumentEditorComponent; @@ -132,7 +132,7 @@ The following example shows how to programmatically create a paragraph style. import * as ReactDOM from 'react-dom'; import * as React from 'react'; import { DocumentEditorComponent, SfdtExport, Selection, Editor } from '@syncfusion/ej2-react-documenteditor'; -//Inject require module. +//Inject required modules. DocumentEditorComponent.Inject(SfdtExport, Selection, Editor); function App() { let documenteditor: DocumentEditorComponent; @@ -187,14 +187,14 @@ ReactDOM.render(, document.getElementById('sample')); ### Defining a linked style -The following example shows how to programmatically create linked style. +The following example shows how to programmatically create a linked style. ```ts import * as ReactDOM from 'react-dom'; import * as React from 'react'; import { DocumentEditorComponent, DocumentEditor, SfdtExport, Selection, Editor } from '@syncfusion/ej2-react-documenteditor'; -//Inject require module. +//Inject required modules. DocumentEditorComponent.Inject(SfdtExport, Selection, Editor); function App() { let documenteditor: DocumentEditorComponent; @@ -248,13 +248,13 @@ ReactDOM.render(, document.getElementById('sample')); ## Applying a style -The styles are applied using the **applyStyle** method of **editorModule**, the parameter should be passed is the **Name** of the Style. +The styles are applied using the **applyStyle** method of **editorModule**, the parameter to be passed is the **Name** of the style. -The styles of the **Character** type is applied to the currently selected part of the document. If there is no selection, the values that will be applied to the word at caret position. The styles of **Paragraph** type follow the same logic and are applied to all paragraphs in the selection or the current paragraph. +The styles of the **Character** type are applied to the currently selected part of the document. If there is no selection, the values will be applied to the word at the caret position. The styles of **Paragraph** type follow the same logic and are applied to all paragraphs in the selection or the current paragraph. -When there is no selection, styles of **Linked** type will change the values of the paragraph, and apply both the Paragraph and Character properties. When there is selection, Linked Style changes only the character properties of the selected text. +When there is no selection, styles of **Linked** type will change the values of the paragraph, and apply both the Paragraph and Character properties. When there is a selection, the linked style changes only the character properties of the selected text. -For example, the following line will apply the "New Linked" to the current paragraph. +For example, the following line will apply the "New Linked" style to the current paragraph. ```ts documenteditor.editor.applyStyle('New Linked'); @@ -264,7 +264,7 @@ documenteditor.editor.applyStyle('New Linked', true); ## Get Styles -You can get the styles in the document using the below code snippet. +You can get the styles in the document using the following code snippet. ```ts //Get paragraph styles From b36c997a99cad50608e9f6912d69a18d18ebc0a6 Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Fri, 24 Jul 2026 10:40:25 +0530 Subject: [PATCH 006/513] 1043288: implemented the changes to resolve CI issue. --- .../word-processor-server-docker-image-overview.md | 6 +++--- Document-Processing/Word/Word-Processor/react/shapes.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md b/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md index f5c5b283b1..cc43427ddb 100644 --- a/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md +++ b/Document-Processing/Word/Word-Processor/react/server-deployment/word-processor-server-docker-image-overview.md @@ -7,11 +7,11 @@ platform: document-processing documentation: ug domainurl: ##DomainURL## --- -# Word processor server docker image overview in React Document Editor component +# React Document Editor Server Docker Image Overview The [React Document Editor](https://www.syncfusion.com/docx-editor-sdk/react-docx-editor) (also known as Document Editor) is a component with editing capabilities like Microsoft Word. It is used to create, edit, view, and print Word documents. It provides all the common word processing abilities, including editing text; formatting contents; resizing images and tables; finding and replacing text; importing, exporting, and printing Word documents; and using bookmarks and tables of contents. -This Docker image is the predefined Docker container of Syncfusion’s Word Processor backend. You can deploy it quickly to your infrastructure. +This Docker image is the predefined Docker container of Syncfusion’s Word Processor back-end. You can deploy it quickly to your infrastructure. Word Processor is a commercial product, and it requires a valid license to use it in a production environment [`(request license or trial key).`](https://help.syncfusion.com/common/essential-studio/licensing/licensing-faq/where-can-i-get-a-license-key) @@ -115,7 +115,7 @@ N> By default, the JSON file name should be "spellcheck.json". You can also use - "6002:80" ``` -**Step 3:** For handling the personal dictionary, place an empty .dic file (e.g., customDict.dic file) in the data folder. +**Step 3:** For handling the personal dictionary, place an empty .dic file (e.g., customDictionary.dic file) in the data folder. **Step 4:** Provide the configured volume path to the environment variable like in the following in the Docker compose file. diff --git a/Document-Processing/Word/Word-Processor/react/shapes.md b/Document-Processing/Word/Word-Processor/react/shapes.md index 9fb570617e..a118af9079 100644 --- a/Document-Processing/Word/Word-Processor/react/shapes.md +++ b/Document-Processing/Word/Word-Processor/react/shapes.md @@ -44,4 +44,4 @@ Document Editor preserves the position properties of the shape and displays the ## Online Demo -Explore how to preserve auto shapes and grouped shapes in Word documents using the React Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/react/#/tailwind3/document-editor/autoshapes). +Explore how to preserve AutoShapes and grouped shapes in Word documents using the React Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/react/#/tailwind3/document-editor/autoshapes). From 8d50ca190d1e11def26340e498b9537adb226174 Mon Sep 17 00:00:00 2001 From: SujithkumarSekar Date: Fri, 24 Jul 2026 12:45:59 +0530 Subject: [PATCH 007/513] Committing resolved feedbacks --- .../NET/mail-merge/mail-merge-for-nested-groups.md | 2 +- .../NET/mail-merge/mail-merge-troubleshooting-tips.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md index 7c2cb63ab0..b28f44a3f2 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-for-nested-groups.md @@ -57,7 +57,7 @@ The [MailMerge](https://help.syncfusion.com/cr/document-processing/Syncfusion.Do The following code example shows how to perform a nested mail merge. -> **NOTE** +N> > `OleDbConnection` is supported only on Windows. It is not available on Linux or macOS, including in ASP.NET Core on non-Windows platforms. Use `Microsoft.ACE.OLEDB.12.0` instead of the deprecated `Microsoft.Jet.OLEDB.4.0` provider on modern Windows. N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications. diff --git a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md index efae8d65cd..efe6ee1049 100644 --- a/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md +++ b/Document-Processing/Word/Word-Library/NET/mail-merge/mail-merge-troubleshooting-tips.md @@ -38,6 +38,14 @@ public class Employee } {% endhighlight %} +{% highlight c# tabtitle="C# [Windows-specific]" %} +public class Employee +{ + public string FirstName { get; set; } // Matches merge field name + public string LastName { get; set; } // Matches merge field name +} +{% endhighlight %} + {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} Public Class Employee 'Matches merge field name From ce1b5d9afb528d1117c62e091a674e5e08ea89ac Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Mon, 27 Jul 2026 15:53:19 +0530 Subject: [PATCH 008/513] 1043289-modified angular files --- .../Word-Processor/angular/header-footer.md | 35 +++++++------- .../Word/Word-Processor/angular/history.md | 21 ++++----- .../how-to/add-save-button-in-toolbar.md | 10 ++-- .../auto-save-document-in-document-editor.md | 46 +++++++++---------- 4 files changed, 53 insertions(+), 59 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/header-footer.md b/Document-Processing/Word/Word-Processor/angular/header-footer.md index 084752fbac..cd88f5d661 100644 --- a/Document-Processing/Word/Word-Processor/angular/header-footer.md +++ b/Document-Processing/Word/Word-Processor/angular/header-footer.md @@ -1,7 +1,7 @@ --- layout: post -title: Header and Footer in Angular DOCX Editor component | Syncfusion -description: Learn about headers and footers in the Syncfusion Angular Document Editor component. +title: Header Footer in Angular DOCX Editor Component | Syncfusion +description: Learn here all about header and footer in Syncfusion Essential Angular Document Editor component, its elements and more. platform: document-processing control: Header and Footer documentation: ug @@ -10,13 +10,13 @@ domainurl: ##DomainURL## # Header and Footer in Angular DOCX Editor component -[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports headers and footers. Each section in the document can have the following types of headers and footers: +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports headers and footers in its document. Each section in the document can have the following types of headers and footers: * First page: Used only on the first page of the section. -* Even pages: Used on all even-numbered pages of the section. -* Default: Used on all pages of the section where first or even pages are not applicable or not specified. +* Even pages: Used on all even numbered pages in the section. +* Default: Used on all pages of the section, where first or even pages are not applicable or not specified. -Set the corresponding section-format properties as shown in the following code. +You can define this by setting format properties of the corresponding section using the following sample code. ```typescript //Defines whether different header footer is required for first page of the section @@ -25,9 +25,9 @@ this.documentEditor.selection.sectionFormat.differentFirstPage = true; this.documentEditor.selection.sectionFormat.differentOddAndEvenPages = true; ``` -## Go to Header Footer Region +## Go to Header and Footer Region -Double-click in the header or footer region to move the selection into it. You can also use the following code to achieve the same result. +Double click in the header or footer region to move the selection into it. You can also do this by using the following code. ```typescript this.documentEditor.selection.goToHeader(); @@ -39,18 +39,18 @@ this.documentEditor.selection.goToFooter(); ## Link to Previous -Link to Previous is enabled by default when the document has more than one section. Different header/footer types (first page, odd, even) cannot be linked together because they are independent. +The Link to Previous option is enabled by default when document has more than one section. If you're using different headers and footers such as different first page or different odd and even pages, they can't be linked together because they're all separate. -Before setting or getting the Link to Previous value, call [`goToHeader()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotoheader) or [`goToFooter()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotofooter) to move the selection into the corresponding region. +Before setting or getting the link to previous value, use the ['goToHeader'](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotoheader) or ['goToFooter'](https://ej2.syncfusion.com/angular/documentation/api/document-editor/selection#gotofooter) API to move the current selection to the header or footer region. -You can get or set the default header/footer Link to Previous value of the section at the cursor position using the following code. +You can get or set the default header and footer link to previous value of a section at cursor position by using the following sample code. ```typescript this.container.documentEditor.selection.sectionFormat.oddPageHeader.linkToPrevious = false; this.container.documentEditor.selection.sectionFormat.oddPageFooter.linkToPrevious = false; ``` -In case the document has different header and footer types, such as different first page, odd, and even pages. +In case the document has different header and footer types, such as different first page, odd, and even pages: ```typescript // Different first page @@ -61,26 +61,25 @@ this.container.documentEditor.selection.sectionFormat.evenPageHeader.linkToPrevi this.container.documentEditor.selection.sectionFormat.evenPageFooter.linkToPrevious = false; ``` -N> 1. When there is more than one section in the document, the Link to Previous option becomes available. -N> 2. By default, the Link to Previous option is disabled in the UI and returns `false` for the first section. +N> When there is more than one section in the document, the Link to Previous option becomes available. By default, this feature is in disabled state in UI and set to return false for the first section. ## Header and Footer Distance -You can define the distance of header region content from the top of the page. Use the following code to set the distance of the header region from the top of the page. +You can define the distance of header region content from the top of the page. Refer to the following sample code. ```typescript this.documentEditor.selection.sectionFormat.headerDistance = 36; ``` -Similarly, you can set the distance of the footer region from the bottom of the page using the following code. +In the same way, you can define the distance of footer region content from the bottom of the page. Refer to the following sample code. ```typescript this.documentEditor.selection.sectionFormat.footerDistance = 36; ``` -## Close Header Footer Region +## Close Header and Footer Region -Move the selection from the header or footer region back to the document body by double-clicking the document area, or use the following code. +Move the selection to the document body from header or footer region by double clicking or tapping the document area. You can also perform this by using the following sample code. ```typescript this.documentEditor.selection.closeHeaderFooter(); diff --git a/Document-Processing/Word/Word-Processor/angular/history.md b/Document-Processing/Word/Word-Processor/angular/history.md index 532081c727..73a24c54eb 100644 --- a/Document-Processing/Word/Word-Processor/angular/history.md +++ b/Document-Processing/Word/Word-Processor/angular/history.md @@ -1,7 +1,7 @@ --- layout: post title: History in Angular DOCX Editor component | Syncfusion -description: Learn about the history (undo/redo) feature in the Syncfusion Angular Document Editor component. +description: Learn here all about History in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: History documentation: ug @@ -10,11 +10,11 @@ domainurl: ##DomainURL## # History in Angular Document Editor component -[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) tracks all editing actions performed on the document, enabling undo and redo functionality. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) tracks the history of all editing actions done in the document, which allows undo and redo functionality. -## Enable or Disable History +## Enable or disable history -Inject the `EditorHistory` module in your application to provide history preservation functionality for `DocumentEditor`. Refer to the following code example. +Inject the ‘EditorHistory’ module in your application to provide history preservation functionality for the Document Editor. Refer to the following code example. ```typescript import { Component, ViewEncapsulation } from '@angular/core'; @@ -35,7 +35,7 @@ export class AppComponent { } ``` -You can enable or disable history preservation at any time using the `enableEditorHistory` property. Use the following code: +You can enable or disable history preservation for the Document Editor instance at any time using the ‘enableEditorHistory’ property. Refer to the following sample code. ```typescript this.documentEditor.enableEditorHistory = false; @@ -43,15 +43,14 @@ this.documentEditor.enableEditorHistory = false; ## Undo and Redo -You can perform undo and redo with the `Ctrl+Z` and `Ctrl+Y` keyboard shortcuts. The Document Editor also exposes APIs to perform undo and redo programmatically. - -To undo the last editing operation in the Document Editor, use the following code: +You can perform undo and redo using the ‘Ctrl+Z’ and ‘Ctrl+Y’ keyboard shortcuts. The Document Editor exposes APIs to do it programmatically. +To undo the last editing operation in the Document Editor, refer to the following sample code. ```typescript this.documentEditor.editorHistory.undo(); ``` -To redo the last undone action, use the following code: +To redo the last undone action, refer to the following code example. ```typescript this.documentEditor.editorHistory.redo(); @@ -59,12 +58,10 @@ this.documentEditor.editorHistory.redo(); ## Stack Size -Editing actions are maintained in a stack, so the most recent action is reverted first. By default, the Document Editor limits both the undo and redo stacks to 500 entries each. You can customize these limits using the following code: +History of editing actions is maintained in a stack, so that the last item will be reverted first. By default, the Document Editor limits the size of undo and redo stacks to 500 each respectively. However, you can customize this limit. Refer to the following sample code. ```typescript -//Set undo limit. this.documentEditor.editorHistory.undoLimit = 400; -//Set redo limit. this.documentEditor.editorHistory.redoLimit = 400; ``` diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md b/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md index 2d99486cf0..ad0a60c759 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/add-save-button-in-toolbar.md @@ -1,18 +1,18 @@ --- layout: post title: Add a Save Button in the Angular DOCX Editor Toolbar | Syncfusion -description: Learn how to add a save button to the Syncfusion Angular Document Editor toolbar. +description: Learn here to add save button in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Add save button tool bar documentation: ug domainurl: ##DomainURL## --- -# Add a Save Button in the Angular Document Editor Toolbar +# Add Save Button in Angular Document Editor Toolbar -## To Add a Save Button to the Existing Toolbar in DocumentEditorContainer +## To Add a Save Button to the Existing Toolbar in the Document Editor Container -[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) Container allows you to add a new button to the existing items in a toolbar. Use [`CustomToolbarItemModel`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/customToolbarItemModel/) to define the custom item, combine it with the existing items in the [`toolbarItems`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#toolbaritems) property, and define the click action in the [`toolbarClick`](https://ej2.syncfusion.com/angular/documentation/api/toolbar/clickEventArgs/) event. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) Container allows you to add a new button to the existing items in a toolbar using [`CustomToolbarItemModel`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/customToolbarItemModel/) and with existing items in [`toolbarItems`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#toolbaritems) property. Newly added item click action can be defined in [`toolbarClick`](https://ej2.syncfusion.com/angular/documentation/api/toolbar/clickEventArgs/). ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; @@ -104,4 +104,4 @@ export class AppComponent implements OnInit { } ``` -N> The default value of `toolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl']`. \ No newline at end of file +N> Default value of `toolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl']`. \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md index 2d6fa82504..36368c257b 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md @@ -1,20 +1,20 @@ --- layout: post -title: Auto Save to AWS S3 in Angular DOCX Editor | Syncfusion -description: Learn how to auto-save documents to AWS S3 from the Syncfusion Angular Document Editor component. +title: Auto Save Document in Angular DOCX Editor Component | Syncfusion +description: Learn here all about Auto save document in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Auto save document in document editor +control: DOCX Editor documentation: ug domainurl: ##DomainURL## --- -# Auto Save Document to AWS S3 in Angular Document Editor component +# Auto Save Document to AWS S3 in Angular DOCX Editor component -This article explains how to auto-save the document in AWS S3. You can save the edited content automatically at regular intervals, which reduces the risk of data loss by saving the open document at customized intervals. +In this article, we are going to see how to auto save the document in AWS S3. You can automatically save the edited content at regular intervals of time. It helps reduce the risk of data loss by saving an open document automatically at customized intervals. -The following example illustrates how to auto-save the document in AWS S3. +The following example illustrates how to auto save the document in AWS S3. -* On the client side, use the `contentChange` event to detect edits and save the document at regular intervals. When the `contentChanged` flag is `true`, the document is sent to the server in Document format using the [`saveAsBlob()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. +* In the client-side, using the content change event, we can automatically save the edited content at regular intervals of time. Based on the `contentChanged` boolean, the document is sent as DOCX format to the server-side using the [`saveAsBlob`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. ```typescript /** @@ -43,11 +43,11 @@ export class AppComponent { setInterval(() => { if (this.contentChanged) { - //You can save the document as below - this. container.documentEditor.saveAsBlob('Docx').then((blob: Blob) => { - console.log('Saved sucessfully'); + // Save the document as shown below. + this.container.documentEditor.saveAsBlob('Docx').then((blob: Blob) => { + console.log('Saved successfully'); let exportedDocument: Blob = blob; - //Now, save the document where ever you want. + // Save the document wherever you want. let formData: FormData = new FormData(); formData.append('fileName', 'sample.docx'); formData.append('data', exportedDocument); @@ -79,13 +79,11 @@ export class AppComponent { } ``` -N> 1. The Web Service link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` used in the `serviceUrl` property of the Document Editor is intended solely for demonstration and evaluation purposes. -N> 2. For production deployment, please host your own Web Service with your required server configurations. -N> 3. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own Web Service and use it for the `serviceUrl` property. +N> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. -* On the server side, configure the access key and secret key in the `web.config` file and register the profile in `startup.cs`. +* In the server-side, configure the access key and secret key in the `web.config` file and register the profile in `startup.cs`. -In `web.config`, add key like below format: +In `web.config`, add a key in the following format: ```c# @@ -95,13 +93,13 @@ In `web.config`, add key like below format: ``` -In `startup.cs`, register profile in below format: +In `startup.cs`, register the profile in the following format: ```c# Amazon.Util.ProfileManager.RegisterProfile("sync_development","", ""); ``` -* On the server side, receive the stream from the client and process it to save the document in AWS S3. Add a Web API method in a controller file to save the document in AWS S3, as shown below. +* In the server-side, receive the stream content from the client-side and process it to save the document in AWS S3. Add a Web API in the controller file like below to save the document in AWS S3. ```c# [AcceptVerbs("Post")] @@ -115,7 +113,7 @@ public string SaveToS3() file.CopyTo(stream); UploadFileStreamToS3(stream, "documenteditor", "", "GettingStarted.docx"); stream.Close(); - return "Success"; + return "Sucess"; } public bool UploadFileStreamToS3(System.IO.Stream localFilePath, string bucketName, string subDirectoryInBucket, string fileNameInS3) @@ -127,15 +125,15 @@ public bool UploadFileStreamToS3(System.IO.Stream localFilePath, string bucketNa if (subDirectoryInBucket == "" || subDirectoryInBucket == null) { - request.BucketName = bucketName; // No subdirectory; just the bucket name. +request.BucketName = bucketName; //no subdirectory just bucket name } else - { // Subdirectory and bucket name. - request.BucketName = bucketName + @"/" + subDirectoryInBucket; + { // subdirectory and bucket name +request.BucketName = bucketName + @"/" + subDirectoryInBucket; } - request.Key = fileNameInS3; // File name in S3. + request.Key = fileNameInS3; //file name up in S3 request.InputStream = localFilePath; - utility.Upload(request); // Commence the transfer. + utility.Upload(request); //commensing the transfer return true; //indicate that the file was sent } From a607eec9b549add212405d048ab3108a9d18b4ef Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Mon, 27 Jul 2026 16:01:07 +0530 Subject: [PATCH 009/513] 1043289-changed docx in document editor --- .../angular/how-to/auto-save-document-in-document-editor.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md index 36368c257b..413219ac03 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document-in-document-editor.md @@ -3,12 +3,12 @@ layout: post title: Auto Save Document in Angular DOCX Editor Component | Syncfusion description: Learn here all about Auto save document in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing -control: DOCX Editor +control: Auto save document documentation: ug domainurl: ##DomainURL## --- -# Auto Save Document to AWS S3 in Angular DOCX Editor component +# Auto Save Document to AWS S3 in Angular Document Editor component In this article, we are going to see how to auto save the document in AWS S3. You can automatically save the edited content at regular intervals of time. It helps reduce the risk of data loss by saving an open document automatically at customized intervals. From afc3c8e6eb8544c4a219e278ae53823cd5944092 Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Mon, 27 Jul 2026 16:09:58 +0530 Subject: [PATCH 010/513] Task(1043618): Revamped the UG documentation for the How-To samples in the Angular PDF Viewer platform --- .../how-to/add-annotation-in-text-search.md | 4 ++-- .../angular/how-to/add-header-value.md | 7 ++++--- .../angular/how-to/annotation-selectors.md | 7 ++++--- ...ge-author-name-using-annotation-settings.md | 12 ++++++------ .../angular/how-to/change-selection-border.md | 10 +++++----- .../configure-annotation-selector-setting.md | 4 ++-- .../PDF-Viewer/angular/how-to/conformance.md | 2 +- .../how-to/control-annotation-visibility.md | 7 +++---- ...-pdf-library-bounds-to-pdf-viewer-bounds.md | 4 ++-- ...te-a-standalone-pdf-viewer-in-angular-12.md | 6 +++--- ...lar-17-and-above-with-no-standalone-flag.md | 8 ++++---- ...-17-and-above-without-no-standalone-flag.md | 8 ++++---- .../angular/how-to/custom-context-menu.md | 6 +++--- .../how-to/custom-font-signature-field.md | 15 ++++++++------- .../PDF-Viewer/angular/how-to/custom-fonts.md | 4 ++-- .../PDF-Viewer/angular/how-to/custom-stamp.md | 8 ++++---- .../angular/how-to/delete-annotation.md | 8 +++++--- .../angular/how-to/download-start-event.md | 2 +- .../how-to/enable-disable-annotation.md | 6 +++--- .../angular/how-to/enable-local-storage.md | 2 +- .../angular/how-to/enable-text-selection.md | 4 ++-- .../angular/how-to/export-as-image.md | 4 +++- .../angular/how-to/extract-text-completed.md | 6 +++--- .../angular/how-to/extract-text-option.md | 5 ++--- .../PDF-Viewer/angular/how-to/extract-text.md | 18 +++++++++--------- 25 files changed, 86 insertions(+), 81 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-annotation-in-text-search.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-annotation-in-text-search.md index feb4880866..b9c7a1314b 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-annotation-in-text-search.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-annotation-in-text-search.md @@ -1,6 +1,6 @@ --- layout: post -title: Add Rectangle Annotation via Text Search | Syncfusion +title: Add Rectangle Annotations via Text Search | Syncfusion description: Learn to add rectangle annotations using text search bounds in the Angular PDF Viewer component, including initialization and search controls. platform: document-processing control: PDF Viewer @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Add Rectangle Annotations via Text Search in Angular PDF Viewer -A concise guide that demonstrates how to add rectangle annotations at highlighted text search results in the Angular PDF Viewer. The guide explains where to wire the callback, required services, and quick troubleshooting steps. +Learn how to add rectangle annotations at highlighted text search results in the Angular PDF Viewer by wiring a callback to the `textSearchHighlight` event. ## Steps to add rectangle annotations on search result highlight diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-header-value.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-header-value.md index 52741bf2e0..e435f9667c 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-header-value.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/add-header-value.md @@ -5,16 +5,17 @@ description: Learn how to include custom headers in PDF Viewer AJAX requests usi platform: document-processing control: PDF Viewer documentation: ug +domainurl: ##DomainURL## --- # Add header values in the Angular PDF Viewer -Use the ajaxHeaders property in the PDF Viewer’s [ajaxRequestSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#ajaxrequestsettings) to include custom headers with each AJAX request. +Use the ajaxHeaders property in the PDF Viewer's [ajaxRequestSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#ajaxrequestsettings) to include custom headers with each AJAX request. -Example: Add a custom Authorization header using `ajaxRequestSettings` in an Angular component +The following example adds a custom Authorization header using `ajaxRequestSettings` in an Angular component. {% tabs %} -{% highlight ts tabtitle="index.ts" %} +{% highlight ts tabtitle="app.component.ts" %} import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core'; import { PdfViewerComponent, diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/annotation-selectors.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/annotation-selectors.md index 95fd439082..f67dfb3e30 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/annotation-selectors.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/annotation-selectors.md @@ -5,13 +5,14 @@ description: Learn how to customize annotation selectors in the Angular PDF View platform: document-processing control: PDF Viewer documentation: ug +domainurl: ##DomainURL## --- -# Customize annotation selectors in Angular PDF Viewer +# Customize Annotation Selectors in Angular PDF Viewer -Use the [annotationSelectorSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#annotationselectorsettings) property to configure the appearance and behavior of annotation selectors. This includes selection handles and resizer (for example, handle shape and size), which determine how users interact with annotations during editing. +Use the [annotationSelectorSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#annotationselectorsettings) property to configure the appearance and behavior of annotation selectors. This includes the selection handles and the resizer (for example, the shape and size of the resizer handles), which determine how users interact with annotations during editing. -The example below changes the selector's resizer handle shape to circular and opens an existing annotation for editing. Setting `resizerShape = 'Circle'` updates the selector appearance to circular resizer handles; ensure an annotation exists before calling `editAnnotation` to avoid runtime errors. +The example below changes the selector's resizer handle shape to circular and opens an existing annotation for editing. Setting `resizerShape = 'Circle'` updates the selector appearance to circular resizer handles. Ensure an annotation exists before calling `editAnnotation` to avoid runtime errors. Example: Customize the selector of a shape annotation diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-author-name-using-annotation-settings.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-author-name-using-annotation-settings.md index ed278ae55b..d4ed7df040 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-author-name-using-annotation-settings.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-author-name-using-annotation-settings.md @@ -9,13 +9,13 @@ domainurl: ##DomainURL## --- -# Change author name using annotation settings in Angular PDF Viewer +# Change Author Name Using Annotation Settings in Angular PDF Viewer The `annotationSettings` API provides a central way to configure properties that apply to all annotations in the viewer. API name: annotationSettings -| Property Name | Data type & Default Value | Description | +| Property Name | Data type and Default Value | Description | |---|---|---| | author | String ("Guest") | Specifies the author of the annotation. | | minWidth | Number (0) | Specifies the minimum width of the annotation. | @@ -23,8 +23,8 @@ API name: annotationSettings | minHeight | Number (0) | Specifies the minimum height of the annotation. | | maxHeight | Number (0) | Specifies the maximum height of the annotation. | | isLock | Boolean (false) | Specifies whether the annotation is locked. If true, the annotation cannot be selected. | -| isPrint | Boolean (true) | Specifies whether the annotation is included in print actions. | -| isDownload | Boolean (true) | Specifies whether the annotation is included in download actions. | +| skipPrint | Boolean (true) | Specifies whether the annotation is included in print actions. | +| skipDownload | Boolean (true) | Specifies whether the annotation is included in download actions. | | Free Text Settings | | allowOnlyTextInput | Boolean (false) | Specifies text-only mode for free text annotations. If true, moving or resizing is disabled. | @@ -80,8 +80,8 @@ import { AnnotationService, AnnotationSettingsModel, BookmarkViewService, FormFi ` }) export class AppComponent { - public serviceUrl = 'https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer/'; - public docPath = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; + public serviceUrl: string = 'https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer/'; + public docPath: string = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; public annotationSettings: AnnotationSettingsModel = { author: 'syncfusion', minHeight: 30, maxHeight: 500, minWidth: 30, maxWidth: 500, isLock: false, skipPrint: false, skipDownload: false }; diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md index 11c1f08ba3..9ee23209f9 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md @@ -1,16 +1,16 @@ --- layout: post -title: Change selection border in Angular PDF Viewer component | Syncfusion -description: Learn here all about Change selection border in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +title: Change the selection border in Angular PDF Viewer component | Syncfusion +description: Learn how to change the selection border in the Syncfusion Angular PDF Viewer component. platform: document-processing -control: Change selection border +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- -# Customize the selection border +# Change the selection border -The PDF Viewer library allows you to customize the annotations selection borders using the [**annotationSelectorSettings**](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/annotationSelectorSettingsModel#annotationselectorsettingsmodel) Property. +The PDF Viewer library allows you to customize the annotations selection borders using the [**annotationSelectorSettings**](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/annotationSelectorSettingsModel#annotationselectorsettingsmodel) property. Recommended steps diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md index 98263b74c1..ce3a82ee9f 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md @@ -18,7 +18,7 @@ Use the [annotationSelectorSettings](https://ej2.syncfusion.com/angular/document The [AnnotationSelectorSettingsModel](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/annotationSelectorSettingsModel/) defines selector appearance and behavior settings—such as border colors, resizer appearance, and selector line style—providing fine-grained control over how annotations are displayed and manipulated. -Steps to configure annotation selector settings +Steps to configure annotation selector settings: - Step 1: Create a PDF Viewer instance and initialize it. - Step 2: Set the annotationSelectorSettings property to customize selector behavior. @@ -152,7 +152,7 @@ export class AppComponent implements OnInit { {% endhighlight %} {% endtabs %} -#### Key properties +### Key properties - selectionBorderColor: Sets the color for the border around selected annotations. - resizerBorderColor: Sets the color for the border of the resizer handles. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md index 1283206dac..3aab6a51cf 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# supported PDF conformance in Anglar PDF Viewer component +# Supported PDF Conformance in an Angular PDF Viewer Component The Angular PDF Viewer supports the following PDF/A and PDF/X conformance levels: diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md index 37cc4a74c2..3fb17cb553 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Control annotations visibility in PDF Viewer +# Control annotation visibility in PDF Viewer ## Overview @@ -16,9 +16,9 @@ This guide shows how to display annotations in the Angular PDF Viewer while prev ## Steps to control annotation visibility -**Step 1:** Follow the steps in the getting-started guide (https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a basic PDF Viewer sample. +**Step 1:** Follow the steps in the [getting-started guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a basic PDF Viewer sample. -**Step 2:** Add controls for annotation modification and downloading +**Step 2:** Add controls for annotation modification and downloading. Add buttons in the component template to modify annotations and to trigger a download of the PDF. @@ -182,7 +182,6 @@ save() { {% endhighlight %} {% endtabs %} - After performing these steps, annotations remain visible in the viewer but are hidden in the downloaded PDF. [View sample in GitHub](https://github.com/SyncfusionExamples/angular-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md index 550cc565d6..44a7cc9390 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md @@ -12,7 +12,7 @@ domainurl: ##DomainURL## When exporting annotations from the PDF Library, convert the annotation bounds into the PDF Viewer coordinate system so exported annotations appear at the correct position and scale in the viewer. -Steps to convert bounds values +Steps to convert bounds values: **Step 1:** Initialize the PDF Viewer instance @@ -86,7 +86,7 @@ Fetch the blob data and convert it into a JSON object. } ``` -**Conclusion** +## Conclusion These steps convert PDF Library bounds values into PDF Viewer bounds values when exporting annotations as JSON, helping maintain accurate annotation placement. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-12.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-12.md index 7148a75892..6d8eeb9ff5 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-12.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-12.md @@ -17,9 +17,9 @@ N> For Angular 17+, see the following links: * [Create a Standalone PDF Viewer in Angular 17 and above with-no-standalone-flag](./how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-with-no-standalone-flag). * [Create a Standalone PDF Viewer in Angular 17 and above without --no-standalone flag](./how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-without-no-standalone-flag). -## Setup Angular Environment +## Set Up Angular Environment -You can use the [`Angular CLI`](https://github.com/angular/angular-cli) to setup your Angular applications. +You can use the [`Angular CLI`](https://github.com/angular/angular-cli) to set up your Angular applications. To install the latest Angular CLI globally use the following command. ```bash @@ -162,7 +162,7 @@ View the sample in GitHub to [load PDF Viewer with local resources](https://gith ## Run the application -Use the following command to run the application in browser. +Use the following command to run the application in the browser. ```javascript ng serve --open diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-with-no-standalone-flag.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-with-no-standalone-flag.md index f0e05c63cb..fceb3f82a6 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-with-no-standalone-flag.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-with-no-standalone-flag.md @@ -1,7 +1,7 @@ --- layout: post title: PDF Viewer in Angular 17+ with no-standalone | Syncfusion -description: Checkout and learn about Create a Standalone PDF Viewer in Angular 17 and above with --no-standalone flag of Syncfusion Essential JS 2 and more details. +description: Learn how to create a PDF Viewer in Angular 17 and above using the --no-standalone flag with Syncfusion Essential JS 2 and more details. platform: document-processing control: PDF Viewer documentation: ug @@ -12,9 +12,9 @@ domainurl: ##DomainURL## This article describes the steps required to create a standalone Angular PDF Viewer for Angular 17 and later using the `--no-standalone` option. -## Setup Angular Environment +## Set up Angular Environment -You can use the [`Angular CLI`](https://github.com/angular/angular-cli) to setup your Angular applications. +You can use the [`Angular CLI`](https://github.com/angular/angular-cli) to set up your Angular applications. To install the latest Angular CLI globally use the following command. ```bash @@ -133,7 +133,7 @@ export class AppComponent implements OnInit { Use the following command to run the application in the browser. -```javascript +```bash ng serve --open ``` diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-without-no-standalone-flag.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-without-no-standalone-flag.md index 37c2fa838f..2d5331b108 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-without-no-standalone-flag.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/create-a-standalone-pdf-viewer-in-angular-17-and-above-without-no-standalone-flag.md @@ -12,7 +12,7 @@ domainurl: ##DomainURL## This section explains the steps required to create a simple Standalone Angular PDF Viewer in Angular 17 and above without --no-standalone flag. -## Setup Angular Environment +## Set up Angular Environment Use the Angular CLI to create and manage Angular applications. To install the latest Angular CLI globally use the following command. @@ -50,7 +50,7 @@ On Windows, use an equivalent command or add an npm script to copy assets cross- ## Registering PDF Viewer Module and Adding PDF Viewer component -Import PDF Viewer module into Angular application from the package `@syncfusion/ej2-angular-pdfviewer` and Add the Angular PDF Viewer by using `` selector in `template` section of the `src/app/app.component.ts` file to render the PDF Viewer component. +Import PDF Viewer module into Angular application from the package `@syncfusion/ej2-angular-pdfviewer` and add the Angular PDF Viewer by using `` selector in `template` section of the `src/app/app.component.ts` file to render the PDF Viewer component. ```typescript @@ -109,9 +109,9 @@ Add the Angular PDF Viewer component’s styles as given below in `src/styles.cs ``` ## Run the application -Use the following command to run the application in browser. +Use the following command to run the application in the browser. -```javascript +```bash ng serve --open ``` diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-context-menu.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-context-menu.md index 9eeb11d33e..f270387872 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-context-menu.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-context-menu.md @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Customize the context menu in Angular PDF Viewer -The PDF Viewer supports adding custom options to the context menu using the `addCustomMenu()` method; define custom actions with `customContextMenuSelect()`. See the addCustomMenu and [customContextMenuSelect()](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#customcontextmenuselect) API. +The PDF Viewer supports adding custom options to the context menu using the `addCustomMenu()` method; define custom actions with `customContextMenuSelect()`. See the `addCustomMenu()` and [customContextMenuSelect()](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#customcontextmenuselect) API. ### Add a custom option @@ -99,7 +99,7 @@ Toggle the display of the default context menu. When the addCustomMenu parameter } ``` -#### show or hide custom items before opening +#### Show or hide custom items before opening Use [customContextMenuBeforeOpen()](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#customcontextmenubeforeopen) to hide or show custom options dynamically. @@ -222,7 +222,7 @@ The following is the output of the custom context menu with customization. {% endtabs %} N> To set up the **server-backed PDF Viewer**, -Add the below serviceUrl in the `app.ts` file +Add the serviceUrl below in the `app.ts` file `public service: string = 'https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer'`; Within the template, configure the PDF Viewer by adding the `[serviceUrl]='service'` attribute inside the div element. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-font-signature-field.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-font-signature-field.md index e1d6afc17b..d4ddb82fb4 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-font-signature-field.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-font-signature-field.md @@ -1,6 +1,6 @@ --- -Layout: post -title: To change the font family in Syncfusion Angular PDF Viewer component +layout: post +title: Change the font family in Syncfusion Angular PDF Viewer component description: Learn how to change the font family in Form Field's Type Signature in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer @@ -18,7 +18,7 @@ The following steps are used to include custom fonts for signature and initial f **Step 1:** Follow the steps in the [Getting Started](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) guide to create a simple PDF Viewer sample. -**Step 2:** Insert the following code snippet to implement the functionality for using custom fonts in Signature field. +**Step 2:** Insert the following code snippet to implement the functionality for using custom fonts in the signature field. ```html @@ -30,7 +30,7 @@ The following steps are used to include custom fonts for signature and initial f ```ts changeFontFamily(){ var pdfviewer=(document.getElementById('pdfviewer')).ej2_instances[0]; - pdfviewer.SignatureFieldSettings.typeSignatureFonts = [ + pdfviewer.signatureFieldSettings.typeSignatureFonts = [ 'Allura', 'Tangerine', 'Sacramento', @@ -40,7 +40,8 @@ changeFontFamily(){ ``` ### Initial Field -Insert the following code snippet to implement the functionality for using custom fonts in Initial field. + +Insert the following code snippet to implement the functionality for using custom fonts in the initial field. ```html @@ -52,7 +53,7 @@ Insert the following code snippet to implement the functionality for using custo ```ts changeFontFamily(){ var pdfviewer=(document.getElementById('pdfviewer')).ej2_instances[0]; - pdfviewer.InitialFieldSettings.typeInitialFonts = [ + pdfviewer.initialFieldSettings.typeInitialFonts = [ 'Allura', 'Tangerine', 'Sacramento', @@ -61,4 +62,4 @@ changeFontFamily(){ } ``` -Implementing this enables use of custom fonts in form-field signature and initial fields. \ No newline at end of file +Implementing this enables the use of custom fonts in form-field signature and initial fields. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-fonts.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-fonts.md index a7804a1774..c579835b6d 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-fonts.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-fonts.md @@ -1,7 +1,7 @@ --- layout: post title: Add custom fonts in Angular PDF Viewer | Syncfusion -description: Learn how to add and load custom TTF fonts for documents displayed in the Angular PDF Viewer using the customFonts property. +description: Learn how to add and load custom TTF fonts for form fields displayed in the Angular PDF Viewer using the customFonts property. platform: document-processing control: PDF Viewer documentation: ug @@ -93,6 +93,6 @@ Custom fonts can be applied to the following form field types: - If text rendered using a custom font exceeds the form field’s bounds, the downloaded PDF may render incorrectly in some third party PDF viewers. - The same content displays correctly in the **Syncfusion PDF Viewer**. -## To avoid rendering issues: +## To avoid rendering issues - Use an appropriate font size that fits within the form field. - Increase the size of the form field before saving or downloading the PDF. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-stamp.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-stamp.md index 19507a44f0..ba7bc0a419 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-stamp.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/custom-stamp.md @@ -1,14 +1,14 @@ --- layout: post -title: Add the custom stamp based on the free text bounds | Syncfusion -description: Learn how to add the custom stamp based on the free text bounds in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +title: Add a custom stamp based on the free text bounds | Syncfusion +description: Learn how to add a custom stamp based on the free text bounds in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Add the custom stamp based on the free text bounds +control: Add a custom stamp based on the free text bounds documentation: ug domainurl: ##DomainURL## --- -# Add the custom stamp based on the free text bounds +# Add a custom stamp based on the free text bounds When adding a stamp programmatically, the PDF Viewer expects offset values in points (1 point = 1/72 inch). Typical displays use 96 DPI for pixels, so convert pixels to points using: points = pixels * 72 / 96. Also consider page scale and rotation when positioning stamps so the stamp appears at the expected location on the page. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md index 22c1e8230a..91a03a27e8 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md @@ -1,9 +1,9 @@ --- layout: post -title: Delete annotation in Angular PDF Viewer component | Syncfusion -description: Learn here all about Delete annotation in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +title: Delete a specific annotation in Angular PDF Viewer component | Syncfusion +description: Learn here all about Delete a specific annotation in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Delete annotation +control: Delete a specific annotation documentation: ug domainurl: ##DomainURL## --- @@ -24,6 +24,8 @@ The following steps are used to delete a specific annotation from PDF Document: ```typescript // Delete Annotation by id. +// Note: viewer.annotationCollection must contain at least one annotation, +// otherwise accessing index [0] will throw. deleteAnnotationbyId() { var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; viewer.annotationModule.deleteAnnotationById( diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md index 4e66bf9ac3..60a7691be3 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md @@ -1,7 +1,7 @@ --- layout: post title: Controlling File Downloads in Angular PDF Viewer component | Syncfusion -description: Learn here how to Controlling File Downloads in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn here how to control file downloads in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer documentation: ug diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md index a1e896ea2e..3c01646af3 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md @@ -1,7 +1,7 @@ --- layout: post -title: Enable and disable the delete button based on annotation | Syncfusion -description: Learn to enable and disable delete button based on annotation events in Syncfusion Angular PDF Viewer component and more. +title: Enable and disable the delete button based on annotation selection and unselection | Syncfusion +description: Learn to enable and disable the delete button based on annotation selection and unselection events in Syncfusion Angular PDF Viewer component and more. platform: document-processing control: How to enable and disable the delete button based on annotation selection and unselection events documentation: ug @@ -51,7 +51,7 @@ Example: id ="DeleteButton" disabled="true" (click)="deleteSelectedAnnotation()"> - + ``` diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-local-storage.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-local-storage.md index 88fe3e70d2..b61a479361 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-local-storage.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-local-storage.md @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Managing Local Storage in PDF Viewer -The PDF Viewer exposes the `enableLocalStorage` property to control how session-specific viewer data is stored. Configure this property to choose between the viewer's internal storage mechanism (in-memory collection) and the browser's session storage. +The PDF Viewer exposes the `enableLocalStorage` property to control how session-specific viewer data is stored, such as annotations and form field values created during the current session. Configure this property to choose between the viewer's internal storage mechanism (in-memory collection) and the browser's session storage. ### Using the `enableLocalStorage` property diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-text-selection.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-text-selection.md index 699ed9dd3b..4fb7225fdf 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-text-selection.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-text-selection.md @@ -83,7 +83,7 @@ export class AppComponent { **Set `enableTextSelection` to false** -Use the [`enableTextSelection`](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#enabletextselection) property during initialization to disable or enable text selection. The following example disables the text selection during initialization. +Use the [`enableTextSelection`](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer#enabletextselection) property during initialization to disable or enable text selection. The following example disables text selection during initialization. {% tabs %} {% highlight ts tabtitle="Standalone" %} @@ -248,5 +248,5 @@ If text selection remains active, ensure that the [`TextSelectionService`](https ## See also -- [Text Selection API reference](../text-selection/reference) +- [Text Selection API Events](../text-selection/text-selection-api-events) - [Angular PDF Viewer events](../events) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md index 5db575366d..3473fe5315 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md @@ -12,7 +12,7 @@ domainurl: ##DomainURL## The PDF Viewer component can export pages as Base64-encoded image strings using the `exportAsImage()` method (single page) and `exportAsImages()` method (page range). The examples below demonstrate single-page export, range export, and how to specify a custom image size. -The following steps are used to exportAsImage. +The following steps are used to implement exportAsImage. **Step 1:** Follow the steps provided in the [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF Viewer sample. @@ -65,6 +65,7 @@ Export a page range; the method returns an array of Base64-encoded image strings ```ts exportAsImages() { + let imageDetails; let startPageIndex: number = 1; let endPageIndex: number = 5; var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; @@ -85,6 +86,7 @@ Pass a `Size` object when exporting a page range to control the output image dim ```ts exportAsImageWithSize() { + let imageDetails; let startPageIndex: number = 1; let endPageIndex: number = 5; let size: Size = new Size(200,500); diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md index 2386d8fc27..56be29f104 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md @@ -3,7 +3,7 @@ layout: post title: extractTextCompleted Event in Angular PDF Viewer component | Syncfusion description: Learn here all about extractTextCompleted Event in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: extractTextCompleted +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -12,11 +12,11 @@ domainurl: ##DomainURL## The PDF Viewer can extract page text along with bounding information. Enable text extraction using the `isExtractText` property and handle the `extractTextCompleted` event to receive extracted text and bounds for the document. -The following steps are used to extract the text from the page. +The following steps are used to extract text from a page. **Step 1:** Follow the steps provided in the [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF Viewer sample. -**Step 2:** The following code snippet explains how to extract the text from a page . +**Step 2:** The following code snippet explains how to extract text from a page. ```html Text Search: When using the `extractTextOption.TextOnly` and `extractTextOption.None` option, the findText method will not work. Instead, you should use the findTextAsync method to perform text searches asynchronously. +N> Text Search: When using the `extractTextOption.TextOnly` and `extractTextOption.None` options, the findText method will not work. Instead, you should use the findTextAsync method to perform text searches asynchronously. [View sample in GitHub](https://github.com/SyncfusionExamples/angular-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md index 6ffdaf71b4..d039412dce 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md @@ -1,9 +1,9 @@ --- layout: post -title: Extract Text in Vue PDF Viewer component | Syncfusion -description: Learn about the Extract Text in Syncfusion Vue PDF Viewer component of Syncfusion Essential JS 2 and more. -control: Extract Text -platform: ej2-vue +title: Extract Text in Angular PDF Viewer component | Syncfusion +description: Learn about the Extract Text in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +control: PDF Viewer +platform: document-processing documentation: ug domainurl: ##DomainURL## --- @@ -48,8 +48,8 @@ import { selector: 'app-root', template: `
- - + + { console.log('Extracted Text from Page 1:'); @@ -88,7 +88,7 @@ export class AppComponent implements OnInit { } // Function to extract text from a range of pages (pages 0 to 2) -extrctsText(): void { +extractTexts(): void { const viewer = (document.getElementById('pdfViewer') as any).ej2_instances[0]; viewer.extractText(0, 2, 'TextOnly').then((val: any) => { console.log('Extracted Text from Pages 0 to 2:'); @@ -102,6 +102,6 @@ extrctsText(): void { #### Explanation: **Single Page Extraction:** The first `extractText` call extracts text from page 1 (`startIndex = 1`), using the 'TextOnly' option for plain text extraction. -**Multiple Pages Extraction:** The second extractText call extracts text from pages 0 through 2 (`startIndex = 0, endIndex = 2`), using the `TextOnly` option for plain text extraction. +**Multiple Pages Extraction:** The second `extractText` call extracts text from pages 0 through 2 (`startIndex = 0, endIndex = 2`), using the `TextOnly` option for plain text extraction. [View sample in GitHub](https://github.com/SyncfusionExamples/angular-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file From 84420563c2dfc533d45f27801f4bfd321dddbbd1 Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Mon, 27 Jul 2026 16:14:28 +0530 Subject: [PATCH 011/513] 1043289-changed auto-save document --- .../Word-Processor/angular/header-footer.md | 2 +- .../angular/how-to/auto-save-document.md | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/header-footer.md b/Document-Processing/Word/Word-Processor/angular/header-footer.md index cd88f5d661..8e0ea16959 100644 --- a/Document-Processing/Word/Word-Processor/angular/header-footer.md +++ b/Document-Processing/Word/Word-Processor/angular/header-footer.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Header and Footer in Angular DOCX Editor component +# Header and Footer in Angular Document Editor component [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports headers and footers in its document. Each section in the document can have the following types of headers and footers: diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md index 9c9f204115..8824abaa24 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md @@ -8,13 +8,13 @@ documentation: ug domainurl: ##DomainURL## --- -# Auto Save Document to Server in Angular Document Editor component +# Auto save document in Angular Document editor component -This article explains how to auto-save the document to a server. You can save the edited content automatically at regular intervals, which reduces the risk of data loss by saving the open document at customized intervals. +In this article, we are going to see how to auto save the document to the server. You can automatically save the edited content at regular intervals of time. It helps reduce the risk of data loss by saving an open document automatically at customized intervals. -The following example illustrates how to auto-save the document to a server. +The following example illustrates how to auto save the document on the server. -* On the client side, use the `contentChange` event to detect edits and save the document at regular intervals. When the `contentChanged` flag is `true`, the document is sent to the server in Document format using the [`saveAsBlob()`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. +* On the client side, using the content change event, we can automatically save the edited content at regular intervals of time. Based on the `contentChanged` boolean, the document is sent as DOCX format to the server side using the [`saveAsBlob`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#saveasblob) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; @@ -70,7 +70,7 @@ export class AppComponent implements OnInit { req.onreadystatechange = () => { if (req.readyState === 4) { if (req.status === 200 || req.status === 304) { - console.log('Saved sucessfully'); + console.log('Saved successfully'); } } }; @@ -87,11 +87,9 @@ export class AppComponent implements OnInit { } ``` -N> 1. The Web Service link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` used in the `serviceUrl` property of the Document Editor is intended solely for demonstration and evaluation purposes. -N> 2. For production deployment, please host your own Web Service with your required server configurations. -N> 3. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own Web Service and use it for the `serviceUrl` property. +> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. -* On the server side, receive the stream from the client and process it to save the document to a server or database. Add a Web API method in a controller file to save the document, as shown below. +* On the server side, receive the stream content from the client side and process it to save the document in AWS S3. Add Web API in the controller file like below to save the document in AWS S3. ```c# [AcceptVerbs("Post")] @@ -111,7 +109,7 @@ public string AutoSave() ## Online Demo -Explore how to automatically save Word documents in the Angular Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/auto-save). +Explore how to automatically save Word documents using the Angular Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/auto-save). ## See Also * [AutoSave document in DocumentEditor](../how-to/auto-save-document-in-document-editor) From 67d0c2e38e021920a69101770de07edf4fa1ff8e Mon Sep 17 00:00:00 2001 From: EshwariBalraj Date: Mon, 27 Jul 2026 16:17:35 +0530 Subject: [PATCH 012/513] 536094: Mardowns documentation --- .../Web-apis/consume-apis/html-to-markdown.md | 160 +++++++++++++++++ .../Web-apis/consume-apis/markdown-to-pdf.md | 170 ++++++++++++++++++ .../Web-apis/consume-apis/pdf-to-markdown.md | 161 +++++++++++++++++ .../Web-apis/consume-apis/word-to-markdown.md | 162 +++++++++++++++++ 4 files changed, 653 insertions(+) create mode 100644 Document-Processing/Web-apis/consume-apis/html-to-markdown.md create mode 100644 Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md create mode 100644 Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md create mode 100644 Document-Processing/Web-apis/consume-apis/word-to-markdown.md diff --git a/Document-Processing/Web-apis/consume-apis/html-to-markdown.md b/Document-Processing/Web-apis/consume-apis/html-to-markdown.md new file mode 100644 index 0000000000..92801540ee --- /dev/null +++ b/Document-Processing/Web-apis/consume-apis/html-to-markdown.md @@ -0,0 +1,160 @@ +--- +title: Convert HTML to Markdown Using Syncfusion Web API +description: Convert HTML files to Markdown format using Syncfusion Web API. Extract structured text, headings, tables, and formatting with fast, reliable server-side conversion. +platform: document-processing +control: general +documentation: UG +--- +# Converting HTML to Markdown Using Syncfusion Web API + +The Syncfusion HTML to Markdown Web API allows you to convert HTML documents into well‑structured Markdown format while preserving the content and readability of the document. It supports accurate conversion of elements such as headings, paragraphs, tables, lists, and inline formatting, making the output ready for use in documentation systems, content pipelines, and AI-powered workflows. + +## Convert HTML to Markdown + +To convert an HTML document to Markdown, send a request to the /v1/conversion/html-to-markdown endpoint, including both the HTML file as input and the settings JSON. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl --location 'http://localhost:8003/v1/conversion/html-to-markdown' \ + --form-string 'settings={ + "JobID": "job-123", + "InputFile":"", + }' + +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const formdata = new FormData(); +formdata.append( + "settings", + JSON.stringify({ + JobID: "job-200", + "InputFile":"" + }) + ); + +const requestOptions = { + method: "POST", + body: formdata, + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/html-to-markdown", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + .catch((error) => console.error(error)); + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/html-to-pdf"); +var content = new MultipartFormDataContent(); + +var settings = new +{ + JobID = "job-300", + "InputFile":"", +}; + +content.Add(new StringContent(JsonSerializer.Serialize(settings)), "settings"); +request.Content = content; + +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +## HTML to Markdown Settings +**File** + +Specifies the key name of the uploaded HTML file to be converted to Markdown. + +## HTML to Markdown Job Response +Once the request is sent, it will create a conversion job to convert the HTML document to Markdown and return the job details as follows: + +``` +{ + "jobID": "6be827c5-d86d-4fe5-9bd5-c8fd5887a455", + "status": "requested", + "createdAt": "2024-05-06T09:39:13.9505828Z" +} +``` +## Check HTML to Markdown Job Status + +Next, you can retrieve the job status by sending a request to the /v1/conversion/status/{jobID} endpoint with the job ID. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl --location 'http://localhost:8003/v1/conversion/status/7d0b62cd-c5a1-4035-9728-50c4efd1f0e1' \ + --output Output.md + +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const requestOptions = { + method: "GET", + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/status/4413bbb5-6b26-4c07-9af2-c26cd2c42fe3", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + .catch((error) => console.error(error)); + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8003/v1/conversion/status/ef0766ab-bc74-456c-8143-782e730a89df"); +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +You will receive one of the following statuses until the job is completed. Upon completion, you will receive the actual output file. + +**Job Statuses:** + +- Queued: + +``` +{ + "jobID": "4b2782b2-9f08-478b-98fc-4464bd219ca0", + "status": "queued" +} +``` +- In Progress: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "in progress" +} +``` +- Error: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "errror", + "code": "500", + "message": "Failed to convert the document to Markdown" +} +``` + +N> The Syncfusion Document Processing API is now available as a Docker-based solution. [Try it out](https://hub.docker.com/r/syncfusion/document-processing-apis) diff --git a/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md b/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md new file mode 100644 index 0000000000..d106ba4fc8 --- /dev/null +++ b/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md @@ -0,0 +1,170 @@ +--- +title: Convert Markdown to PDF Using Syncfusion Web API +description: Convert Markdown files to high-quality PDFs using Syncfusion Web API. Preserve headings, tables, code blocks, and formatting with fast, reliable server-side conversion. +platform: document-processing +control: general +documentation: UG +--- +# Converting Markdown to PDF Using Syncfusion Web API + +The Syncfusion Markdown to PDF Web API allows you to convert Markdown documents into well‑formatted, high‑quality PDF files while preserving the structure and readability of the content. It supports accurate rendering of elements such as headings, paragraphs, tables, code blocks, lists, and inline formatting in the resulting PDF. The conversion can be customized with options like PDF/A compliance for long‑term archiving. + +## Convert Markdown to PDF + +To convert a Markdown document to PDF, send a request to the /v1/conversion/markdown-to-pdf endpoint, including both the Markdown file as input and the settings JSON. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl --location 'http://localhost:8003/v1/conversion/markdown-to-pdf' \ +--form 'file=@"Input.md"' \ + --form 'settings={ + "InputFile": "file", + "PdfCompliance": "PDF/A-1B", + "EnableAccessibility": false + }' + +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const formdata = new FormData(); +formdata.append("file", fileInput.files[0], "Input.md"); + formdata.append( + "settings", + JSON.stringify({ + File: "file", + PdfCompliance: "PDF/A-1B", // use whatever your backend expects + EnableAccessibility: false + }) + ); + +const requestOptions = { + method: "POST", + body: formdata, + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/markdown-to-pdf", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/markdown-to-pdf"); +var content = new MultipartFormDataContent(); +content.Add(new StreamContent(File.OpenRead("Input.md")), "file", "Input.md"); +var settings = new +{ + File = "file", + PdfCompliance = "PDF/A-1B", + EnableAccessibility = false +}; + +var json = JsonSerializer.Serialize(settings); +var settingsContent = new StringContent(json, Encoding.UTF8, "application/json"); +content.Add(settingsContent, "settings"); +request.Content = content; + +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +## Markdown to PDF Settings +**Password** + +Specifies the password to protect the output PDF document after conversion. + +**PdfCompliance** + +Defines the PDF/A compliance level for archival and standards adherence. Supported levels include PDF/A‑1B, PDF/A‑2B, PDF/A‑3B, and PDF/A‑4. + +## Markdown to PDF Job Response +Once the request is sent, it will create a conversion job to convert the Markdown document to PDF and return the job details as follows: + +``` +{ + "jobID": "6be827c5-d86d-4fe5-9bd5-c8fd5887a455", + "status": "requested", + "createdAt": "2024-05-06T09:39:13.9505828Z" +} +``` +## Check Markdown to PDF Job Status + +Next, you can retrieve the job status by sending a request to the /v1/conversion/status/{jobID} endpoint with the job ID. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl --location 'http://localhost:8003/v1/conversion/status/9b131bfe-d4eb-4f1d-b946-46443a363eb5' \ + --output Output.pdf + +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const requestOptions = { + method: "GET", + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/status/4413bbb5-6b26-4c07-9af2-c26cd2c42fe3", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + .catch((error) => console.error(error)); + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8003/v1/conversion/status/ef0766ab-bc74-456c-8143-782e730a89df"); +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +You will receive one of the following statuses until the job is completed. Upon completion, you will receive the actual output file. + +**Job Statuses:** + +- Queued: + +``` +{ + "jobID": "4b2782b2-9f08-478b-98fc-4464bd219ca0", + "status": "queued" +} +``` +- In Progress: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "in progress" +} +``` +- Error: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "errror", + "code": "500", + "message": "Failed to convert the document to PDF" +} +``` + +N> The Syncfusion Document Processing API is now available as a Docker-based solution. [Try it out](https://hub.docker.com/r/syncfusion/document-processing-apis) diff --git a/Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md b/Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md new file mode 100644 index 0000000000..4aba392984 --- /dev/null +++ b/Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md @@ -0,0 +1,161 @@ +--- +title: Convert PDF to Markdown Using Syncfusion Web API +description: Convert PDF files to Markdown format using Syncfusion Web API. Extract structured text, tables, and content from PDFs with fast, reliable server-side conversion. +platform: document-processing +control: general +documentation: UG +--- +# Converting PDF to Markdown Using Syncfusion Web API + +The Syncfusion PDF to Markdown Web API allows you to extract and convert content from PDF documents into well‑structured Markdown format. It accurately extracts text, tables, and other document elements, making the content ready for use in documentation systems, content pipelines, and AI-powered workflows. + +## Convert PDF to Markdown + +To convert a PDF document to Markdown, send a request to the /v1/conversion/pdf-to-markdown endpoint, including the PDF file as input along with the settings JSON. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl --location 'http://localhost:8003/v1/conversion/pdf-to-markdown"' \ +--form 'file=@Input1.pdf' \ +--form 'settings={ + "File": "file" +}' + +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const formdata = new FormData(); +formdata.append("file", fileInput.files[0], "Input1.pdf"); +formdata.append( + "settings", + JSON.stringify({ + File: "file" + }) +); + +const requestOptions = { + method: "POST", + body: formdata, + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/pdf-to-markdown", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + .catch((error) => console.error(error)); + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/pdf-to-markdown"); +var content = new MultipartFormDataContent(); +content.Add(new StreamContent(File.OpenRead("Input1.pdf")), "file", "Input1.pdf"); +var settings = new +{ + File = "file", +}; + +var json = JsonSerializer.Serialize(settings); +var settingsContent = new StringContent(json, Encoding.UTF8, "application/json"); +content.Add(settingsContent, "settings"); +request.Content = content; + +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +## PDF to Markdown Settings +**Password** + +Specifies the password required to open a protected PDF document before converting it to Markdown. + +## PDF to Markdown Job Response +Once the request is sent, it will create a conversion job to convert the PDF document to Markdown and return the job details as follows: + +``` +{ + "jobID": "6be827c5-d86d-4fe5-9bd5-c8fd5887a455", + "status": "requested", + "createdAt": "2024-05-06T09:39:13.9505828Z" +} +``` +## Check PDF to Markdown Job Status + +Next, you can retrieve the job status by sending a request to the /v1/conversion/status/{jobID} endpoint with the job ID. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl --location 'http://localhost:8003/v1/conversion/status/7d0b62cd-c5a1-4035-9728-50c4efd1f0e1' \ + --output Output.md + +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const requestOptions = { + method: "GET", + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/status/4413bbb5-6b26-4c07-9af2-c26cd2c42fe3", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + .catch((error) => console.error(error)); + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8003/v1/conversion/status/ef0766ab-bc74-456c-8143-782e730a89df"); +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +You will receive one of the following statuses until the job is completed. Upon completion, you will receive the actual output file. + +**Job Statuses:** + +- Queued: + +``` +{ + "jobID": "4b2782b2-9f08-478b-98fc-4464bd219ca0", + "status": "queued" +} +``` +- In Progress: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "in progress" +} +``` +- Error: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "errror", + "code": "500", + "message": "Failed to convert the document to Markdown" +} +``` + +N> The Syncfusion Document Processing API is now available as a Docker-based solution. [Try it out](https://hub.docker.com/r/syncfusion/document-processing-apis) diff --git a/Document-Processing/Web-apis/consume-apis/word-to-markdown.md b/Document-Processing/Web-apis/consume-apis/word-to-markdown.md new file mode 100644 index 0000000000..ab9fb8205d --- /dev/null +++ b/Document-Processing/Web-apis/consume-apis/word-to-markdown.md @@ -0,0 +1,162 @@ +--- +title: Convert Word to Markdown Using Syncfusion Web API +description: Convert Word documents to Markdown format using Syncfusion Web API. Extract structured text, tables, headings, and formatting with fast, reliable server-side conversion. +platform: document-processing +control: general +documentation: UG +--- +# Converting Word to Markdown Using Syncfusion Web API + +The Syncfusion Word to Markdown Web API allows you to convert Word documents into well‑structured Markdown format while preserving the content and readability of the document. It supports accurate conversion of elements such as headings, paragraphs, tables, lists, and inline formatting. The conversion also supports password-protected Word documents. + +## Convert Word to Markdown + +To convert a Word document to Markdown, send a request to the /v1/conversion/word-to-markdown endpoint, including both the Word file as input and the settings JSON. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl -v --location 'http://localhost:8003/v1/conversion/word-to-md' \ + --form 'file=@"Input.docx"' \ + --form 'settings={ + "File": "file", + "Password": null, + }' +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const formdata = new FormData(); +formdata.append("file", fileInput.files[0], "Input.docx"); + formdata.append( + "settings", + JSON.stringify({ + File: "file", + Password: null, + }) + ); + +const requestOptions = { + method: "POST", + body: formdata, + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/word-to-md", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/word-to-md"); +var content = new MultipartFormDataContent(); +content.Add(new StreamContent(File.OpenRead("Input.docx")), "file", "Input.docx"); +var settings = new +{ + File = "file", + Password = (string?)null, +}; + +var json = JsonSerializer.Serialize(settings); +var settingsContent = new StringContent(json, Encoding.UTF8, "application/json"); +content.Add(settingsContent, "settings"); +request.Content = content; + +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +## Word to Markdown Settings +**Password** + +Specifies the password required to open a protected Word document before converting it to Markdown. + +## Word to Markdown Job Response +Once the request is sent, it will create a conversion job to convert the Word document to Markdown and return the job details as follows: + +``` +{ + "jobID": "6be827c5-d86d-4fe5-9bd5-c8fd5887a455", + "status": "requested", + "createdAt": "2024-05-06T09:39:13.9505828Z" +} +``` +## Check Word to Markdown Job Status + +Next, you can retrieve the job status by sending a request to the /v1/conversion/status/{jobID} endpoint with the job ID. + +{% tabs %} + +{% highlight c# tabtitle="Curl" %} + +curl --location 'http://localhost:8003/v1/conversion/status/7d0b62cd-c5a1-4035-9728-50c4efd1f0e1' \ + --output Output.md + +{% endhighlight %} + +{% highlight javaScript tabtitle="JavaScript" %} + +const requestOptions = { + method: "GET", + redirect: "follow" +}; + +fetch("http://localhost:8003/v1/conversion/status/4413bbb5-6b26-4c07-9af2-c26cd2c42fe3", requestOptions) + .then((response) => response.text()) + .then((result) => console.log(result)) + .catch((error) => console.error(error)); + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +var client = new HttpClient(); +var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8003/v1/conversion/status/ef0766ab-bc74-456c-8143-782e730a89df"); +var response = await client.SendAsync(request); +response.EnsureSuccessStatusCode(); +Console.WriteLine(await response.Content.ReadAsStringAsync()); + +{% endhighlight %} + +{% endtabs %} + +You will receive one of the following statuses until the job is completed. Upon completion, you will receive the actual output file. + +**Job Statuses:** + +- Queued: + +``` +{ + "jobID": "4b2782b2-9f08-478b-98fc-4464bd219ca0", + "status": "queued" +} +``` +- In Progress: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "in progress" +} +``` +- Error: + +``` +{ + "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", + "status": "errror", + "code": "500", + "message": "Failed to convert the document to Markdown" +} +``` + +N> The Syncfusion Document Processing API is now available as a Docker-based solution. [Try it out](https://hub.docker.com/r/syncfusion/document-processing-apis) From 857344873296b5a49070036e93bcb12e2d995761 Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Mon, 27 Jul 2026 16:20:46 +0530 Subject: [PATCH 013/513] 1043289-added space for auto save --- .../Word/Word-Processor/angular/how-to/auto-save-document.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md index 8824abaa24..3dabb18c29 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/auto-save-document.md @@ -112,4 +112,4 @@ public string AutoSave() Explore how to automatically save Word documents using the Angular Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/auto-save). ## See Also -* [AutoSave document in DocumentEditor](../how-to/auto-save-document-in-document-editor) +* [Auto Save document in DocumentEditor](../how-to/auto-save-document-in-document-editor) From ea3a9064804c6bac71195875c447ba02117da89b Mon Sep 17 00:00:00 2001 From: EshwariBalraj Date: Mon, 27 Jul 2026 17:08:23 +0530 Subject: [PATCH 014/513] 536094: Content updated --- .../Web-apis/consume-apis/html-to-markdown.md | 6 ++--- .../Web-apis/consume-apis/markdown-to-pdf.md | 22 +++++++++++++------ .../Web-apis/consume-apis/pdf-to-markdown.md | 8 +++++-- .../Web-apis/consume-apis/word-to-markdown.md | 8 +++---- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/Document-Processing/Web-apis/consume-apis/html-to-markdown.md b/Document-Processing/Web-apis/consume-apis/html-to-markdown.md index 92801540ee..2881a9c469 100644 --- a/Document-Processing/Web-apis/consume-apis/html-to-markdown.md +++ b/Document-Processing/Web-apis/consume-apis/html-to-markdown.md @@ -52,7 +52,7 @@ fetch("http://localhost:8003/v1/conversion/html-to-markdown", requestOptions) {% highlight c# tabtitle="C#" %} var client = new HttpClient(); -var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/html-to-pdf"); +var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/html-to-markdown"); var content = new MultipartFormDataContent(); var settings = new @@ -73,7 +73,7 @@ Console.WriteLine(await response.Content.ReadAsStringAsync()); {% endtabs %} ## HTML to Markdown Settings -**File** +**InputFile** Specifies the key name of the uploaded HTML file to be converted to Markdown. @@ -151,7 +151,7 @@ You will receive one of the following statuses until the job is completed. Upon ``` { "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", - "status": "errror", + "status": "error", "code": "500", "message": "Failed to convert the document to Markdown" } diff --git a/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md b/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md index d106ba4fc8..8d19b0182c 100644 --- a/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md +++ b/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md @@ -31,11 +31,11 @@ curl --location 'http://localhost:8003/v1/conversion/markdown-to-pdf' \ const formdata = new FormData(); formdata.append("file", fileInput.files[0], "Input.md"); - formdata.append( +formdata.append( "settings", JSON.stringify({ - File: "file", - PdfCompliance: "PDF/A-1B", // use whatever your backend expects + InputFile: "file", + PdfCompliance: "PDF/A-1B", EnableAccessibility: false }) ); @@ -60,8 +60,8 @@ var content = new MultipartFormDataContent(); content.Add(new StreamContent(File.OpenRead("Input.md")), "file", "Input.md"); var settings = new { - File = "file", - PdfCompliance = "PDF/A-1B", + InputFile = "file", + PdfCompliance = "PDF/A-1B", EnableAccessibility = false }; @@ -79,13 +79,21 @@ Console.WriteLine(await response.Content.ReadAsStringAsync()); {% endtabs %} ## Markdown to PDF Settings +**InputFile** + +Specifies the key name of the uploaded Markdown file to be converted to PDF. + **Password** Specifies the password to protect the output PDF document after conversion. **PdfCompliance** -Defines the PDF/A compliance level for archival and standards adherence. Supported levels include PDF/A‑1B, PDF/A‑2B, PDF/A‑3B, and PDF/A‑4. +Defines the PDF/A compliance level for archival and standards adherence. Supported levels include PDF/A‑1B, PDF/A‑2B, PDF/A‑3B, and PDF/A‑4. + +**EnableAccessibility** + +Specifies whether to enable accessibility (tagged PDF) support in the output PDF document. ## Markdown to PDF Job Response Once the request is sent, it will create a conversion job to convert the Markdown document to PDF and return the job details as follows: @@ -161,7 +169,7 @@ You will receive one of the following statuses until the job is completed. Upon ``` { "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", - "status": "errror", + "status": "error", "code": "500", "message": "Failed to convert the document to PDF" } diff --git a/Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md b/Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md index 4aba392984..89070fe529 100644 --- a/Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md +++ b/Document-Processing/Web-apis/consume-apis/pdf-to-markdown.md @@ -17,7 +17,7 @@ To convert a PDF document to Markdown, send a request to the /v1/conversion/pdf- {% highlight c# tabtitle="Curl" %} -curl --location 'http://localhost:8003/v1/conversion/pdf-to-markdown"' \ +curl --location 'http://localhost:8003/v1/conversion/pdf-to-markdown' \ --form 'file=@Input1.pdf' \ --form 'settings={ "File": "file" @@ -74,6 +74,10 @@ Console.WriteLine(await response.Content.ReadAsStringAsync()); {% endtabs %} ## PDF to Markdown Settings +**File** + +Specifies the form field key name of the uploaded PDF file to be converted to Markdown. + **Password** Specifies the password required to open a protected PDF document before converting it to Markdown. @@ -152,7 +156,7 @@ You will receive one of the following statuses until the job is completed. Upon ``` { "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", - "status": "errror", + "status": "error", "code": "500", "message": "Failed to convert the document to Markdown" } diff --git a/Document-Processing/Web-apis/consume-apis/word-to-markdown.md b/Document-Processing/Web-apis/consume-apis/word-to-markdown.md index ab9fb8205d..cddc8ca7c9 100644 --- a/Document-Processing/Web-apis/consume-apis/word-to-markdown.md +++ b/Document-Processing/Web-apis/consume-apis/word-to-markdown.md @@ -11,7 +11,7 @@ The Syncfusion Word to Markdown Web API allows you to convert Word documents int ## Convert Word to Markdown -To convert a Word document to Markdown, send a request to the /v1/conversion/word-to-markdown endpoint, including both the Word file as input and the settings JSON. +To convert a Word document to Markdown, send a request to the /v1/conversion/word-to-md endpoint, including both the Word file as input and the settings JSON. {% tabs %} @@ -21,7 +21,7 @@ curl -v --location 'http://localhost:8003/v1/conversion/word-to-md' \ --form 'file=@"Input.docx"' \ --form 'settings={ "File": "file", - "Password": null, + "Password": null }' {% endhighlight %} @@ -29,7 +29,7 @@ curl -v --location 'http://localhost:8003/v1/conversion/word-to-md' \ const formdata = new FormData(); formdata.append("file", fileInput.files[0], "Input.docx"); - formdata.append( +formdata.append( "settings", JSON.stringify({ File: "file", @@ -153,7 +153,7 @@ You will receive one of the following statuses until the job is completed. Upon ``` { "jobID": "ef0766ab-bc74-456c-8143-782e730a89df", - "status": "errror", + "status": "error", "code": "500", "message": "Failed to convert the document to Markdown" } From 30753daeb5fbc7798cde52d0cdaabd5d7dc1222d Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Mon, 27 Jul 2026 17:41:38 +0530 Subject: [PATCH 015/513] 1043289-changed table-format,content,table,format,wrapping stye --- .../Word-Processor/angular/table-format.md | 32 ++++++++-------- .../angular/table-of-contents.md | 16 ++++---- .../Word/Word-Processor/angular/table.md | 38 +++++++++---------- .../Word-Processor/angular/text-format.md | 36 +++++++++--------- .../angular/text-wrapping-style.md | 24 ++++++------ 5 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/table-format.md b/Document-Processing/Word/Word-Processor/angular/table-format.md index 4ef7e0efb4..fea357c3dc 100644 --- a/Document-Processing/Word/Word-Processor/angular/table-format.md +++ b/Document-Processing/Word/Word-Processor/angular/table-format.md @@ -1,16 +1,16 @@ --- layout: post -title: Table format in Angular Document editor component | Syncfusion -description: Learn here all about Table format in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Table format in Angular DOCX Editor component | Syncfusion +description: Learn here all about Table format in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Table format documentation: ug domainurl: ##DomainURL## --- -# Table format in Angular Document editor component +# Table format in Angular Document Editor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) customizes the formatting of table, or table cells such as table width, cell margins, cell spacing, background color, and table alignment. This section describes how to customize these formatting for selected cells, rows, or table in detail. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) customizes the formatting of a table or table cells such as table width, cell margins, cell spacing, background color, and table alignment. This section describes how to customize these formatting for selected cells, rows, or a table in detail. ## Cell margins @@ -27,7 +27,7 @@ this.documentEditor.selection.cellFormat.topMargin=5.4; this.documentEditor.selection.cellFormat.bottomMargin=5.4; ``` -You can also define the default cell margins for a table. If the specific cell margin value is not defined explicitly in the cell formatting, the corresponding value will be retrieved from default cells margin of the table. Refer to the following sample code. +You can also define the default cell margins for a table. If the specific cell margin value is not defined explicitly in the cell formatting, the corresponding value will be retrieved from the default cell margins of the table. Refer to the following sample code. ```typescript //To change the left margin @@ -72,18 +72,18 @@ this.documentEditor.selection.cellFormat.verticalAlignment='Bottom'; ## Table alignment -The tables are aligned in document editor to ‘Left’, ‘Right’, or ‘Center’. Refer to the following sample code. +The tables are aligned in the document editor to ‘Left’, ‘Right’, or ‘Center’. Refer to the following sample code. ```typescript -this.documentEditor.selection.tableFormat.tableAlignment=’Center’; +this.documentEditor.selection.tableFormat.tableAlignment='Center'; ``` ## Cell width -Set the desired width of table cells that will be considered when the table is layouted. Refer to the following sample code. +Set the desired width of table cells that will be considered when the table is laid out. Refer to the following sample code. ```typescript -this.documentEditor.selection.cellFormat.preferredWidthType=’Point’; +this.documentEditor.selection.cellFormat.preferredWidthType='Point'; this.documentEditor.selection.cellFormat.preferredWidth=100; ``` @@ -110,7 +110,7 @@ Document Editor exposes API to customize the borders for table cells by specifyi this.documentEditor.editor.applyBorders(borderSettings); ``` -Please check below gif which illustrates how to apply border for selected cells through properties pane options - border color, line size and no border: +Please check the below gif which illustrates how to apply a border for selected cells through properties pane options - border color, line size and no border: ![ApplyBorderToSelectedCell_viaPropertiesPane](images/ApplyBorderToSelectedCell_viaPropertiesPane.gif) @@ -129,7 +129,7 @@ this.documentEditor.selection.rowFormat.height=20; ### Header row -The header row describes the content of a table. A table can optionally have a header row. Only the first row of a table can be the header row. If the cursor position is at first row of the table, then you can define whether it as header row or not, using the following sample code. +The header row describes the content of a table. A table can optionally have a header row. Only the first row of a table can be the header row. If the cursor position is at the first row of the table, then you can define whether it is a header row or not, using the following sample code. ```typescript this.documentEditor.selection.rowFormat.isHeader=true; @@ -137,7 +137,7 @@ this.documentEditor.selection.rowFormat.isHeader=true; ### Allow row break across pages -This property is valid if a table row does not fit in the current page during table layout. It defines whether a table row can be allowed to break. If the value is false, the entire row will be moved to the start of next page. You can modify this property for selected rows using the following sample code. +This property is valid if a table row does not fit in the current page during table layout. It defines whether a table row can be allowed to break. If the value is false, the entire row will be moved to the start of the next page. You can modify this property for selected rows using the following sample code. ```typescript this.documentEditor.selection.rowFormat.allowRowBreakAcrossPages=false; @@ -145,18 +145,18 @@ this.documentEditor.selection.rowFormat.allowRowBreakAcrossPages=false; ### Title -Document Editor expose API to get or set the table title of the selected table. Refer to the following sample code to set title. +Document Editor exposes API to get or set the table title of the selected table. Refer to the following sample code to set title. ```typescript -this.documenteditor.selection.tableFormat.title = 'Shipping Details'; +this.documentEditor.selection.tableFormat.title = 'Shipping Details'; ``` ### Description -Document Editor expose API to get or set the table description of the selected image. Refer to the following sample code to set description. +Document Editor exposes API to get or set the table description of the selected table. Refer to the following sample code to set description. ```typescript -this.documenteditor.selection.tableFormat.description = 'Freight cost and shipping details'; +this.documentEditor.selection.tableFormat.description = 'Freight cost and shipping details'; ``` ## Online Demo diff --git a/Document-Processing/Word/Word-Processor/angular/table-of-contents.md b/Document-Processing/Word/Word-Processor/angular/table-of-contents.md index 05f9bdfd18..fff5485d1f 100644 --- a/Document-Processing/Word/Word-Processor/angular/table-of-contents.md +++ b/Document-Processing/Word/Word-Processor/angular/table-of-contents.md @@ -1,7 +1,7 @@ --- layout: post -title: Table of contents in Angular Document editor component | Syncfusion -description: Learn here all about Table of contents in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Table of contents in Angular DOCX Editor component | Syncfusion +description: Learn here all about Table of contents in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Table of contents documentation: ug @@ -10,11 +10,11 @@ domainurl: ##DomainURL## # Table of contents in Angular Document editor component -The table of contents in a document is same as the list of chapters at the beginning of a book. It lists each heading in the document and the page number, where that heading starts with various options to customize the appearance. +The table of contents in a document is the same as the list of chapters at the beginning of a book. It lists each heading in the document and the page number where that heading starts, with various options to customize the appearance. ## Inserting table of contents -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) exposes an API to insert table of contents at cursor position programmatically. You can specify the settings for table of contents explicitly. Otherwise, the default settings will be applied. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) exposes an API to insert table of contents at cursor position programmatically. You can specify the settings for table of contents explicitly. Otherwise, the default settings will be applied. [`TableOfContentsSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/tableOfContentsSettings) contain the following properties: * **startLevel**: Specifies the start level for constructing table of contents. @@ -25,7 +25,7 @@ The table of contents in a document is same as the list of chapters at the begin * **tabLeader**: Specifies the tab leader styles such as none, dot, hyphen, and underscore. * **includeOutlineLevels**: Specifies whether the outline levels are included. -The following code illustrates how to insert table of content in document editor. +The following code illustrates how to insert a table of contents in the document editor. ```typescript let tocSettings: TableOfContentsSettings = @@ -49,11 +49,11 @@ this.documentEditor.editor.insertTableOfContents(tocSettings); ## Update or edit table of contents -You can update or edit the table of contents using the built-in context menu shown up by right-clicking it. Refer to the following screenshot. +You can update or edit the table of contents using the built-in context menu shown by right-clicking it. Refer to the following screenshot. ![Table of Contents](images/table-of-contents.png) -* **Update Field**: Updates the headings in table of contents with same settings by searching the entire document. +* **Update Field**: Updates the headings in the table of contents with the same settings by searching the entire document. * **Edit Field**: Opens the built-in table of contents dialog and allows you to modify its settings. You can also do it programmatically by using the exposed API. Refer to the following sample code. @@ -67,7 +67,7 @@ You can also do it programmatically by using the exposed API. Refer to the follo ``` ->Same method is used for inserting, updating, and editing table of contents. This will work based on the current element at cursor position and the optional settings parameter. If table of contents is present at cursor position, the update operation will be done based on the optional settings parameter. Otherwise, the insert operation will be done. +N> Same method is used for inserting, updating, and editing table of contents. This will work based on the current element at cursor position and the optional settings parameter. If table of contents is present at cursor position, the update operation will be done based on the optional settings parameter. Otherwise, the insert operation will be done. ## Online Demo diff --git a/Document-Processing/Word/Word-Processor/angular/table.md b/Document-Processing/Word/Word-Processor/angular/table.md index af50ee4fcd..39f973bd89 100644 --- a/Document-Processing/Word/Word-Processor/angular/table.md +++ b/Document-Processing/Word/Word-Processor/angular/table.md @@ -1,20 +1,20 @@ --- layout: post -title: Table in Angular Document editor component | Syncfusion -description: Learn here all about Table in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Table in Angular DOCX Editor component | Syncfusion +description: Learn here all about Table in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Table documentation: ug domainurl: ##DomainURL## --- -# Table in Angular Document editor component +# Table in Angular Document Editor component -Tables are an efficient way to present information. [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) can display and edit the tables. You can select and edit tables through keyboard, mouse, or touch interactions. Document Editor exposes a rich set of APIs to perform these operations programmatically. +Tables are an efficient way to present information. [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) can display and edit the tables. You can select and edit tables through keyboard, mouse, or touch interactions. Document Editor exposes a rich set of APIs to perform these operations programmatically. ## Create a table -You can create and insert a table at cursor position by specifying the required number of rows and columns. +You can create and insert a table at the cursor position by specifying the required number of rows and columns. Refer to the following sample code. @@ -37,11 +37,11 @@ export class AppComponent { } ``` -When the maximum row limit is reached, an alert will appear, as follow +When the maximum row limit is reached, an alert will appear, as follows -![Row Limit Alert](images/Row_Limit_Alert.PNG) +![Row Limit Alert](images/Row_Limit_Alert.PNG) ->Note: The maximum value of Row is 32767, as per Microsoft Word application and you can set any value less than or equal to 32767 to this property. +N> The maximum value of Row is 32767, as per Microsoft Word application and you can set any value less than or equal to 32767 to this property. ## Set the maximum number of Columns when inserting a table @@ -60,11 +60,11 @@ export class AppComponent { } ``` -When the maximum column limit is reached, an alert will appear, as follow +When the maximum column limit is reached, an alert will appear, as follows -![Column Limit Alert](images/Column_Limit_Alert.PNG) +![Column Limit Alert](images/Column_Limit_Alert.PNG) ->Note: The maximum value of Column is 63, as per Microsoft Word application and you can set any value less than or equal to 63 to this property. +N> The maximum value of Column is 63, as per Microsoft Word application and you can set any value less than or equal to 63 to this property. ## Insert rows @@ -81,9 +81,9 @@ Refer to the following sample code. //Inserts a row below the row at cursor position this.documentEditor.editor.insertRow(); //Inserts a row above the row at cursor position -this.documentEditor.editor.insertRow(false); +this.documentEditor.editor.insertRow(true); //Inserts three rows below the row at cursor position -this.documentEditor.editor.insertRow(true, 3); +this.documentEditor.editor.insertRow(false, 3); ``` ## Insert columns @@ -101,9 +101,9 @@ Refer to the following sample code. //Insert a column to the right of the column at cursor position. this.documentEditor.editor.insertColumn(); //Insert a column to the left of the column at cursor position. -this.documentEditor.editor.insertColumn(false); +this.documentEditor.editor.insertColumn(true); //Insert two columns to the left of the column at cursor position. -this.documentEditor.editor.insertColumn(false, 2); +this.documentEditor.editor.insertColumn(true, 2); ``` ### Select an entire table @@ -122,7 +122,7 @@ You can select the entire row at cursor position by using the following sample c this.documentEditor.selection.selectRow(); ``` -If current selection spans across cells of different rows, all these rows will be selected. +If the current selection spans across cells of different rows, all these rows will be selected. ### Select column @@ -132,7 +132,7 @@ You can select the entire column at cursor position by using the following sampl this.documentEditor.selection.selectColumn(); ``` -If current selection spans across cells of different columns, all these columns will be selected. +If the current selection spans across cells of different columns, all these columns will be selected. ### Select cell @@ -168,11 +168,11 @@ this.documentEditor.editor.deleteColumn(); ## Merge cells -You can merge cells vertically, horizontally, or combination of both to a single cell. To vertically merge the cells, the columns within selection should be even in left and right directions. To horizontally merge the cells, the rows within selection should be even in top and bottom direction. +You can merge cells vertically, horizontally, or a combination of both, into a single cell. To vertically merge the cells, the columns within selection should be even in left and right directions. To horizontally merge the cells, the rows within selection should be even in top and bottom direction. Refer to the following sample code. ```typescript -this.documentEditor.editor.mergeCells() +this.documentEditor.editor.mergeCells(); ``` ## Positioning the table diff --git a/Document-Processing/Word/Word-Processor/angular/text-format.md b/Document-Processing/Word/Word-Processor/angular/text-format.md index dd1dbaf9ca..eb03004cee 100644 --- a/Document-Processing/Word/Word-Processor/angular/text-format.md +++ b/Document-Processing/Word/Word-Processor/angular/text-format.md @@ -1,20 +1,20 @@ --- layout: post -title: Text format in Angular Document editor component | Syncfusion -description: Learn here all about Text format in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Text format in Angular DOCX Editor component | Syncfusion +description: Learn here all about Text format in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Text format documentation: ug domainurl: ##DomainURL## --- -# Text format in Angular Document editor component +# Text format in Angular Document Editor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) supports several formatting options for text like bold, italic, font color, highlight color, and more. This section describes how to modify the formatting for selected text in detail. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) supports several formatting options for text like bold, italic, font color, highlight color, and more. This section describes how to modify the formatting for selected text in detail. ## Bold -The bold formatting for selected text can be get or set by using the following sample code. +The bold formatting for selected text can be retrieved or set by using the following sample code. ```typescript @@ -25,7 +25,7 @@ documenteditor.selection.characterFormat.bold = true; ``` -You can toggle the bold formatting based on existing value at selection. Refer to the following sample code. +You can toggle the bold formatting based on the existing value at the selection. Refer to the following sample code. ```typescript documenteditor.editor.toggleBold(); @@ -33,7 +33,7 @@ documenteditor.editor.toggleBold(); ## Italic -The Italic formatting for selected text can be get or set by using the following sample code. +The italic formatting for selected text can be retrieved or set by using the following sample code. ```typescript //Gets the value for italic formatting of selected text. @@ -42,7 +42,7 @@ let italic : boolean = documenteditor.selection.characterFormat.italic; documenteditor.selection.characterFormat.italic= true|false; ``` -You can toggle the Italic formatting based on existing value at selection. Refer to the following sample code. +You can toggle the italic formatting based on the existing value at the selection. Refer to the following sample code. ```typescript documenteditor.editor.toggleItalic(); @@ -50,7 +50,7 @@ documenteditor.editor.toggleItalic(); ## Underline property -The underline style for selected text can be get or set by using the following sample code. +The underline style for selected text can be retrieved or set by using the following sample code. ```typescript //Gets the value for underline formatting of selected text. @@ -59,7 +59,7 @@ let underline : Underline = documenteditor.selection.characterFormat.underline; documenteditor.selection.characterFormat.underline='Single' | 'None'; ``` -You can toggle the underline style of selected text based on existing value at selection by specifying a value. Refer to the following sample code. +You can toggle the underline style of selected text based on the existing value at the selection by specifying a value. Refer to the following sample code. ```typescript documenteditor.editor.toggleUnderline('Single'); @@ -67,7 +67,7 @@ documenteditor.editor.toggleUnderline('Single'); ## Strikethrough property -The strikethrough style for selected text can be get or set by using the following sample code. +The strikethrough style for selected text can be retrieved or set by using the following sample code. ```typescript //Gets the value for strikethrough formatting of selected text. @@ -76,7 +76,7 @@ let strikethrough : Strikethrough = documenteditor.selection.characterFormat.str documenteditor.selection.characterFormat.strikethrough='Single' | 'Normal'; ``` -You can toggle the strikethrough style of selected text based on existing value at selection by specifying a value. Refer to the following sample code. +You can toggle the strikethrough style of selected text based on the existing value at the selection by specifying a value. Refer to the following sample code. ```typescript documenteditor.editor.toggleStrikethrough(); @@ -132,7 +132,7 @@ documenteditor.editor.changeCase('Uppercase'|'Lowercase'|'SentenceCase'|'ToggleC ## Size -The size of selected text can be get or set using the following code. +The size of selected text can be retrieved or set using the following code. ```typescript //Gets the value for fontSize formatting of selected text. @@ -150,13 +150,13 @@ In the Document Editor, the Text Properties pane features two icons for managing * **Colored Box:** This icon visually represents the **current color** applied to the selected text. * **Text (A) Icon:** Clicking this icon allows users **to modify the color** of the selected text by choosing a new color from the available options. -This Font Color option appear as follows. +This Font Color option appears as follows. ![Font Color](images/fontColor.PNG) ### Change Font Color by Code -The color of selected text can be get or set using the following code. +The color of selected text can be retrieved or set using the following code. ```typescript //Gets the value for fontColor formatting of selected text. @@ -168,18 +168,18 @@ documenteditor.selection.characterFormat.fontColor= '#FFC0CB'; ## Font -The font style of selected text can be get or set using the following sample code. +The font style of selected text can be retrieved or set using the following sample code. ```typescript //Gets the value for fontFamily formatting of selected text. let baselineAlignment : string = documenteditor.selection.characterFormat.fontFamily; //Sets fontFamily formatting for selected text. -documenteditor.selection.characterFormat.fontFamily= 'Arial'; +documenteditor.selection.characterFormat.fontFamily = 'Arial'; ``` ## Highlight color -The highlight color of the selected text can be get or set using the following sample code. +The highlight color of the selected text can be retrieved or set using the following sample code. ```typescript //Gets the value for highlightColor formatting of selected text. diff --git a/Document-Processing/Word/Word-Processor/angular/text-wrapping-style.md b/Document-Processing/Word/Word-Processor/angular/text-wrapping-style.md index b85b9ba801..2476d6eec8 100644 --- a/Document-Processing/Word/Word-Processor/angular/text-wrapping-style.md +++ b/Document-Processing/Word/Word-Processor/angular/text-wrapping-style.md @@ -1,36 +1,36 @@ --- layout: post -title: Text wrapping style in Angular Document editor component | Syncfusion -description: Learn here all about Text wrapping style in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Text wrapping style in Angular DOCX Editor component | Syncfusion +description: Learn here all about Text wrapping style in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Text wrapping style documentation: ug domainurl: ##DomainURL## --- -# Text wrapping style in Angular Document editor component +# Text wrapping style in Angular Document Editor component -Text wrapping refers to how images and shapes are fit with surrounding text in a document. Currently, [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) has only preservation support for image and textbox shape with below wrapping styles. +Text wrapping refers to how images and shapes are placed within the surrounding text in a document. Currently, [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) has only preservation support for images and textbox shapes, with the wrapping styles listed below. ## In-Line with Text -In this option, the image or shape is placed on the same line surrounding with text like any other word or letter. This image or shape will be automatically moved along with the text while editing, whereas the other options denote that the image or shape stays in a fixed position while the text shifts and wraps around it. +In this option, the image or shape is placed on the same line surrounded by text like any other word or letter. This image or shape will be automatically moved along with the text while editing, whereas the other options denote that the image or shape stays in a fixed position while the text shifts and wraps around it. ![view of image with inline wrapping style in DocumentEditor](images/Text-Wrapping-Style_images/inline-textwrapping.PNG) ## In Front of Text -In this option, the image or shape is placed in front of the text. This can be used to place an image around some text or to add shape to highlight the part in a paragraph. +In this option, the image or shape is placed in front of the text. This can be used to overlay an image over text or to add a shape to highlight a part in a paragraph. ![view of image with in front of text wrapping style in DocumentEditor](images/Text-Wrapping-Style_images/infront-textwrapping.PNG) ->Note: Starting from v18.2.0.x, the in front of wrapping styles are supported. +N> Starting from v18.2.0.x, the in front of text wrapping style is supported. ## Top and Bottom -In this option, Text wraps above and below the image or shape. No text is to the left or right of the image or shape. This can be used for larger images or shapes that occupy most of the width in a document. +In this option, text wraps above and below the image or shape. No text is to the left or right of the image or shape. This can be used for larger images or shapes that occupy most of the width in a document. ->Note: Starting from v19.1.0.x, the top and bottom wrapping style is supported. +N> Starting from v19.1.0.x, the top and bottom wrapping style is supported. ![view of image with top and bottom wrapping style in DocumentEditor](images/Text-Wrapping-Style_images/topandbottom-textwrapping.PNG) @@ -40,12 +40,12 @@ In this option, the image or shape is placed behind the text. This can be used w ![view of image with behind wrapping style in DocumentEditor](images/Text-Wrapping-Style_images/behind-textwrapping.PNG) ->Note: Starting from v19.2.0.x, behind text wrapping styles are supported. +N> Starting from v19.2.0.x, the behind text wrapping style is supported. ## Square -In this option, Text wraps around the image or text box in a square shape. +In this option, text wraps around the image or text box in a square shape. ->Note: Tight and Through styles will be preserved as square wrapping style in Document Editor which is supported from v19.2.0.x. +N> Tight and Through styles will be preserved as the square wrapping style in the Document Editor, which is supported from v19.2.0.x. ![view of shape with square wrapping style in DocumentEditor](images/Text-Wrapping-Style_images/square-textwrapping.PNG) From a6323d8a105437d74d222d1b676fce847ea3ac0d Mon Sep 17 00:00:00 2001 From: EshwariBalraj Date: Mon, 27 Jul 2026 18:04:37 +0530 Subject: [PATCH 016/513] 536094: Content updated --- .../Web-apis/consume-apis/html-to-markdown.md | 16 +++++++++------- .../Web-apis/consume-apis/markdown-to-pdf.md | 10 +++++----- .../Web-apis/consume-apis/word-to-markdown.md | 6 +++--- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Document-Processing/Web-apis/consume-apis/html-to-markdown.md b/Document-Processing/Web-apis/consume-apis/html-to-markdown.md index 2881a9c469..7e14f7da22 100644 --- a/Document-Processing/Web-apis/consume-apis/html-to-markdown.md +++ b/Document-Processing/Web-apis/consume-apis/html-to-markdown.md @@ -17,10 +17,11 @@ To convert an HTML document to Markdown, send a request to the /v1/conversion/ht {% highlight c# tabtitle="Curl" %} -curl --location 'http://localhost:8003/v1/conversion/html-to-markdown' \ - --form-string 'settings={ - "JobID": "job-123", - "InputFile":"", +curl --location "http://localhost:8003/v1/conversion/html-to-markdown" \ + --form 'file=@"Input.html"' \ + --form 'settings={ + "File":"file", + "JobID":"job-123" }' {% endhighlight %} @@ -28,11 +29,12 @@ curl --location 'http://localhost:8003/v1/conversion/html-to-markdown' \ {% highlight javaScript tabtitle="JavaScript" %} const formdata = new FormData(); +formdata.append("file", fileInput.files[0], "Input.html"); formdata.append( "settings", JSON.stringify({ JobID: "job-200", - "InputFile":"" + InputFile: "file" }) ); @@ -54,11 +56,11 @@ fetch("http://localhost:8003/v1/conversion/html-to-markdown", requestOptions) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/html-to-markdown"); var content = new MultipartFormDataContent(); - +content.Add(new StreamContent(File.OpenRead("Input.md")), "file", "Input.html"); var settings = new { JobID = "job-300", - "InputFile":"", + InputFile = "file" }; content.Add(new StringContent(JsonSerializer.Serialize(settings)), "settings"); diff --git a/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md b/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md index 8d19b0182c..9ac2b07ae2 100644 --- a/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md +++ b/Document-Processing/Web-apis/consume-apis/markdown-to-pdf.md @@ -17,10 +17,10 @@ To convert a Markdown document to PDF, send a request to the /v1/conversion/mark {% highlight c# tabtitle="Curl" %} -curl --location 'http://localhost:8003/v1/conversion/markdown-to-pdf' \ ---form 'file=@"Input.md"' \ + curl --location "http://localhost:8003/v1/conversion/markdown-to-pdf" \ + --form 'file=@"Input.md"' \ --form 'settings={ - "InputFile": "file", + "File": "file", "PdfCompliance": "PDF/A-1B", "EnableAccessibility": false }' @@ -34,7 +34,7 @@ formdata.append("file", fileInput.files[0], "Input.md"); formdata.append( "settings", JSON.stringify({ - InputFile: "file", + File: "file", PdfCompliance: "PDF/A-1B", EnableAccessibility: false }) @@ -60,7 +60,7 @@ var content = new MultipartFormDataContent(); content.Add(new StreamContent(File.OpenRead("Input.md")), "file", "Input.md"); var settings = new { - InputFile = "file", + File = "file", PdfCompliance = "PDF/A-1B", EnableAccessibility = false }; diff --git a/Document-Processing/Web-apis/consume-apis/word-to-markdown.md b/Document-Processing/Web-apis/consume-apis/word-to-markdown.md index cddc8ca7c9..49724520d7 100644 --- a/Document-Processing/Web-apis/consume-apis/word-to-markdown.md +++ b/Document-Processing/Web-apis/consume-apis/word-to-markdown.md @@ -17,7 +17,7 @@ To convert a Word document to Markdown, send a request to the /v1/conversion/wor {% highlight c# tabtitle="Curl" %} -curl -v --location 'http://localhost:8003/v1/conversion/word-to-md' \ +curl -v --location 'http://localhost:8003/v1/conversion/word-to-markdown' \ --form 'file=@"Input.docx"' \ --form 'settings={ "File": "file", @@ -43,7 +43,7 @@ const requestOptions = { redirect: "follow" }; -fetch("http://localhost:8003/v1/conversion/word-to-md", requestOptions) +fetch("http://localhost:8003/v1/conversion/word-to-markdown", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) @@ -52,7 +52,7 @@ fetch("http://localhost:8003/v1/conversion/word-to-md", requestOptions) {% highlight c# tabtitle="C#" %} var client = new HttpClient(); -var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/word-to-md"); +var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8003/v1/conversion/word-to-markdown"); var content = new MultipartFormDataContent(); content.Add(new StreamContent(File.OpenRead("Input.docx")), "file", "Input.docx"); var settings = new From ba3adf97d837c0eb0fb0473435a88c04120f5a3c Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Mon, 27 Jul 2026 18:28:26 +0530 Subject: [PATCH 017/513] Task(1043618): Revamped the UG documentation for the How-To samples in the Angular PDF Viewer platform --- .../PDF-Viewer/angular/how-to/find-text-async.md | 14 +++++++------- .../PDF/PDF-Viewer/angular/how-to/font-family.md | 6 +++--- .../get-base-string-of-the-loaded-document.md | 12 ++++++------ .../PDF/PDF-Viewer/angular/how-to/get-base64.md | 6 +++--- .../PDF/PDF-Viewer/angular/how-to/getPageInfo.md | 2 +- .../angular/how-to/import-export-annotation.md | 2 +- .../angular/how-to/include-authorization-token.md | 4 ++-- ...install-packages-required-for-lower-versions.md | 2 +- .../how-to/load-document-after-resources-loaded.md | 6 +++--- .../PDF/PDF-Viewer/angular/how-to/load-document.md | 4 ++-- .../angular/how-to/load-n-number-page.md | 4 ++-- .../PDF-Viewer/angular/how-to/load-office-files.md | 2 +- .../how-to/load-pdf-viewer-with-local-resources.md | 2 +- .../how-to/lock-annotation-in-a-document.md | 3 +-- .../angular/how-to/lock-formfield-in-a-document.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/min-max-zoom.md | 8 ++++---- .../PDF/PDF-Viewer/angular/how-to/open-bookmark.md | 4 ++-- .../PDF-Viewer/angular/how-to/open-thumbnail.md | 4 ++-- .../pagerenderstarted-pagerendercompleted.md | 6 +++--- .../PDF/PDF-Viewer/angular/how-to/redis-cache.md | 9 +++------ .../resolve-unable-to-find-an-entry-point-error.md | 6 +++--- .../how-to/restricting-zoom-in-mobile-mode.md | 10 +++++----- .../PDF/PDF-Viewer/angular/how-to/retry-timeout.md | 4 ++-- .../angular/how-to/show-custom-stamp-item.md | 10 +++++----- ...op-up-after-completion-of-export-form-fields.md | 6 +++--- .../how-to/signatureselect-signatureunselect.md | 4 ++-- .../PDF-Viewer/angular/how-to/unload-document.md | 2 +- .../angular/how-to/webservice-not-listening.md | 10 +++++----- 28 files changed, 75 insertions(+), 79 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/find-text-async.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/find-text-async.md index 66e420d7fe..56e8e769f0 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/find-text-async.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/find-text-async.md @@ -1,6 +1,6 @@ --- layout: post -title: Find Text Async Angular PDF Viewer component | Syncfusion +title: Find Text Async in Angular PDF Viewer component | Syncfusion description: Learn about the `findTextAsync` in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: Find Text Async @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Find Text using findTextAsync Method in Syncfusion PdfViewer +# Find Text using findTextAsync Method in Syncfusion PDF Viewer The findTextAsync method in the Syncfusion PDF Viewer control allows you to search for specific text or an array of strings asynchronously within a PDF document. The method returns the bounding rectangles for each occurrence of the search term, allowing you to find and work with text positions in the document. @@ -73,14 +73,14 @@ export class AppComponent implements OnInit { viewer.textSearchModule.findTextAsync('pdf', false).then((res: any) =>{ console.log(res); }); -} -findTexts(): void { - const viewer = (document.getElementById('pdfViewer') as any).ej2_instances[0]; - //Search for multiple strings (['pdf', 'the']) with a case-insensitive search across all pages + } + findTexts(): void { + const viewer = (document.getElementById('pdfViewer') as any).ej2_instances[0]; + //Search for multiple strings (['pdf', 'the']) with a case-insensitive search across all pages viewer.textSearchModule.findTextAsync(['pdf', 'the'], false).then((res: any) =>{ console.log(res); }); -} + } } ``` diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/font-family.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/font-family.md index 0564ca379a..27373dc7cd 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/font-family.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/font-family.md @@ -1,7 +1,7 @@ --- -Layout: post +layout: post title: Change the Font Family in Angular PDF Viewer component | Syncfusion -description: Learn how to change the font family in the type signature in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn how to change the font family of the type signature in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: Change the Font Family in the Type Signature documentation: ug @@ -12,7 +12,7 @@ domainurl: ##DomainURL## Use the PDF Viewer's [handWrittenSignatureSettings.typeSignatureFonts](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/handwrittensignaturesettings#typesignaturefonts) property to supply an array of font-family names that the Type Signature control can use. Ensure fonts are loaded before applying them to the viewer (for example, call `changeFontFamily()` after the viewer instance is available, such as in `ngAfterViewInit` or after the component finishes initializing). ```html - + diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md index 74d0e1e273..9939ef7479 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md @@ -1,6 +1,6 @@ --- layout: post -title: Get base string of the loaded document in Angular PDF Viewer component | Syncfusion +title: Get Base64 string of the loaded document in Angular PDF Viewer component | Syncfusion description: Learn here all about Get base string of the loaded document in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: Get base string of the loaded document @@ -12,11 +12,11 @@ domainurl: ##DomainURL## The PDF Viewer exposes `saveAsBlob()` to retrieve the currently loaded PDF as a Blob. Convert that Blob to a Base64 data URL (for example, to save in a database or transfer to a backend) and reload the document later using `load()` with the Base64 data. -The following steps are used to get the base 64 string of the loaded PDF document in the PDF viewer control. +The following steps are used to get the Base64 string of the loaded PDF document in the PDF viewer control. -**Step 1:** Follow the steps provided in the [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create simple PDF Viewer sample in Angular. +**Step 1:** Follow the steps provided in the [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF Viewer sample in Angular. -**Step 2:** Add the following code snippet to get the base 64 string with button click event. +**Step 2:** Add the following code snippet to get the Base64 string with button click event. ```html @@ -38,10 +38,10 @@ base64ofloadedDocument() { console.log(base64data); }; }); - +} ``` -**Step 3:** Use the following code snippet inside the **saveAsBlob()** method to load the document from the base 64 string. +**Step 3:** Use the following code snippet to load the document from the Base64 string. ```typescript // load the document from base 64 string. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base64.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base64.md index c34e982fab..5622ff7a60 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base64.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base64.md @@ -1,6 +1,6 @@ --- layout: post -title: Retrieving Base64 Value from a PDF in Angular PDF Viewer|Syncfusion. +title: Retrieving Base64 Value from a PDF in Angular PDF Viewer | Syncfusion description: Learn here all about how to retrieve the Base64 value of a loaded PDF document in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Retrieve Base64 from a PDF in Angular PDF Viewer +# Retrieve the Base64 value of a PDF in Angular PDF Viewer ### Overview @@ -161,6 +161,6 @@ export class AppComponent implements OnInit { ### Conclusion -By implementing these steps in the Angular component, a PDF document loaded in the PDF Viewer can be converted into a Base64-encoded data URL when a button is clicked. This facilitates the manipulation or transfer of PDF data as needed. +By implementing these steps in the Angular component, you can convert a PDF document loaded in the PDF Viewer into a Base64-encoded data URL when the button is clicked. This facilitates the manipulation or transfer of PDF data as needed. [View sample in GitHub](https://github.com/SyncfusionExamples/angular-pdf-viewer-examples/tree/master/How%20to) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/getPageInfo.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/getPageInfo.md index c7d697e01d..63f9fc7524 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/getPageInfo.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/getPageInfo.md @@ -92,6 +92,6 @@ export class AppComponent implements OnInit { {% endhighlight %} {% endtabs %} -By following these steps, you can successfully integrate and use the get page info API in the EJ2 PDF Viewer. +By following these steps, you can successfully integrate and use the `getPageInfo` API in the EJ2 PDF Viewer. [View Sample in GitHub](https://github.com/SyncfusionExamples/angular-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/import-export-annotation.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/import-export-annotation.md index 91fb3b8f7f..81d2b01e85 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/import-export-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/import-export-annotation.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Import Export annotation in Angular PDF Viewer component +# Import & Export Annotations in Angular PDF Viewer component The PDF Viewer control supports exporting and importing annotations in multiple formats: JSON, XFDF, or as native annotation objects. Use `exportAnnotation('Json')` or `exportAnnotation('Xfdf')` for serialized formats, and `exportAnnotationsAsObject()` to obtain the in-memory annotation objects that can be re-imported with `importAnnotation()`. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md index 7707fc5ddb..bc72a964d3 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md @@ -8,11 +8,11 @@ documentation: ug domainurl: ##DomainURL## --- -# Include the authorization token +# Include the authorization token in Angular PDF Viewer component The PDF Viewer supports adding an authorization token to every AJAX request by configuring the `ajaxRequestSettings.ajaxHeaders` property. Set the header once and the library includes it in all requests initiated by the viewer. -The following steps are used to include the authorization token to the PDF viewer control. +The following steps show how to include the authorization token in the PDF Viewer control. **Step 1:** Follow the steps provided in the [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create simple PDF Viewer sample in Angular. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/install-packages-required-for-lower-versions.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/install-packages-required-for-lower-versions.md index 510f1dcc06..70920bf998 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/install-packages-required-for-lower-versions.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/install-packages-required-for-lower-versions.md @@ -16,7 +16,7 @@ npm install @syncfusion/ej2-angular-pdfviewer@ngcc --save To reference the ngcc package in the `package.json` file, append the `-ngcc` suffix to the package version: -```bash +```json "@syncfusion/ej2-angular-pdfviewer": "20.2.38-ngcc" ``` diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md index 2c38e195ef..3aab737e2f 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md @@ -1,7 +1,7 @@ --- layout: post -title: Load document after resources Loaded Angular PDF Viewer | Syncfusion -description: Learn here all about how to Load document after loading assets in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +title: Load a Document After Resources Are Loaded in Angular PDF Viewer | Syncfusion +description: Learn how to load a document in the Syncfusion Angular PDF Viewer only after PDFium assets have finished loading. platform: document-processing control: PDF Viewer documentation: ug @@ -36,7 +36,7 @@ The `resourcesLoaded` event fires once the viewer finishes loading all required ```ts // app.ts import { Component, ViewChild } from '@angular/core'; -import { PdfViewerComponent, ToolbarService, MagnificationService, NavigationService, LinkAnnotationService, ThumbnailViewService, BookmarkViewService, TextSelectionService, AnnotationService, FormDesignerService, FormFieldsService, PageOrganizerService } from '@syncfusion/ej2-angular-pdfviewer'; +import { PdfViewerModule, PdfViewerComponent, ToolbarService, MagnificationService, NavigationService, LinkAnnotationService, ThumbnailViewService, BookmarkViewService, TextSelectionService, AnnotationService, FormDesignerService, FormFieldsService, PageOrganizerService } from '@syncfusion/ej2-angular-pdfviewer'; @Component({ selector: 'app-root', diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md index 19fa2e90e9..58b6ccbbb5 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md @@ -3,7 +3,7 @@ layout: post title: Load document in Angular PDF Viewer component | Syncfusion description: Learn here all about Load document in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Load document +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -14,7 +14,7 @@ The PDF Viewer supports loading or switching PDF documents at runtime after the The following steps show common approaches for loading documents dynamically. -**Step 1:** Follow the getting started guide to create a basic Angular PDF Viewer sample: https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started +**Step 1:** Follow the getting started guide to create a basic Angular PDF Viewer sample: [Angular PDF Viewer getting started](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) **Step 2:** Use the following code snippet to load the document from a Base64 string. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md index 2d75718670..0f47b1d982 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md @@ -1,9 +1,9 @@ --- layout: post title: Load N number of pages in Angular PDF Viewer component | Syncfusion -description: Learn how to Load N number of pages on initial loading in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn how to load N number of pages on initial loading in the Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Load N number of pages on initial loading +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md index 650d1b9d28..2fd42fe6ff 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md @@ -3,7 +3,7 @@ layout: post title: Load office files in PDF Viewer description: Learn about how to load office files in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: How to load the Office products +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-pdf-viewer-with-local-resources.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-pdf-viewer-with-local-resources.md index ac6c379f71..77f6369591 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-pdf-viewer-with-local-resources.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-pdf-viewer-with-local-resources.md @@ -91,7 +91,7 @@ export class AppComponent { } ``` -### Step 5: Run the Application +### Step 4: Run the Application Run the Angular application: diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-annotation-in-a-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-annotation-in-a-document.md index a51a77470e..cfc4a7d29a 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-annotation-in-a-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-annotation-in-a-document.md @@ -3,7 +3,7 @@ layout: post title: Lock annotation in Angular PDF Viewer component | Syncfusion description: Learn here all about Lock annotation in a document in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Lock annotation in a document +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -45,7 +45,6 @@ The following sample shows how to set `IsLocked` for custom stamp annotations wh ```typescript //Method to lock the custom stamp annotation. public fireAjaxRequestSuccess(event: any, data: any) { - debugger; if (event.action == 'RenderAnnotationComments') { for (var i = data.startPageIndex; i < data.endPageIndex; i++) { for ( diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-formfield-in-a-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-formfield-in-a-document.md index b0a2ebb343..54c1a00e5e 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-formfield-in-a-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/lock-formfield-in-a-document.md @@ -3,7 +3,7 @@ layout: post title: Lock Form Fields in Angular PDF Viewer component | Syncfusion description: Learn here all about Lock Form Fields in a document in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Lock Form Fields in a document +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/min-max-zoom.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/min-max-zoom.md index bc05bf9835..4cf89fc983 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/min-max-zoom.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/min-max-zoom.md @@ -108,7 +108,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, TextSearchService, AnnotationService, TextSelectionService, PrintService, FormFieldsService, FormDesignerService, PageOrganizerService } from '@syncfusion/ej2-angular-pdfviewer'; -import {Browser} from '@syncfusion/ej2-base'; +import { Browser } from '@syncfusion/ej2-base'; @Component({ selector: 'app-container', @@ -135,7 +135,7 @@ import {Browser} from '@syncfusion/ej2-base'; var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; if (Browser.isDevice && !viewer.enableDesktopMode) { viewer.maxZoom = 200; - viewer.minZoom = 10; + viewer.minZoom = 10; } else { viewer.zoomMode = 'Default'; @@ -153,7 +153,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, TextSearchService, AnnotationService, TextSelectionService, PrintService, FormFieldsService, FormDesignerService, PageOrganizerService } from '@syncfusion/ej2-angular-pdfviewer'; -import {Browser} from '@syncfusion/ej2-base'; +import { Browser } from '@syncfusion/ej2-base'; @Component({ selector: 'app-container', @@ -181,7 +181,7 @@ import {Browser} from '@syncfusion/ej2-base'; var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; if (Browser.isDevice && !viewer.enableDesktopMode) { viewer.maxZoom = 200; - viewer.minZoom = 10; + viewer.minZoom = 10; } else { viewer.zoomMode = 'Default'; diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-bookmark.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-bookmark.md index 98e7e6f056..6a35231e8d 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-bookmark.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-bookmark.md @@ -19,7 +19,7 @@ Follow these steps to call the bookmark APIs from the application. **Step 2:** Insert the following code snippet to implement opening the bookmark pane: ```html - + ``` ```ts @@ -29,7 +29,7 @@ openBookmark() { viewer.bookmarkViewModule.openBookmarkPane(); } ``` -Similarly, to close the Bookmark pane programmatically, employ the following code snippet: +Similarly, to close the bookmark pane programmatically, use the following code snippet: ```html diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md index 8d46b7d3c7..9cb8cd092a 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md @@ -3,14 +3,14 @@ layout: post title: Open thumbnail in Angular PDF Viewer component | Syncfusion description: Learn here all about Open thumbnail in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Open thumbnail +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- # Open the thumbnail pane programmatically -The PDF Viewer exposes a `openThumbnailPane()` API to open the thumbnail pane from application code. Use this API when the UI needs to show the thumbnail pane in response to user actions or programmatic workflows. +The PDF Viewer exposes an `openThumbnailPane()` API to open the thumbnail pane from application code. Use this API when the UI needs to show the thumbnail pane in response to user actions or programmatic workflows. Follow these steps to open the thumbnail pane from application code. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/pagerenderstarted-pagerendercompleted.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/pagerenderstarted-pagerendercompleted.md index 9cfd734a2d..c2aebcc17c 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/pagerenderstarted-pagerendercompleted.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/pagerenderstarted-pagerendercompleted.md @@ -1,7 +1,7 @@ --- layout: post title: Rendering events in Angular PDF Viewer component | Syncfusion -description: Learn here all about pageRenderInitiate and pageRenderComplete event in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn here all about pageRenderInitiate and pageRenderComplete events in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer documentation: ug @@ -34,8 +34,8 @@ public pageRenderInitiate(args: any): void { public pageRenderComplete(args: any): void { // This method is called when the page rendering completes - console.log('Rendering of pages completed'); - console.log(args) + console.log('Rendering of pages completed'); + console.log(args) } ``` diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/redis-cache.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/redis-cache.md index 9368bd5faa..b4c78d70ee 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/redis-cache.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/redis-cache.md @@ -3,7 +3,7 @@ layout: post title: Redis cache in Angular PDF Viewer component | Syncfusion description: Learn here all about Redis cache in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Redis cache +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -35,12 +35,9 @@ public void ConfigureServices(IServiceCollection services) ``` -**Step 5:** Use the Redis cache in the PDF Viewer controller action: +5. Use the Redis cache in the PDF Viewer controller: -To use Redis Cache in PDF Viewer, you can implement the IDistributedCache interface and use the Redis Cache service to store and -retrieve - -the PDF document bytes. +To use Redis Cache in PDF Viewer, you can implement the IDistributedCache interface and use the Redis Cache service to store and retrieve the PDF document bytes. ```cs private readonly IHostingEnvironment _hostingEnvironment; diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/resolve-unable-to-find-an-entry-point-error.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/resolve-unable-to-find-an-entry-point-error.md index 6116e8199c..0affe74224 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/resolve-unable-to-find-an-entry-point-error.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/resolve-unable-to-find-an-entry-point-error.md @@ -2,7 +2,7 @@ layout: post title: Find an entry point in Angular PDF Viewer component | Syncfusion description: Learn here how to resolve unable to find an entry point named error in Angular PDF Viewer component of Syncfusion Essential JS 2 and more. -control: Resolve unable to find an entry point error +control: PDF Viewer platform: document-processing documentation: ug domainurl: ##DomainURL## @@ -16,11 +16,11 @@ From the release of version **21.1.0.35 (2023 Volume 1)** of Essential Studio When hosting in cloud environments (Azure, AWS, container platforms), always remove or overwrite older published files to avoid stale native binaries remaining on the host. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md index 5fcec3c4a7..d7b50a22f1 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md @@ -1,7 +1,7 @@ --- layout: post title: Restrict Zoom Percentage in Angular PDF Viewer component | Syncfusion -description: Learn here all how to restrict zoom percentage in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn here how to restrict the zoom percentage in the Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer documentation: ug @@ -21,7 +21,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, TextSearchService, AnnotationService, TextSelectionService, PrintService, FormFieldsService, FormDesignerService, PageOrganizerService } from '@syncfusion/ej2-angular-pdfviewer'; -import {Browser} from '@syncfusion/ej2-base'; +import { Browser } from '@syncfusion/ej2-base'; @Component({ selector: 'app-container', @@ -48,7 +48,7 @@ import {Browser} from '@syncfusion/ej2-base'; var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; if (Browser.isDevice && !viewer.enableDesktopMode) { viewer.maxZoom = 200; - viewer.minZoom = 10; + viewer.minZoom = 10; } else { viewer.zoomMode = 'Default'; @@ -66,7 +66,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, TextSearchService, AnnotationService, TextSelectionService, PrintService, FormFieldsService, FormDesignerService, PageOrganizerService } from '@syncfusion/ej2-angular-pdfviewer'; -import {Browser} from '@syncfusion/ej2-base'; +import { Browser } from '@syncfusion/ej2-base'; @Component({ selector: 'app-container', @@ -94,7 +94,7 @@ import {Browser} from '@syncfusion/ej2-base'; var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; if (Browser.isDevice && !viewer.enableDesktopMode) { viewer.maxZoom = 200; - viewer.minZoom = 10; + viewer.minZoom = 10; } else { viewer.zoomMode = 'Default'; diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md index 9e1e22fd6f..b2b5ee207f 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md @@ -1,7 +1,7 @@ --- layout: post title: Retry Timeout | Syncfusion -Description: Learn here all about Retry Timeout in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn here about the retry timeout in the Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: Retry Timeout documentation: ug @@ -35,7 +35,7 @@ Use cases: ``` -In the given example, the `retryTimeout` is set to 10 seconds, and the `retryCount` is set to 5. This means that if a request made by the PDF Viewer takes longer than 10 seconds to receive a response, it will be considered a timeout. In such cases, The PDF Viewer will resend the same request based on the retryCount. Here, this process will repeat up to maximum of 5 retries. +In the given example, the `retryTimeout` is set to 10 seconds, and the `retryCount` is set to 5. This means that if a request made by the PDF Viewer takes longer than 10 seconds to receive a response, it will be considered a timeout. In such cases, the PDF Viewer will resend the same request based on the retryCount. Here, this process will repeat up to a maximum of 5 retries. When an AJAX request times out, the viewer decrements `retryCount` and retries the request until the count reaches zero. The viewer stops retrying when the request succeeds or when `retryCount` is exhausted, at which point the viewer surfaces an error to the application. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-custom-stamp-item.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-custom-stamp-item.md index 9f77a72310..67cffef8fc 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-custom-stamp-item.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-custom-stamp-item.md @@ -1,7 +1,7 @@ --- layout: post -title: Displaying Custom stamp Items in Angular PDF Viewer|Syncfusion. -description: Learn how to display custom items in the custom stamp Dropdown in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +title: Displaying Custom Stamp Items in the Angular PDF Viewer | Syncfusion +description: Learn how to display custom items in the custom stamp dropdown in the Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer documentation: ug @@ -80,7 +80,7 @@ export class AppComponent implements OnInit { { customStampName: 'Image1', customStampImageSource: 'data:image/png;base64,...' // Provide a valid base64 or URL for the image - }, + }, { customStampName: 'Image2', customStampImageSource: 'data:image/png;base64,...' // Provide a valid base64 or URL for the image @@ -151,7 +151,7 @@ export class AppComponent implements OnInit { { customStampName: 'Image1', customStampImageSource: 'data:image/png;base64,...' // Provide a valid base64 or URL for the image - }, + }, { customStampName: 'Image2', customStampImageSource: 'data:image/png;base64,...' // Provide a valid base64 or URL for the image @@ -168,6 +168,6 @@ export class AppComponent implements OnInit { {% endhighlight %} {% endtabs %} -By following these instructions, you can successfully configure to display custom items in the custom stamp dropdown, allowing users to easily apply personalized stamps to their documents. +By following these instructions, you can successfully display custom items in the custom stamp dropdown, allowing users to easily apply personalized stamps to their documents. [View sample in GitHub](https://github.com/SyncfusionExamples/angular-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md index 9b440d9f6a..8b738cffb8 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md @@ -3,7 +3,7 @@ layout: post title: Show pop up in Angular PDF Viewer component | Syncfusion description: Learn here all about Show pop up after completion of export form fields in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Show pop up after completion of export form fields +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -31,7 +31,7 @@ public fireExportRequestSuccess() { .ej2_instances[0]; //API to notify popup once the form is submitted. pdfViewer.viewerBase.openImportExportNotificationPopup( - 'Your form information has been saved. You can resume it at any times.Form Information Saved' + 'Your form information has been saved. You can resume it at any time.Form Information Saved' ); } @@ -53,7 +53,7 @@ public fireExportRequestSuccess() { .ej2_instances[0]; //API to notify popup once the form is submitted. pdfViewer.viewerBase.openImportExportNotificationPopup( - 'Your form information has been saved. You can resume it at any times.Form Information Saved' + 'Your form information has been saved. You can resume it at any time.Form Information Saved' ); } diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md index 401b31a9af..68631bdcf6 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md @@ -1,7 +1,7 @@ --- layout: post -title: Signature selection events in Angular PDF Viewer component| Syncfusion -description: Learn here all about signatureSelect and signatureUnselect event event in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +title: Signature selection events in Angular PDF Viewer component | Syncfusion +description: Learn here all about signatureSelect and signatureUnselect events in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer documentation: ug diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md index 1276c8dc17..04e63f0c01 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md @@ -3,7 +3,7 @@ layout: post title: Unload document in Angular PDF Viewer component | Syncfusion description: Learn here all about Unload document in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Unload document +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/webservice-not-listening.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/webservice-not-listening.md index 9c70eba23b..e1a74d8df7 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/webservice-not-listening.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/webservice-not-listening.md @@ -2,7 +2,7 @@ layout: post title: Web-service is not listening to error | Syncfusion description: Learn how to clear Web-service is not listening to errors in Syncfusion Angular PDF Viewer component and more. -control: How to clear Web-service is not listening to errors. +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -12,7 +12,7 @@ domainurl: ##DomainURL## If the Angular PDF Viewer reports a "Web-service is not listening" error, use the browser's developer tools to diagnose the request and the server behavior. The steps below guide the most common troubleshooting paths and remediation actions. -**Step 1:** Open the browser's developer tools by right-clicking on the page and selecting `Inspect` from the dropdown menu. Then Navigate to the `Network` tab. This will show you all of the requests that are being made by the page. +**Step 1:** Open the browser's developer tools by right-clicking on the page and selecting `Inspect` from the dropdown menu. Then navigate to the `Network` tab. This will show you all of the requests that are being made by the page. ![Alt text](../images/networktab.png) @@ -46,13 +46,13 @@ The `Document cache not found` exception in PDF Viewer typically occurs when the It's possible that you have multiple instances of the PDF Viewer running simultaneously, which can cause issues with the document cache. To check for this, open the Task Manager on your computer and look for any instances of the PDF Viewer running. If you find multiple instances, try closing them all and reopening the viewer. -We can use Redis cache and distributive cache for this issue. +We can use Redis cache and distributed cache for this issue. ### Check your network connection Ensure that your network connection is stable and strong enough to support the web service you are trying to use. Sometimes, simply restarting the web service can resolve the issue. Try stopping and starting the service again to see if it resolves the problem. -## The document pointer does not exist in the cache. +## The document pointer does not exist in the cache The `Document pointer does not exist in the cache` exception in the PDF Viewer usually occurs when there is an issue with loading or caching the PDF document. This error can be caused by a variety of reasons, including: @@ -66,4 +66,4 @@ To clear this error in the Angular PDF Viewer, you can try the following steps: ## Internal server error -Server-side exceptions happen for various use cases. We can't just define them if they are document-specific, provide the document, or you may need to contact support for further assistance. \ No newline at end of file +Server-side exceptions happen for various use cases. If they are document-specific, provide the document, or contact support for further assistance. \ No newline at end of file From 2212d0087eb6288e7b50c1b3cf4e823572df290c Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Mon, 27 Jul 2026 20:10:03 +0530 Subject: [PATCH 018/513] Task(1043618): Resolved the CI failure --- .../angular/how-to/change-selection-border.md | 4 ++-- .../how-to/configure-annotation-selector-setting.md | 10 +++++----- .../PDF/PDF-Viewer/angular/how-to/conformance.md | 4 ++-- .../angular/how-to/control-annotation-visibility.md | 2 +- .../convert-pdf-library-bounds-to-pdf-viewer-bounds.md | 4 ++-- .../PDF/PDF-Viewer/angular/how-to/delete-annotation.md | 2 +- .../PDF-Viewer/angular/how-to/download-start-event.md | 4 ++-- .../angular/how-to/enable-disable-annotation.md | 4 ++-- .../PDF/PDF-Viewer/angular/how-to/export-as-image.md | 2 +- .../angular/how-to/extract-text-completed.md | 4 ++-- .../PDF-Viewer/angular/how-to/extract-text-option.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/extract-text.md | 2 +- .../how-to/get-base-string-of-the-loaded-document.md | 4 ++-- .../angular/how-to/include-authorization-token.md | 2 +- .../how-to/load-document-after-resources-loaded.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/load-document.md | 2 +- .../PDF-Viewer/angular/how-to/load-n-number-page.md | 4 ++-- .../PDF/PDF-Viewer/angular/how-to/load-office-files.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/open-thumbnail.md | 2 +- .../angular/how-to/restricting-zoom-in-mobile-mode.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/retry-timeout.md | 2 +- ...ow-pop-up-after-completion-of-export-form-fields.md | 2 +- .../how-to/signatureselect-signatureunselect.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/unload-document.md | 4 +++- 24 files changed, 38 insertions(+), 36 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md index 9ee23209f9..f78bb81637 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md @@ -1,7 +1,7 @@ --- layout: post -title: Change the selection border in Angular PDF Viewer component | Syncfusion -description: Learn how to change the selection border in the Syncfusion Angular PDF Viewer component. +title: Change the selection border in Angular | Syncfusion +description: Learn how to change the selection border in the Syncfusion Angular PDF Viewer component using the annotationSelectorSettings property, with step-by-step code samples. platform: document-processing control: PDF Viewer documentation: ug diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md index ce3a82ee9f..52af5567a2 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/configure-annotation-selector-setting.md @@ -1,6 +1,6 @@ --- layout: post -title: Configure annotation selector settings in Angular PDF Viewer | Syncfusion +title: Configure annotation selector settings in Angular | Syncfusion description: Learn how to configure annotation selector settings in the Angular PDF Viewer using annotationSelectorSettings and related options. platform: document-processing control: PDF Viewer @@ -8,15 +8,15 @@ documentation: ug domainurl: ##DomainURL## --- -# Configure Annotation Selector Settings +# Configure Annotation Selector Settings in Angular ### Annotation Selector Settings -Use the [annotationSelectorSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/annotationSelectorSettings/) property to customize the appearance and interaction behavior of the annotation selector in the Angular PDF Viewer UI. +Use the [annotationSelectorSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/annotationselectorsettings) property to customize the appearance and interaction behavior of the annotation selector in the Angular PDF Viewer UI. ### AnnotationSelectorSettingsModel -The [AnnotationSelectorSettingsModel](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/annotationSelectorSettingsModel/) defines selector appearance and behavior settings—such as border colors, resizer appearance, and selector line style—providing fine-grained control over how annotations are displayed and manipulated. +The [AnnotationSelectorSettingsModel](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/annotationselectorsettingsmodel) defines selector appearance and behavior settings—such as border colors, resizer appearance, and selector line style—providing fine-grained control over how annotations are displayed and manipulated. Steps to configure annotation selector settings: @@ -161,7 +161,7 @@ export class AppComponent implements OnInit { - selectionBorderThickness: Specifies the thickness of the selection border. - resizerShape: Sets the shape of the resizer handles (for example, Circle or Square). - selectorLineDashArray: Specifies the dash pattern for the selector line. -- resizerLocation: Determines where the resizers appear relative to the annotation (for example, Corners or Edges). +- resizerLocation: Determines where the resizer handles appear relative to the annotation (for example, Corners or Edges). - resizerCursorType: Sets the cursor style when hovering over a resizer. [View sample in GitHub](https://github.com/SyncfusionExamples/angular-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md index 3aab6a51cf..ae97167627 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/conformance.md @@ -1,7 +1,7 @@ --- layout: post -title: Supported PDF conformance levels | Syncfusion -description: Learn about the supported PDF/A and PDF/X conformance levels in the Angular PDF Viewer component. +title: Supported PDF conformance levels in Angular | Syncfusion +description: Learn about the supported PDF/A and PDF/X conformance levels in the Syncfusion Angular PDF Viewer component. platform: document-processing control: PDF Viewer documentation: ug diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md index 3fb17cb553..eb69b2e725 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/control-annotation-visibility.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Control annotation visibility in PDF Viewer +# Control annotation visibility in Angular PDF Viewer ## Overview diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md index 44a7cc9390..0899f5f88c 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md @@ -1,6 +1,6 @@ --- layout: post -title: Convert PDF Library bounds to PDF Viewer bounds | Syncfusion +title: Convert PDF Library bounds to PDF Viewer bounds in Angular | Syncfusion description: Learn how to convert PDF Library bounds into PDF Viewer bounds when exporting annotations, ensuring accurate placement in the Angular PDF Viewer. platform: document-processing control: PDF Viewer @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Convert PDF Library bounds to PDF Viewer bounds +# Convert PDF Library bounds to PDF Viewer bounds in Angular When exporting annotations from the PDF Library, convert the annotation bounds into the PDF Viewer coordinate system so exported annotations appear at the correct position and scale in the viewer. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md index 91a03a27e8..fb465db988 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/delete-annotation.md @@ -1,6 +1,6 @@ --- layout: post -title: Delete a specific annotation in Angular PDF Viewer component | Syncfusion +title: Delete a specific annotation in Angular PDF Viewer | Syncfusion description: Learn here all about Delete a specific annotation in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: Delete a specific annotation diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md index 60a7691be3..42769206a5 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md @@ -1,6 +1,6 @@ --- layout: post -title: Controlling File Downloads in Angular PDF Viewer component | Syncfusion +title: Control file downloads in Angular PDF Viewer | Syncfusion description: Learn here how to control file downloads in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Controlling File Downloads in Syncfusion® PDF Viewer +# Controlling File Downloads in Syncfusion® PDF Viewer The PDF Viewer exposes a `downloadStart` event that enables interception of a document download before it begins. Use this event to apply custom logic and, if needed, cancel the download by setting the event's `cancel` flag. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md index 3c01646af3..7454aa83a0 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md @@ -1,6 +1,6 @@ --- layout: post -title: Enable and disable the delete button based on annotation selection and unselection | Syncfusion +title: Enable or disable the delete button using annotation selection events description: Learn to enable and disable the delete button based on annotation selection and unselection events in Syncfusion Angular PDF Viewer component and more. platform: document-processing control: How to enable and disable the delete button based on annotation selection and unselection events @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# How to enable and disable the delete button based on annotation selection and unselection events +# Enable or disable the delete button using annotation selection events This article demonstrates how to enable and disable a toolbar delete button in response to annotation selection and unselection events using `annotationSelect` and `annotationUnSelect`. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md index 3473fe5315..af7ab9f76a 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/export-as-image.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -## Export as image in Angular PDF Viewer component +# Export as image in Angular PDF Viewer component The PDF Viewer component can export pages as Base64-encoded image strings using the `exportAsImage()` method (single page) and `exportAsImages()` method (page range). The examples below demonstrate single-page export, range export, and how to specify a custom image size. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md index 56be29f104..99b39ff6fa 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md @@ -1,6 +1,6 @@ --- layout: post -title: extractTextCompleted Event in Angular PDF Viewer component | Syncfusion +title: extractTextCompleted Event in Angular | Syncfusion description: Learn here all about extractTextCompleted Event in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -## Extract text using the extractTextCompleted event in the PDF Viewer +# Extract text using the extractTextCompleted event in the PDF Viewer The PDF Viewer can extract page text along with bounding information. Enable text extraction using the `isExtractText` property and handle the `extractTextCompleted` event to receive extracted text and bounds for the document. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-option.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-option.md index 41883ebeff..21e28a92e2 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-option.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-option.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -## Extract text option in the Angular PDF Viewer +# Extract text option in the Angular PDF Viewer The `extractTextOption` property controls the amount of text and layout information returned by the viewer. Adjusting this value helps balance memory usage and the level of detail required for downstream processing. The viewer exposes four options: diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md index d039412dce..6828013a18 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -## Extract text method in the PDF Viewer +# Extract text method in the PDF Viewer The `extractText` method retrieves text content and, optionally, positional data for elements on one or more pages. It returns a Promise that resolves to an object containing extracted `textData` (detailed items with bounds) and `pageText` (concatenated plain text). diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md index 9939ef7479..9637cfaea7 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/get-base-string-of-the-loaded-document.md @@ -1,6 +1,6 @@ --- layout: post -title: Get Base64 string of the loaded document in Angular PDF Viewer component | Syncfusion +title: Get Base64 string of the loaded document in Angular | Syncfusion description: Learn here all about Get base string of the loaded document in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: Get base string of the loaded document @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Get the Base64 string of the loaded PDF document -The PDF Viewer exposes `saveAsBlob()` to retrieve the currently loaded PDF as a Blob. Convert that Blob to a Base64 data URL (for example, to save in a database or transfer to a backend) and reload the document later using `load()` with the Base64 data. +The PDF Viewer exposes `saveAsBlob()` to retrieve the currently loaded PDF as a Blob. Convert that Blob to a Base64 data URL (for example, to save in a database or transfer to a back end) and reload the document later using `load()` with the Base64 data. The following steps are used to get the Base64 string of the loaded PDF document in the PDF viewer control. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md index bc72a964d3..3ff063e7e9 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/include-authorization-token.md @@ -1,6 +1,6 @@ --- layout: post -title: Include authorization token in Angular PDF Viewer component | Syncfusion +title: Include authorization token in Angular | Syncfusion description: Learn here all about Include authorization token in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: Include authorization token diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md index 3aab737e2f..76628a926b 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document-after-resources-loaded.md @@ -1,6 +1,6 @@ --- layout: post -title: Load a Document After Resources Are Loaded in Angular PDF Viewer | Syncfusion +title: Load a Document After Resources Are Loaded in Angular | Syncfusion description: Learn how to load a document in the Syncfusion Angular PDF Viewer only after PDFium assets have finished loading. platform: document-processing control: PDF Viewer diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md index 58b6ccbbb5..b865b29216 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-document.md @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Load PDF documents dynamically -The PDF Viewer supports loading or switching PDF documents at runtime after the initial viewer initialization. Use the [load](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/#load) method to open a document from a URL or a Base64 string. +The PDF Viewer supports loading or switching PDF documents at runtime after the initial viewer initialization. Use the [load](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#load) method to open a document from a URL or a Base64 string. The following steps show common approaches for loading documents dynamically. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md index 0f47b1d982..9720049d0c 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-n-number-page.md @@ -8,11 +8,11 @@ documentation: ug domainurl: ##DomainURL## --- -# Load N pages initially +# Load N pages initially in Angular Control the number of pages the PDF Viewer renders on the initial load to improve perceived performance and reduce initial memory usage. Additional pages are rendered dynamically as the user scrolls through the document, allowing quick access to early pages without loading the entire file. -Set the [initialRenderPages](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/#initialrenderpages) property to specify how many pages to render initially. For large documents, avoid high values for `initialRenderPages` because rendering many pages at once increases memory use and may slow loading. Typical ranges of 10–20 pages work well for most documents; adjust based on document size and client capabilities. +Set the [initialRenderPages](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#initialrenderpages) property to specify how many pages to render initially. For large documents, avoid high values for `initialRenderPages` because rendering many pages at once increases memory use and may slow loading. Typical ranges of 10–20 pages work well for most documents; adjust based on document size and client capabilities. {% tabs %} {% highlight ts tabtitle="Standalone" %} diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md index 2fd42fe6ff..4969e851b0 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/load-office-files.md @@ -1,6 +1,6 @@ --- layout: post -title: Load office files in PDF Viewer +title: Load office files in Angular PDF Viewer | Syncfusion description: Learn about how to load office files in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md index 9cb8cd092a..194597993a 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/open-thumbnail.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Open the thumbnail pane programmatically +# Open the thumbnail pane programmatically in Angular The PDF Viewer exposes an `openThumbnailPane()` API to open the thumbnail pane from application code. Use this API when the UI needs to show the thumbnail pane in response to user actions or programmatic workflows. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md index d7b50a22f1..8eaf1ff910 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/restricting-zoom-in-mobile-mode.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Restrict zoom percentage on mobile devices +# Restrict zoom percentage on mobile devices in Angular Use `minZoom` and `maxZoom` to restrict zoom levels on mobile devices and improve scrolling performance and perceived load time. Restricting zoom prevents extreme zoom levels that can degrade rendering performance on constrained devices. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md index b2b5ee207f..1c82bff0a2 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/retry-timeout.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Retry timeout +# Retry timeout in Angular The `retryTimeout` property controls how long the PDF Viewer waits (in seconds) for an AJAX response before considering that request timed out. When a timeout occurs, the viewer will retry the request according to the `retryCount` setting. Properly configuring `retryTimeout` and `retryCount` makes the viewer more resilient to transient network errors while avoiding excessive load on the server. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md index 8b738cffb8..92986ff2bd 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/show-pop-up-after-completion-of-export-form-fields.md @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Show pop-up after completion of export form fields -The [exportSuccess](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/exportSuccessEventArgs/) event fires when exporting annotations or form data completes successfully. Use this event to display a notification pop-up that informs users the export finished and their data was saved. +The [exportSuccess](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/exportsuccesseventargs) event fires when exporting annotations or form data completes successfully. Use this event to display a notification pop-up that informs users the export finished and their data was saved. Use the following example to display a notification after a successful export. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md index 68631bdcf6..66893d6f46 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/signatureselect-signatureunselect.md @@ -1,6 +1,6 @@ --- layout: post -title: Signature selection events in Angular PDF Viewer component | Syncfusion +title: Signature selection events in Angular | Syncfusion description: Learn here all about signatureSelect and signatureUnselect events in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing control: PDF Viewer diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md index 04e63f0c01..a3ed4745e9 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/unload-document.md @@ -8,9 +8,11 @@ documentation: ug domainurl: ##DomainURL## --- +# Unload document in Angular PDF Viewer component + ## Unload the PDF document programmatically -The PDF Viewer provides the [unload()](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/#unload) method to remove the currently loaded PDF from the viewer instance. Use this API to free memory or reset the viewer when navigating between documents or closing the viewer. +The PDF Viewer provides the [unload()](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#unload) method to remove the currently loaded PDF from the viewer instance. Use this API to free memory or reset the viewer when navigating between documents or closing the viewer. The following steps are used to unload the PDF document programmatically. From 2fa48cdbf0be28e7400c85a61e8f97b69bca8191 Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Mon, 27 Jul 2026 22:00:18 +0530 Subject: [PATCH 019/513] 1041390: Updated the Angular .md Files --- .../dropbox-cloud-file-storage.md | 32 ++++++------- .../opening-documents/google-cloud-storage.md | 28 +++++------ .../angular/opening-documents/google-drive.md | 28 +++++------ .../angular/opening-documents/one-drive.md | 48 +++++++++---------- 4 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md b/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md index 719aea1739..7530231118 100644 --- a/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md +++ b/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md @@ -1,7 +1,7 @@ --- layout: post -title: Open Dropbox Files in Angular Document Editor | Syncfusion -description: Learn about how to Open document from Dropbox cloud file storage in Angular Document editor control of Syncfusion Essential JS 2 and more details. +title: Open Dropbox Files in Angular DOCX Editor | Syncfusion +description: Learn about how to Open document from Dropbox cloud file storage in Angular Document Editor control of Syncfusion Essential JS 2 and more details. platform: document-processing control: Open document from Dropbox cloud file storage documentation: ug @@ -10,17 +10,17 @@ domainurl: ##DomainURL## # Open document from Dropbox cloud file storage -To load a document from Dropbox cloud file storage in a [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below +To load a document from Dropbox cloud file storage in a [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below. -**Step 1:** Create a Dropbox API +**Step 1:** Create a Dropbox API app -To create a Dropbox API App, you should follow the official documentation provided by Dropbox [link](https://www.dropbox.com/developers/documentation/dotnet#tutorial). The process involves visiting the Dropbox Developer website and using their App Console to set up your API app. This app will allow you to interact with Dropbox programmatically, enabling secure access to files and data. +To create a Dropbox API app, you can follow the official Dropbox documentation [link](https://www.dropbox.com/developers/documentation/dotnet#tutorial). The process involves visiting the Dropbox Developer website and using their App Console to set up your API app. This app will allow you to interact with Dropbox programmatically, enabling secure access to files and data. -**Step 2:** Create a Simple Document Editor Sample in angular +**Step 2:** Create a simple Document Editor sample in Angular -Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in angular. This will give you a basic setup of the Document Editor component. +Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in Angular. This will give you a basic setup of the Document Editor component. -**Step 3:** Modify the `DocumentEditorController.cs` File in the Web Service Project +**Step 3:** Modify the `DocumentEditorController.cs` file in the web service project * Create a web service project in .NET Core 3.0 or above. You can refer to this [link](../web-services-overview) for instructions on how to create a web service project. @@ -34,7 +34,7 @@ using Dropbox.Api; using Dropbox.Api.Files; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp private IConfiguration _configuration; @@ -58,14 +58,14 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC [AcceptVerbs("Post")] [HttpPost] [EnableCors("AllowAllOrigins")] -[Route("LoadFromBoxCloud")] +[Route("LoadFromDropBox")] //Post action for Loading the documents public async Task LoadFromDropBox([FromBody] Dictionary jsonObject) { - if (jsonObject == null && !jsonObject.ContainsKey("documentName")) + if (jsonObject == null || !jsonObject.ContainsKey("documentName")) { - return null + return null; } MemoryStream stream = new MemoryStream(); @@ -85,7 +85,7 @@ public async Task LoadFromDropBox([FromBody] Dictionary } ``` -* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration +* Open the `appsettings.json` file in your web service project. Add the following lines below the existing `"AllowedHosts"` configuration. ```json { @@ -101,11 +101,11 @@ public async Task LoadFromDropBox([FromBody] Dictionary } ``` -> Replace **Your_Dropbox_Access_Token** with your actual Dropbox access token and **Your_Folder_Name** with your folder name. +N> Replace **Your_Dropbox_Access_Token** with your actual Dropbox access token and **Your_Folder_Name** with your folder name. -**Step 4:** Modify the index File in the Document Editor sample +**Step 4:** Modify the index file in the Document Editor sample -In the client-side, the document is returned from the web service is opening using [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. +On the client side, the document returned from the web service is opened using the [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; diff --git a/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md b/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md index f785ddafa2..8d3cf74710 100644 --- a/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md +++ b/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md @@ -1,22 +1,22 @@ --- layout: post -title: Open Google Cloud Files in Angular Document Editor | Syncfusion -description: Learn about how to Open document from Google Cloud Storage in Angular Document editor control of Syncfusion Essential JS 2 and more details. +title: Open Google Cloud Files in Angular DOCX Editor | Syncfusion +description: Learn about how to Open document from Google Cloud Storage in Angular Document Editor control of Syncfusion Essential JS 2 and more details. platform: document-processing control: Open document from Google Cloud Storage documentation: ug domainurl: ##DomainURL## --- -# Open document from Google Cloud Storage in Angular Document editor +# Open document from Google Cloud Storage in Angular Document Editor -To load a document from Google Cloud Storage in a [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below +To load a document from Google Cloud Storage in a [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below. -**Step 1:** Create a Simple Document Editor Sample in angular +**Step 1:** Create a simple Document Editor sample in Angular -Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in angular. This will give you a basic setup of the Document Editor component. +Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in Angular. This will give you a basic setup of the Document Editor component. -**Step 2:** Modify the `DocumentEditorController.cs` File in the Web Service Project +**Step 2:** Modify the `DocumentEditorController.cs` file in the web service project * Create a web service project in .NET Core 3.0 or above. You can refer to this [link](../web-services-overview) for instructions on how to create a web service project. @@ -30,7 +30,7 @@ using Google.Cloud.Storage.V1; using Google.Apis.Auth.OAuth2; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp // Private readonly object _storageClient @@ -71,9 +71,9 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC public async Task LoadFromGoogleCloud([FromBody] Dictionary jsonObject) { - if (jsonObject == null && !jsonObject.ContainsKey("documentName")) + if (jsonObject == null || !jsonObject.ContainsKey("documentName")) { - return null + return null; } MemoryStream stream = new MemoryStream(); @@ -90,7 +90,7 @@ public async Task LoadFromGoogleCloud([FromBody] Dictionary LoadFromGoogleCloud([FromBody] Dictionary Replace **Your Bucket name from Google Cloud Storage** with the actual name of your Google Cloud Storage bucket +> Replace **Your Bucket name from Google Cloud Storage** with the actual name of your Google Cloud Storage bucket. > Replace **path/to/service-account-key.json** with the actual file path to your service account key JSON file. Make sure to provide the correct path and filename. -**Step 3:** Modify the index File in the Document Editor sample +**Step 3:** Modify the index file in the Document Editor sample -In the client-side, the document is returned from the web service is opening using [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. +On the client side, the document returned from the web service is opened using the [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; diff --git a/Document-Processing/Word/Word-Processor/angular/opening-documents/google-drive.md b/Document-Processing/Word/Word-Processor/angular/opening-documents/google-drive.md index f9177e2349..68b19ea235 100644 --- a/Document-Processing/Word/Word-Processor/angular/opening-documents/google-drive.md +++ b/Document-Processing/Word/Word-Processor/angular/opening-documents/google-drive.md @@ -1,26 +1,26 @@ --- layout: post -title: Open Google Drive Files in Angular Document Editor | Syncfusion -description: Learn about how to Open document from Google Drive in Angular Document editor control of Syncfusion Essential JS 2 and more details. +title: Open Google Drive Files in Angular DOCX Editor | Syncfusion +description: Learn about how to Open document from Google Drive in Angular Document Editor control of Syncfusion Essential JS 2 and more details. platform: document-processing control: Open document from Google Drive documentation: ug domainurl: ##DomainURL## --- -# Open document from Google Drive in Angular Document editor +# Open document from Google Drive in Angular Document Editor -To load a document from Google Drive in a [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below +To load a document from Google Drive in a [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below. -**Step 1:** Set up Google Drive API +**Step 1:** Set up the Google Drive API -You must set up a project in the Google Developers Console and enable the Google Drive API. Obtain the necessary credentials to access the API. For more information, view the official [link](https://developers.google.com/drive/api/guides/enable-sdk). +You must set up a project in the Google Developers Console and enable the Google Drive API. Obtain the necessary credentials to access the API. For more information, refer to the official [link](https://developers.google.com/drive/api/guides/enable-sdk). -**Step 2:** Create a Simple Document Editor Sample in angular +**Step 2:** Create a simple Document Editor sample in Angular -Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in angular. This will give you a basic setup of the Document Editor component. +Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in Angular. This will give you a basic setup of the Document Editor component. -**Step 3:** Modify the `DocumentEditorController.cs` File in the Web Service Project +**Step 3:** Modify the `DocumentEditorController.cs` file in the web service project * Create a web service project in .NET Core 3.0 or above. You can refer to this [link](../web-services-overview) for instructions on how to create a web service project. @@ -34,7 +34,7 @@ using Google.Apis.Drive.v3; using Google.Apis.Util.Store; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp private IConfiguration _configuration; @@ -113,7 +113,7 @@ public async Task LoadFromGoogleDrive([FromBody] Dictionary LoadFromGoogleDrive([FromBody] Dictionary Replace **Your Google Drive Folder ID**, **Your Application name**, and **Your Path to the OAuth 2.0 Client IDs json file** with your actual Google drive folder ID , Your name for your application and the path for the JSON file. +> Replace **Your Google Drive Folder ID**, **Your Application name**, and **Your Path to the OAuth 2.0 Client IDs json file** with your actual Google Drive folder ID, your name for your application, and the path for the JSON file. > The **FolderId** part is the unique identifier for the folder. For example, if your folder URL is: `https://drive.google.com/drive/folders/abc123xyz456`, then the folder ID is `abc123xyz456`. -**Step 4:** Modify the index File in the Document Editor sample +**Step 4:** Modify the index file in the Document Editor sample -In the client-side, the document is returned from the web service is opening using [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. +On the client side, the document returned from the web service is opened using the [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; diff --git a/Document-Processing/Word/Word-Processor/angular/opening-documents/one-drive.md b/Document-Processing/Word/Word-Processor/angular/opening-documents/one-drive.md index 4c3bc73a6b..5fe8214b4c 100644 --- a/Document-Processing/Word/Word-Processor/angular/opening-documents/one-drive.md +++ b/Document-Processing/Word/Word-Processor/angular/opening-documents/one-drive.md @@ -1,26 +1,26 @@ --- layout: post -title: Open document from One Drive in Angular Document editor | Syncfusion -description: Learn about how to Open document from One Drive in Angular Document editor control of Syncfusion Essential JS 2 and more details. +title: Open OneDrive Files in Angular Docx Editor | Syncfusion +description: Learn about how to Open document from OneDrive in the Angular Document Editor control of Syncfusion Essential JS 2 and more details. platform: document-processing -control: Open document from One Drive +control: Open document from OneDrive documentation: ug domainurl: ##DomainURL## --- -# Open document from One Drive in Angular Document editor +# Open document from OneDrive in Angular Document Editor -To load a document from One Drive in a [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below +To load a document from OneDrive in a [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor), you can follow the steps below -**Step 1:** Create the Microsoft graph API. +**Step 1:** Create the Microsoft Graph API. -Need to create a Microsoft Graph API application and obtain the necessary credentials, namely the application ID and tenant ID. Follow the steps provided in the [link](https://learn.microsoft.com/en-us/training/modules/msgraph-access-file-data/3-exercise-access-files-onedrive) to create the application and obtain the required IDs. +You Need to create a Microsoft Graph API application and obtain the necessary credentials, namely the application ID and tenant ID. Follow the steps provided in the [link](https://learn.microsoft.com/en-us/training/modules/msgraph-access-file-data/3-exercise-access-files-onedrive) to create the application and obtain the required IDs. -**Step 2:** Create a Simple Document Editor Sample in angular +**Step 2:** Create a simple Document Editor sample in angular -Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in angular. This will give you a basic setup of the Document Editor component. +Start by following the steps provided in this [link](../getting-started) to create a simple Document Editor sample in Angular. This will give you a basic setup of the Document Editor component. -**Step 3:** Modify the `DocumentEditorController.cs` File in the Web Service Project +**Step 3:** Modify the `DocumentEditorController.cs` file in the web service project * Create a web service project in .NET Core 3.0 or above. You can refer to this [link](../web-services-overview) for instructions on how to create a web service project. @@ -35,7 +35,7 @@ using Microsoft.Identity.Client; using Helpers; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp private IConfiguration _configuration; @@ -54,14 +54,14 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC } ``` -* Create the `LoadFromOneDrive()` method to load the document from One Drive. +* Create the `LoadFromOneDrive()` method to load the document from OneDrive. ```csharp [AcceptVerbs("Post")] [HttpPost] [EnableCors("AllowAllOrigins")] -[Route("LoadFromBoxCloud")] -//Post action for Loading the documents +[Route("LoadFromOneDrive")] +//Post action for Loading documents public async Task LoadFromOneDrive([FromBody] Dictionary jsonObject) { @@ -111,7 +111,7 @@ public async Task LoadFromOneDrive([FromBody] Dictionary } ``` -* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration +* Open the `appsettings.json` file in your web service project. Add the following lines below the existing `"AllowedHosts"` configuration ```json { @@ -123,7 +123,7 @@ public async Task LoadFromOneDrive([FromBody] Dictionary }, "AllowedHosts": "*", "TenantId": "Your_Tenant_ID", - "applApplicationIdicationId": "Your_Application_ID", + "ApplicationId": "Your_Application_ID", "FolderName": "Your_Folder_Name_To_Access_The_Files_In_OneDrive" } @@ -131,9 +131,9 @@ public async Task LoadFromOneDrive([FromBody] Dictionary > Replace **Your_Tenant_ID**, **Your_Application_ID**, and **Your_Folder_Name_To_Access_The_Files_In_OneDrive** with your actual tenant ID, application ID, and folder name. -**Step 4:** Modify the index File in the Document Editor sample +**Step 4:** Modify the index file in the Document Editor sample -In the client-side, the document is returned from the web service is opening using [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. +On the client side, the document is returned from the web service is opened using the[`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; @@ -144,7 +144,7 @@ import { @Component({ selector: 'app-root', // specifies the template string for the DocumentEditorContainer component - template: ` `, + template: ` `, providers: [ToolbarService], }) export class AppComponent implements OnInit { @@ -172,10 +172,10 @@ export class AppComponent implements OnInit { ``` > The following NuGet packages are required to use the previous code example -* **Microsoft.Identity.Client** -* **Microsoft.Graph** -* **Microsoft.Extensions.Configuration** -* **Microsoft.Extensions.Configuration.FileExtensions** -* **Microsoft.Extensions.Configuration.Json** +- **Microsoft.Identity.Client** +- **Microsoft.Graph** +- **Microsoft.Extensions.Configuration** +- **Microsoft.Extensions.Configuration.FileExtensions** +- **Microsoft.Extensions.Configuration.Json** You can install these packages using the NuGet Package Manager in Visual Studio or Visual Studio Code. \ No newline at end of file From f799f14dc28e3514b1ce15945feaf1d71d16a5ec Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Mon, 27 Jul 2026 22:54:33 +0530 Subject: [PATCH 020/513] Task(1043618): Resolved the CI failure --- .../PDF/PDF-Viewer/angular/how-to/change-selection-border.md | 2 +- .../how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/download-start-event.md | 2 +- .../PDF-Viewer/angular/how-to/enable-disable-annotation.md | 4 ++-- .../PDF/PDF-Viewer/angular/how-to/extract-text-completed.md | 2 +- .../PDF/PDF-Viewer/angular/how-to/extract-text.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md index f78bb81637..948906c7d4 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/change-selection-border.md @@ -1,7 +1,7 @@ --- layout: post title: Change the selection border in Angular | Syncfusion -description: Learn how to change the selection border in the Syncfusion Angular PDF Viewer component using the annotationSelectorSettings property, with step-by-step code samples. +description: Learn how to change the selection border in the Syncfusion Angular PDF Viewer component using the annotationSelectorSettings property. platform: document-processing control: PDF Viewer documentation: ug diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md index 0899f5f88c..23b0fb2dbf 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md @@ -1,6 +1,6 @@ --- layout: post -title: Convert PDF Library bounds to PDF Viewer bounds in Angular | Syncfusion +title: Convert PDF Library bounds to PDF Viewer bounds | Syncfusion description: Learn how to convert PDF Library bounds into PDF Viewer bounds when exporting annotations, ensuring accurate placement in the Angular PDF Viewer. platform: document-processing control: PDF Viewer diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md index 42769206a5..46f64baf2b 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/download-start-event.md @@ -96,4 +96,4 @@ By default, the `cancel` argument is `false`, so the download proceeds unless th ### Enhanced Flexibility -Using the [downloadStart](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/downloadStartEventArgs/) event enables conditional control over downloads—for example, to enforce authentication, restrict downloads for certain documents, or prompt users for confirmation. When using server-backed viewers, confirm whether server-side behavior requires additional handling; canceling the client-side event prevents the local download but may not affect server workflows. \ No newline at end of file +Using the [downloadStart](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/downloadstarteventargs) event enables conditional control over downloads—for example, to enforce authentication, restrict downloads for certain documents, or prompt users for confirmation. When using server-backed viewers, confirm whether server-side behavior requires additional handling; canceling the client-side event prevents the local download but may not affect server workflows. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md index 7454aa83a0..adbb48c2b1 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md @@ -1,6 +1,6 @@ --- layout: post -title: Enable or disable the delete button using annotation selection events +title: Enable or disable the delete button using annotation selection events | Syncfusion description: Learn to enable and disable the delete button based on annotation selection and unselection events in Syncfusion Angular PDF Viewer component and more. platform: document-processing control: How to enable and disable the delete button based on annotation selection and unselection events @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Enable or disable the delete button using annotation selection events +# Enable or disable the delete button using annotation selection events in Angular This article demonstrates how to enable and disable a toolbar delete button in response to annotation selection and unselection events using `annotationSelect` and `annotationUnSelect`. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md index 99b39ff6fa..1754741cc1 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Extract text using the extractTextCompleted event in the PDF Viewer +# Extract text using the extractTextCompleted event in the Angular PDF Viewer The PDF Viewer can extract page text along with bounding information. Enable text extraction using the `isExtractText` property and handle the `extractTextCompleted` event to receive extracted text and bounds for the document. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md index 6828013a18..26dfc23ac6 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Extract text method in the PDF Viewer +# Extract text method in the Angular PDF Viewer The `extractText` method retrieves text content and, optionally, positional data for elements on one or more pages. It returns a Promise that resolves to an object containing extracted `textData` (detailed items with bounds) and `pageText` (concatenated plain text). From 73f8d5f05dec9164cc1a523f3ad2ddb277645727 Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Mon, 27 Jul 2026 23:28:56 +0530 Subject: [PATCH 021/513] Task(1043618): Resolved the CI failure --- .../how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md | 2 +- .../PDF-Viewer/angular/how-to/enable-disable-annotation.md | 4 ++-- .../PDF/PDF-Viewer/angular/how-to/extract-text-completed.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md index 23b0fb2dbf..4e5faa3919 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/convert-pdf-library-bounds-to-pdf-viewer-bounds.md @@ -1,6 +1,6 @@ --- layout: post -title: Convert PDF Library bounds to PDF Viewer bounds | Syncfusion +title: Convert PDF Library bounds to Angular PDF Viewer bounds | Syncfusion description: Learn how to convert PDF Library bounds into PDF Viewer bounds when exporting annotations, ensuring accurate placement in the Angular PDF Viewer. platform: document-processing control: PDF Viewer diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md index adbb48c2b1..32a93c2d19 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/enable-disable-annotation.md @@ -1,6 +1,6 @@ --- layout: post -title: Enable or disable the delete button using annotation selection events | Syncfusion +title: Enable or disable the delete button on annotation events | Syncfusion description: Learn to enable and disable the delete button based on annotation selection and unselection events in Syncfusion Angular PDF Viewer component and more. platform: document-processing control: How to enable and disable the delete button based on annotation selection and unselection events @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Enable or disable the delete button using annotation selection events in Angular +# Enable or disable the delete button using annotation events in Angular This article demonstrates how to enable and disable a toolbar delete button in response to annotation selection and unselection events using `annotationSelect` and `annotationUnSelect`. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md index 1754741cc1..b59aa95860 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Extract text using the extractTextCompleted event in the Angular PDF Viewer +# Extract text using the extractTextCompleted event in Angular PDF Viewer The PDF Viewer can extract page text along with bounding information. Enable text extraction using the `isExtractText` property and handle the `extractTextCompleted` event to receive extracted text and bounds for the document. From e148d314d19a671153e46d0f89344d862fefb41e Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Tue, 28 Jul 2026 08:14:25 +0530 Subject: [PATCH 022/513] 1041390: updated the code for CI issue --- .../angular/opening-documents/dropbox-cloud-file-storage.md | 2 +- .../angular/opening-documents/google-cloud-storage.md | 2 +- .../Word-Processor/angular/opening-documents/google-drive.md | 2 +- .../Word/Word-Processor/angular/opening-documents/one-drive.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md b/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md index 7530231118..c3721ca6f4 100644 --- a/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md +++ b/Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md @@ -105,7 +105,7 @@ N> Replace **Your_Dropbox_Access_Token** with your actual Dropbox access token a **Step 4:** Modify the index file in the Document Editor sample -On the client side, the document returned from the web service is opened using the [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. +On the client side, the document returned from the web service is opened using the [`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#open) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; diff --git a/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md b/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md index 8d3cf74710..61d2e609bf 100644 --- a/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md +++ b/Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md @@ -111,7 +111,7 @@ public async Task LoadFromGoogleCloud([FromBody] Dictionary LoadFromGoogleDrive([FromBody] Dictionary LoadFromOneDrive([FromBody] Dictionary **Step 4:** Modify the index file in the Document Editor sample -On the client side, the document is returned from the web service is opened using the[`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#open) method. +On the client side, the document is returned from the web service is opened using the[`open`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#open) method. ```typescript import { Component, OnInit, ViewChild } from '@angular/core'; From 0e199445b6aedbd1c352c43846ff835a73810bf6 Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Tue, 28 Jul 2026 09:03:40 +0530 Subject: [PATCH 023/513] Task(1043618): Resolved the CI failure --- Document-Processing-toc.html | 2 ++ .../PDF/PDF-Viewer/angular/how-to/extract-text-completed.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index e16bc70782..ce28cbcf9a 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -987,6 +987,7 @@
  • PageRenderInitiate and PageRenderComplete event
  • Open and Close Bookmark pane programmatically
  • Locking Form Fields in a PDF document
  • +
  • Locking annotations in a PDF document
  • SignatureSelect and SignatureUnselect event
  • Controlling File Downloads
  • Minimum and Maximum Zoom Properties
  • @@ -1011,6 +1012,7 @@
  • Dynamically Enable or Disable Text Selection
  • Show and Hide Annotations
  • Load document after resources loaded
  • +
  • Show pop-up after completion of export form fields
  • Troubleshooting diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md index b59aa95860..849de8afb0 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to/extract-text-completed.md @@ -8,7 +8,7 @@ documentation: ug domainurl: ##DomainURL## --- -# Extract text using the extractTextCompleted event in Angular PDF Viewer +# Extract text using extractTextCompleted event in Angular PDF Viewer The PDF Viewer can extract page text along with bounding information. Enable text extraction using the `isExtractText` property and handle the `extractTextCompleted` event to receive extracted text and bounds for the document. From c155ff0938ae1b9848184725f25a8a92caf0376c Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Tue, 28 Jul 2026 09:38:00 +0530 Subject: [PATCH 024/513] Task(1043536): Revamped the UG documentation for the core Angular PDF Viewer documentation pages --- .../PDF/PDF-Viewer/angular/accessibility.md | 4 ++-- .../PDF/PDF-Viewer/angular/download.md | 4 ++-- .../PDF/PDF-Viewer/angular/events.md | 6 ++--- .../PDF/PDF-Viewer/angular/feature-module.md | 4 ++-- .../PDF/PDF-Viewer/angular/how-to-overview.md | 2 +- .../PDF-Viewer/angular/interaction-mode.md | 8 +++---- .../PDF/PDF-Viewer/angular/magnification.md | 4 ++-- .../PDF/PDF-Viewer/angular/mobile-toolbar.md | 10 ++++----- .../PDF-Viewer/angular/module-injection.md | 2 +- .../PDF/PDF-Viewer/angular/navigation.md | 10 ++++----- .../PDF/PDF-Viewer/angular/open-pdf-files.md | 6 ++--- .../PDF/PDF-Viewer/angular/overview.md | 4 ++-- .../PDF/PDF-Viewer/angular/save-pdf-files.md | 4 ++-- .../angular/server-to-standalone.md | 2 +- .../PDF-Viewer/angular/theming-and-styling.md | 2 +- .../PDF/PDF-Viewer/angular/toolbar.md | 22 ++++++++++--------- .../PDF-Viewer/angular/ui-builder-skill.md | 4 ++-- 17 files changed, 50 insertions(+), 48 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/accessibility.md b/Document-Processing/PDF/PDF-Viewer/angular/accessibility.md index f831fc34a4..12616b1c76 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/accessibility.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/accessibility.md @@ -56,7 +56,7 @@ The accessibility compliance for the PDF Viewer component is outlined below. | `aria-valuemax` | Indicates the Maximum value of the PDF Viewer. | | `aria-valuemin` | Indicates the Minimum value of the PDF Viewer. | | `aria-valuenow` | Indicates the current value of the PDF Viewer. | -| `aria-controls` | Attribute is set to the button and it points to the corresponding content. | +| `aria-controls` | Identifies the element whose contents are controlled by the button. | ## Keyboard interaction @@ -241,7 +241,7 @@ Each `keyboardCommand` object consists of a name property, specifying the `name` For example, the first command named `customCopy` is associated with the **G** key and requires both the **Shift** and **Alt** modifier keys to be pressed simultaneously. -Additionally, there's an explanation of the key modifiers used in the gestures: +The key modifiers used in the gestures are as follows: * Ctrl corresponds to the Control key, represented by the value `1`. * Alt corresponds to the Alt key, represented by the value `2`. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/download.md b/Document-Processing/PDF/PDF-Viewer/angular/download.md index d88c541d6c..1cbda1cb9e 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/download.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/download.md @@ -3,7 +3,7 @@ layout: post title: Download in Angular PDF Viewer component | Syncfusion description: Learn here all about Download in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Download +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -79,7 +79,7 @@ To invoke download programmatically, use the following snippet: ```html diff --git a/Document-Processing/PDF/PDF-Viewer/angular/events.md b/Document-Processing/PDF/PDF-Viewer/angular/events.md index fa7c1c1f74..ed5bedc467 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/events.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/events.md @@ -842,7 +842,7 @@ export class AppComponent { ]; public onCustomContextMenuBeforeOpen(args: any): void { - console.log(`Before open context menu at page ${args.name}`); + console.log(`Before open context menu at page: ${args.name}`); } public onDocumentLoad(): void { @@ -3172,5 +3172,5 @@ export class AppComponent { See also: - [Annotation events](./annotation/annotation-event) -- [Form field events](./form-designer/form-field-events) -- [Organize PDF events](./organize-pdf/organize-pdf-events) +- [Form field events](./forms/form-field-events) +- [Organize PDF events](./organize-pages/events) diff --git a/Document-Processing/PDF/PDF-Viewer/angular/feature-module.md b/Document-Processing/PDF/PDF-Viewer/angular/feature-module.md index 7f9c0d99f6..606f628c24 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/feature-module.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/feature-module.md @@ -3,7 +3,7 @@ layout: post title: Feature module in Angular PDF Viewer component | Syncfusion description: Learn here all about Feature module in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Feature module +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -47,4 +47,4 @@ N> In addition to registering the required modules, enable the corresponding com ## See also * [Toolbar items](./toolbar) -* [Toolbar customization](./how-to/toolbar_customization) \ No newline at end of file +* [Toolbar customization](./toolbar-customization/custom-toolbar) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/angular/how-to-overview.md b/Document-Processing/PDF/PDF-Viewer/angular/how-to-overview.md index 2f7004683e..b52891d595 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/how-to-overview.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/how-to-overview.md @@ -1,7 +1,7 @@ --- layout: post title: FAQ Section in Angular PDF Viewer control | Syncfusion -description: In this section, you can know about the various questions asked about manipulation of in Angular PDF Viewer control. +description: In this section, you can know about the various questions asked about manipulation in Angular PDF Viewer control. platform: document-processing control: PDF Viewer documentation: ug diff --git a/Document-Processing/PDF/PDF-Viewer/angular/interaction-mode.md b/Document-Processing/PDF/PDF-Viewer/angular/interaction-mode.md index db4c16a889..495d018bff 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/interaction-mode.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/interaction-mode.md @@ -1,9 +1,9 @@ --- layout: post -title: Interaction mode in Angular PDF Viewer component | Syncfusion -description: Learn here all about Interaction mode in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +title: Interaction Mode in Angular PDF Viewer component | Syncfusion +description: Learn all about Interaction Mode in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Interaction mode +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -79,7 +79,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, ![PDF Viewer selection mode](images/selection.png) -## Panning Mode +## Panning mode Panning mode enables touch-based panning and page scrolling of the loaded PDF; text selection is disabled in this mode. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/magnification.md b/Document-Processing/PDF/PDF-Viewer/angular/magnification.md index a7655a9da8..780c774bf2 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/magnification.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/magnification.md @@ -1,9 +1,9 @@ --- layout: post title: Magnification in Angular PDF Viewer component | Syncfusion -description: Learn here all about Magnification in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn all about Magnification in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Magnification +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- diff --git a/Document-Processing/PDF/PDF-Viewer/angular/mobile-toolbar.md b/Document-Processing/PDF/PDF-Viewer/angular/mobile-toolbar.md index 97dd2d66a0..81fcbfb8ad 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/mobile-toolbar.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/mobile-toolbar.md @@ -1,9 +1,9 @@ --- layout: post title: Mobile Toolbar Interface in Angular PDF Viewer component | Syncfusion -description: Learn All About the Mobile Toolbar Interface in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn all about the Mobile Toolbar Interface in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Mobile Toolbar Interface +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -11,12 +11,12 @@ domainurl: ##DomainURL## The Mobile PDF Viewer offers a variety of features for viewing, searching, annotating, and managing PDF documents on mobile devices. It includes Essential® tools like search, download, bookmarking, annotation, and page organization. Users also have the option to enable desktop toolbar features in mobile mode, providing a more extensive set of actions. -## Mobile Mode Toolbar Configuration +## Mobile mode toolbar configuration In mobile mode, the toolbar is optimized for ease of use on small screens, presenting users with the most common actions for interacting with a PDF document. Below are the key features available in mobile mode: ![Mobile toolbar with primary PDF interaction options](images/mobileToolbar.png) -### Main Toolbar Options: +### Main toolbar options **OpenOption:** Tap to load a PDF document. @@ -37,7 +37,7 @@ In mobile mode, the toolbar is optimized for ease of use on small screens, prese N> In mobile mode, the annotation toolbar is conveniently displayed at the bottom of the viewer. -### More Options Menu: +### More options menu When you open the "more options" menu, you will see additional actions such as: **DownloadOption:** Tap to download the currently opened PDF document. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/module-injection.md b/Document-Processing/PDF/PDF-Viewer/angular/module-injection.md index 9b406885ff..8ab696dcc5 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/module-injection.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/module-injection.md @@ -1,7 +1,7 @@ --- layout: post title: Module Injection for Angular PDF Viewer | Syncfusion -description: Syncfusion Angular PDF Viewer to enable optional features like toolbar, navigation, annotations, search. +description: Learn how to enable optional features like toolbar, navigation, annotations, and search in the Syncfusion Angular PDF Viewer. platform: document-processing control: PDF Viewer documentation: ug diff --git a/Document-Processing/PDF/PDF-Viewer/angular/navigation.md b/Document-Processing/PDF/PDF-Viewer/angular/navigation.md index 2c2026b14e..6d53ae4402 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/navigation.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/navigation.md @@ -1,9 +1,9 @@ --- layout: post title: Navigation in Angular PDF Viewer component | Syncfusion -description: Learn here all about Navigation in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. +description: Learn all about Navigation in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Navigation +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -17,7 +17,7 @@ The Angular PDF Viewer supports several internal and external navigation methods The default toolbar of PDF Viewer contains the following navigation options * **Go to page**:- Navigates to the specific page of a PDF document. -* **Show next page**:- Navigates to the next page of PDF a document. +* **Show next page**:- Navigates to the next page of a PDF document. * **Show previous page**:- Navigates to the previous page of a PDF document. * **Show first page**:- Navigates to the first page of a PDF document. * **Show last page**:- Navigates to the last page of a PDF document. @@ -236,7 +236,7 @@ Hyperlink navigation enables opening external URLs embedded in a PDF file. ## Table of contents navigation -Table of contents navigation allows users to jump to sections listed in the PDF's table of contents. You can enable or disable link navigation using the following code snippet. +Table of contents navigation allows users to jump to sections listed in the PDF's table of contents. You can enable or disable table of contents navigation using the following code snippet. {% tabs %} {% highlight ts tabtitle="Standalone" %} @@ -366,7 +366,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, {% endhighlight %} {% endtabs %} -![Alt text](images/toc.png) +![PDF Viewer showing table of contents navigation](images/toc.png) ## Keyboard navigation with Tab and Shift+Tab keys diff --git a/Document-Processing/PDF/PDF-Viewer/angular/open-pdf-files.md b/Document-Processing/PDF/PDF-Viewer/angular/open-pdf-files.md index 6d8e72ed65..d4e57b914a 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/open-pdf-files.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/open-pdf-files.md @@ -3,7 +3,7 @@ layout: post title: Open PDF Files in Angular PDF Viewer Component | Syncfusion description: Learn here all about how to load PDF files from various locations in Syncfusion Angular PDF Viewer component, it's elements, and more. platform: document-processing -control: Open PDF files +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -76,7 +76,7 @@ public IActionResult Load([FromBody] Dictionary jsonData) **Step 3:** Set the PDF Viewer Properties in Angular PDF viewer component -Modify the `serviceUrl` property of the PDF viewer component with the accurate URL of your web service project, replacing `https://localhost:44396/pdfviewer` with the actual URL of your server.Modify the documentPath with the correct PDF Document URL want to load. +Modify the `serviceUrl` property of the PDF viewer component with the accurate URL of your web service project, replacing `https://localhost:44396/pdfviewer` with the actual URL of your server. Modify the `documentPath` with the correct PDF document URL to load. ```typescript import { Component, OnInit } from '@angular/core'; @@ -111,7 +111,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, ## Opening a PDF from base64 data -The following steps explains how the PDF file can be loaded in PDF Viewer as base64 string. +The following steps explain how the PDF file can be loaded in the PDF Viewer as a base64 string. **Step 1:** Create a Simple PDF Viewer Sample in Angular diff --git a/Document-Processing/PDF/PDF-Viewer/angular/overview.md b/Document-Processing/PDF/PDF-Viewer/angular/overview.md index 542304d820..7d57a30aec 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/overview.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/overview.md @@ -14,13 +14,13 @@ The [Angular PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk) component is * Accurate, reliable rendering of PDF pages. * Easy page navigation with: - * [Thumbnail page view](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/interactive-pdf-navigation/page-thumbnail) + * [Page thumbnail](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/interactive-pdf-navigation/page-thumbnail) * [Bookmark panel](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/interactive-pdf-navigation/bookmark) * [Hyperlink navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/interactive-pdf-navigation/hyperlink) * [Table of contents navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/interactive-pdf-navigation/hyperlink#table-of-contents-navigation) * Core interactions: * [Zooming](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/magnification) and [panning](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/interaction-mode) - * [Text searching](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/text-search) + * [Text search](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/text-search) * Text selection and copy * [Print](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/print) PDF files. * Annotate PDFs with: diff --git a/Document-Processing/PDF/PDF-Viewer/angular/save-pdf-files.md b/Document-Processing/PDF/PDF-Viewer/angular/save-pdf-files.md index ed934b4b1b..6b3200d4a6 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/save-pdf-files.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/save-pdf-files.md @@ -3,7 +3,7 @@ layout: post title: Saving PDF files in Angular PDF Viewer component | Syncfusion description: This page helps you to learn here all about saving PDF files in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Saving PDF files +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -59,7 +59,7 @@ public IActionResult Download([FromBody] Dictionary jsonObject) **Step 3:** Set the PDF Viewer Properties in Angular PDF viewer component -Modify the `serviceUrl` property of the PDF viewer component with the accurate URL of your web service project, replacing `https://localhost:44396/pdfviewer` with the actual URL of your server.Modify the documentPath with the correct PDF Document URL want to load. +Modify the `serviceUrl` property of the PDF viewer component with the accurate URL of your web service project, replacing `https://localhost:44396/pdfviewer` with the actual URL of your server. Modify the `documentPath` with the correct PDF document URL to load. ```typescript import { Component, OnInit } from '@angular/core'; diff --git a/Document-Processing/PDF/PDF-Viewer/angular/server-to-standalone.md b/Document-Processing/PDF/PDF-Viewer/angular/server-to-standalone.md index 88383190da..61e530ec9c 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/server-to-standalone.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/server-to-standalone.md @@ -57,7 +57,7 @@ When you migrate to standalone mode, the processing location for various feature Migrating to standalone mode provides several architectural and operational benefits: **API Compatibility:** -- **No API Breaks:** There are no breaking API changes when migrating from the server-backed PDF Viewer to the standalone PDF Viewer. However, APIs that are specific to server interaction, such as [serviceUrl](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#serviceurl), [serverActionSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#serveractionsettings), [ajaxRequestSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#ajaxrequestssettings), [retryCount](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#retrycount), [retryTimeout](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#retrytimeout), and [retryStatusCodes](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#retrystatuscodes), are not applicable in standalone mode. Apart from these server-dependent APIs, all other APIs remain consistent and are supported in the standalone PDF Viewer. +- **No API Breaks:** There are no breaking API changes when migrating from the server-backed PDF Viewer to the standalone PDF Viewer. However, APIs that are specific to server interaction, such as [serviceUrl](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#serviceurl), [serverActionSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#serveractionsettings), [ajaxRequestSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#ajaxrequestsettings), [retryCount](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#retrycount), [retryTimeout](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#retrytimeout), and [retryStatusCodes](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#retrystatuscodes), are not applicable in standalone mode. Apart from these server-dependent APIs, all other APIs remain consistent and are supported in the standalone PDF Viewer. **Performance and User Experience:** - **Instant Rendering:** PDF operations execute immediately in the browser without server round-trips diff --git a/Document-Processing/PDF/PDF-Viewer/angular/theming-and-styling.md b/Document-Processing/PDF/PDF-Viewer/angular/theming-and-styling.md index cadaf5800c..e9963b3a85 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/theming-and-styling.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/theming-and-styling.md @@ -59,7 +59,7 @@ Dark themes provide a better viewing experience in low-light environments. The A N> Update the viewer container background color when switching to dark theme for visual consistency. -### How-to: Toggle Dark Mode +### Toggle Dark Mode You can dynamically change the theme by swapping the linked stylesheet. diff --git a/Document-Processing/PDF/PDF-Viewer/angular/toolbar.md b/Document-Processing/PDF/PDF-Viewer/angular/toolbar.md index 408f3509c2..5166f0e56c 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/toolbar.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/toolbar.md @@ -3,7 +3,7 @@ layout: post title: Toolbar in Angular PDF Viewer component | Syncfusion description: Learn here all about Toolbar in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more. platform: document-processing -control: Toolbar +control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- @@ -26,6 +26,8 @@ The following table lists built-in toolbar items and their actions: | DownloadOption | Downloads the loaded PDF document. | | UndoRedoTool | Provides undo and redo for annotations. | | AnnotationEditTool | Toggles annotation edit mode. | +| FormDesignerEditTool | Toggles form designer edit mode. | +| SubmitForm | Submits the form data of a loaded PDF. | | CommentTool | Adds sticky notes (comments) to pages. | ## Show or hide the built-in toolbar @@ -101,7 +103,7 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, ```html @@ -182,13 +184,13 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, ```html ``` -## Show/Hide the left toolbar with the thumbnails and bookmarks +## Show or hide the left toolbar with the thumbnails and bookmarks The PDF Viewer can show or hide the left navigation toolbar (thumbnails and bookmarks) using the `enableNavigationToolbar` API. Examples follow. @@ -262,12 +264,12 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService, The PDF Viewer supports customizing toolbar items: add, show, hide, enable, and disable. -* Add: Define new items using the [CustomToolbarItemModel](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/customToolbarItemModel) and include them in the [ToolbarSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/toolbarSettings) property. Handle item clicks with the [toolbarclick](https://ej2.syncfusion.com/angular/documentation/api/toolbar/clickEventArgs) event. +* Add: Define new items using the [CustomToolbarItemModel](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/customToolbarItemModel) and include them in the [ToolbarSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/toolbarSettings) property. Handle item clicks with the [toolbarClick](https://ej2.syncfusion.com/angular/documentation/api/toolbar/clickEventArgs) event. * Show / Hide: Show or hide predefined items through `ToolbarSettings`. See the [ToolbarItem](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/toolbarItem) API for available identifiers. * Enable / Disable: Enable or disable toolbar items using the [enabletoolbaritem](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/toolbar#enabletoolbaritem) API. {% tabs %} -{% highlight html tabtitle="Standalone" %} +{% highlight ts tabtitle="Standalone" %} import { Component, OnInit } from '@angular/core'; import { @@ -349,7 +351,7 @@ export class AppComponent implements OnInit { } {% endhighlight %} -{% highlight html tabtitle="Server-Backed" %} +{% highlight ts tabtitle="Server-Backed" %} import { Component, OnInit } from '@angular/core'; import { @@ -681,10 +683,10 @@ The PDF Viewer exposes APIs so applications can implement a custom toolbar UI. H N> The icons are embedded in the font file used in the previous snippet. -**Step 5:** Add the following code snippet in `app.ts` file for performing a user interaction in PDF Viewer in code behind. +**Step 6:** Add the following code snippet in `app.ts` file for performing a user interaction in PDF Viewer in code behind. {% tabs %} -{% highlight js tabtitle="Standalone" %} +{% highlight ts tabtitle="Standalone" %} @ViewChild('pdfviewer') public pdfviewerControl: PdfViewerComponent; @@ -856,7 +858,7 @@ private readFile(args: any): void { } {% endhighlight %} -{% highlight js tabtitle="Server-Backed" %} +{% highlight ts tabtitle="Server-Backed" %} @ViewChild('pdfviewer') public pdfviewerControl: PdfViewerComponent; diff --git a/Document-Processing/PDF/PDF-Viewer/angular/ui-builder-skill.md b/Document-Processing/PDF/PDF-Viewer/angular/ui-builder-skill.md index 01cec0196f..21ed5844c3 100644 --- a/Document-Processing/PDF/PDF-Viewer/angular/ui-builder-skill.md +++ b/Document-Processing/PDF/PDF-Viewer/angular/ui-builder-skill.md @@ -146,10 +146,10 @@ To start using the skill: **Example Prompts:** {% promptcards %} -{% promptcard Invoice Viewer with Details Panel %} +{% promptcard Resume Review Interface %} Design a resume review interface using the PDF viewer for candidate CVs. Add a right panel with candidate details, ratings, tags, and action buttons (shortlist, reject, schedule interview). Include quick notes functionality. Focus on fast scanning and decision-making UX. {% endpromptcard %} -{% promptcard Course Material Viewer %} +{% promptcard Invoice Viewer with Details Panel %} Design an invoice viewing screen where the PDF viewer is displayed on the left and a structured details panel on the right. The panel should include invoice summary, payment status, client info, and action buttons (mark as paid, download, send reminder). Use card-based sections and soft colors for financial clarity. {% endpromptcard %} {% endpromptcards %} From 8310ff11956d09dd833329db09f9d131531ef686 Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Tue, 28 Jul 2026 10:14:57 +0530 Subject: [PATCH 025/513] 1043288: Updating the md files for angular --- .../angular/paragraph-format.md | 55 +++++++++---------- .../angular/unsupported-features.md | 34 ++++++------ 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/paragraph-format.md b/Document-Processing/Word/Word-Processor/angular/paragraph-format.md index 70f6013e1a..4876ae0b0f 100644 --- a/Document-Processing/Word/Word-Processor/angular/paragraph-format.md +++ b/Document-Processing/Word/Word-Processor/angular/paragraph-format.md @@ -1,14 +1,14 @@ --- layout: post -title: Paragraph format in Angular Document editor component | Syncfusion -description: Learn here all about Paragraph format in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Paragraph format in Angular DOCX Editor component | Syncfusion +description: Learn here all about Paragraph format in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Paragraph format documentation: ug domainurl: ##DomainURL## --- -# Paragraph format in Angular Document editor component +# Paragraph format in Angular Document Editor component [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports various paragraph formatting options such as text alignment, indentation, paragraph spacing, and more. @@ -23,7 +23,7 @@ this.documentEditor.selection.paragraphFormat.rightIndent= 24; ## Special indentation -You can define special indent for first line of the paragraph using the following sample code. +You can define a special indent for the first line of the paragraph using the following sample code. ```typescript this.documentEditor.selection.paragraphFormat.firstLineIndent= 24; @@ -31,7 +31,7 @@ this.documentEditor.selection.paragraphFormat.firstLineIndent= 24; ## Increase indent -You can increase the left indent of selected paragraphs by a factor of 36 points using the following sample code. +You can increase the left indent of selected paragraphs by 36 points using the following sample code. ```typescript this.documentEditor.editor.increaseIndent(); @@ -39,7 +39,7 @@ this.documentEditor.editor.increaseIndent(); ## Decrease indent -You can decrease the left indent of selected paragraphs by a factor of 36 points using the following sample code. +You can decrease the left indent of selected paragraphs by 36 points using the following sample code. ```typescript this.documentEditor.editor.decreaseIndent(); @@ -87,27 +87,11 @@ this.documentEditor.selection.paragraphFormat.spaceBeforeAuto = true; this.documentEditor.selection.paragraphFormat.spaceAfterAuto = true; ``` ->Note: If auto spacing property is enabled, then value defined in the `beforeSpacing` and `afterSpacing` property will not be considered. +N>: If auto spacing property is enabled, then value defined in the `beforeSpacing` and `afterSpacing` property will not be considered. -## Pagination properties +## Paragraph border -You can enable or disable the following pagination properties for the paragraphs in a Word document. - -* Widow/Orphan control - whether the first and last lines of the paragraph are to remain on the same page as the rest of the paragraph when paginating the document. -* Keep with next - whether the specified paragraph remains on the same page as the paragraph that follows it while paginating the document. -* Keep lines together - whether all lines in the specified paragraphs remain on the same page while paginating the document. - -The following example code illustrates how to enable or disable these pagination properties for the selected paragraphs. - -```typescript -this.documenteditor.selection.paragraphFormat.widowControl = false; -this.documenteditor.selection.paragraphFormat.keepWithNext = true; -this.documenteditor.selection.paragraphFormat.keepLinesTogether = true; -``` - -## Paragraph Border - -You can apply borders to the paragraphs in a Word document. Using borders, decorate the paragraphs to set them apart from other paragraphs in the document. +You can apply borders to the paragraphs in a Word document. Using borders, you can decorate the paragraphs to set them apart from other paragraphs in the document. The following example code illustrates how to apply box border for the selected paragraphs. @@ -131,14 +115,29 @@ this.documenteditor.selection.paragraphFormat.borders.top.color = "#000000"; this.documenteditor.selection.paragraphFormat.borders.bottom.lineStyle = 'Single'; this.documenteditor.selection.paragraphFormat.borders.bottom.lineWidth = 3; this.documenteditor.selection.paragraphFormat.borders.bottom.color = "#000000"; - ``` -Note: At present, the Document editor component displays all the border styles as single line. But you can apply any border style and get the proper display in Microsoft Word app when opening the exported Word document. +N> At present, the Document Editor component displays all the border styles as single line. But you can apply any border style and get the proper display in Microsoft Word app when opening the exported Word document. + +## Pagination properties + +You can enable or disable the following pagination properties for the paragraphs in a Word document. + +* Widow/Orphan control - whether the first and last lines of the paragraph are to remain on the same page as the rest of the paragraph when paginating the document. +* Keep with next - whether the specified paragraph remains on the same page as the paragraph that follows it while paginating the document. +* Keep lines together - whether all lines in the specified paragraphs remain on the same page while paginating the document. + +The following example code illustrates how to enable or disable these pagination properties for the selected paragraphs. + +```typescript +this.documenteditor.selection.paragraphFormat.widowControl = false; +this.documenteditor.selection.paragraphFormat.keepWithNext = true; +this.documenteditor.selection.paragraphFormat.keepLinesTogether = true; +``` ## Show or Hide Paragraph marks -You can show or hide the hidden formatting symbols like spaces, tab, paragraph marks, and breaks in Document editor component. These marks help identify the start and end of a paragraph and all the hidden formatting symbols in a Word document. +You can show or hide the hidden formatting symbols like spaces, tab, paragraph marks, and breaks in Document Editor component. These marks indicate the start and end of a paragraph, as well as all the hidden formatting symbols in a Word document. The following example code illustrates how to show or hide paragraph marks. diff --git a/Document-Processing/Word/Word-Processor/angular/unsupported-features.md b/Document-Processing/Word/Word-Processor/angular/unsupported-features.md index 80bf8e6b67..ead9eed013 100644 --- a/Document-Processing/Word/Word-Processor/angular/unsupported-features.md +++ b/Document-Processing/Word/Word-Processor/angular/unsupported-features.md @@ -8,9 +8,9 @@ documentation: ug domainurl: ##DomainURL## --- -# Unsupported Features in Angular DOCX Editor +# Unsupported Features in Angular Document Editor -This section describes the unsupported elements in [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) +This section describes the unsupported elements in [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor). ## Document formatting @@ -19,25 +19,25 @@ This section describes the unsupported elements in [Angular DOCX Editor](https:/ | Paragraph Properties | Shading | No | | | Mirror indent | No | | | Suppress line numbers | No | -| | Don’t hyphenate | No | -| | Border styles (*Except dotted and dashed; other styles are rendered as solid*) | Partial | -| Text Properties | Shading | No | -| | Position | No | -| | Font kerning | No | -| | Ligatures | No | -| | Number spacing | No | -| | Number forms | No | -| | Stylistic sets | No | -| | Contextual alternates| No | +| | Don't hyphenate | No | +| | Border styles (except dotted and dashed; other styles are rendered as solid) | Partial | +| Text Properties | Shading | No | +| | Position | No | +| | Font kerning | No | +| | Ligatures | No | +| | Number spacing | No | +| | Number forms | No | +| | Stylistic sets | No | +| | Contextual alternates | No | | | Text Direction (Top to Bottom, Bottom to Top) | No | -| | Border styles (*Except dotted and dashed; other styles are rendered as solid*) | Partial | +| | Border styles (except dotted and dashed; other styles are rendered as solid) | Partial | | Section Formatting | Mirror margins | No | | | Gutter | No | | | Line numbers | No | | | Bi-direction | No | | Page background | Page background color or image | No | -| Watermark | Text and Picture watermark| No | -| Table Format | Border styles (*Except dotted and dashed; other styles are rendered as solid*) | Partial | +| Watermark | Text and Picture watermark | No | +| Table Format | Border styles (except dotted and dashed; other styles are rendered as solid) | Partial | ## Word Document Elements @@ -49,8 +49,8 @@ This section describes the unsupported elements in [Angular DOCX Editor](https:/ | Ink/Draw | No | | Video or audio files | No | | Macros | No | -| Models, Smart-Art, and Charts | [Supported Charts](https://help.syncfusion.com/document-processing/word/word-processor/angular/chart) | -| Shapes, Textboxes, and WordArt | [Supported shapes](https://help.syncfusion.com/document-processing/word/word-processor/angular/shapes#supported-shapes) *(Shape Properties: Fill types, borders, rotation and effects are not supported) | +| Models, SmartArt, and Charts | [Supported Charts](https://help.syncfusion.com/document-processing/word/word-processor/angular/chart) | +| Shapes, Textboxes, and WordArt | [Supported shapes](https://help.syncfusion.com/document-processing/word/word-processor/angular/shapes#supported-shapes) (Shape Properties: Fill types, borders, rotation, and effects are not supported) | | Signature line | No | | Special Characters, Symbols, Equations | No | | Built-in and custom document properties | No | From f72ef281e601180130d39b76f9971c07427f138a Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Tue, 28 Jul 2026 10:53:20 +0530 Subject: [PATCH 026/513] 1043288: Adding the md files for angular platform --- .../angular/paragraph-format.md | 2 +- .../Word/Word-Processor/angular/view.md | 26 +++++++------- .../angular/web-services-overview.md | 34 +++++++++---------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/paragraph-format.md b/Document-Processing/Word/Word-Processor/angular/paragraph-format.md index 4876ae0b0f..dcf12ca52d 100644 --- a/Document-Processing/Word/Word-Processor/angular/paragraph-format.md +++ b/Document-Processing/Word/Word-Processor/angular/paragraph-format.md @@ -10,7 +10,7 @@ domainurl: ##DomainURL## # Paragraph format in Angular Document Editor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports various paragraph formatting options such as text alignment, indentation, paragraph spacing, and more. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) supports various paragraph formatting options such as text alignment, indentation, paragraph spacing, and more. ## Indentation diff --git a/Document-Processing/Word/Word-Processor/angular/view.md b/Document-Processing/Word/Word-Processor/angular/view.md index 7fbde7e7c4..e5e5e6a3b5 100644 --- a/Document-Processing/Word/Word-Processor/angular/view.md +++ b/Document-Processing/Word/Word-Processor/angular/view.md @@ -1,7 +1,7 @@ --- layout: post -title: View in Angular Document editor component | Syncfusion -description: Learn here all about View in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: View in Angular DOCX Editor component | Syncfusion +description: Learn here all about View in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. control: View platform: document-processing documentation: ug @@ -9,9 +9,9 @@ domainurl: ##DomainURL## --- # View in Angular Document Editor Component -## Web Layout +## Web layout -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) container component allows you to change the view to web layout and print using the [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container#layouttype) property with the supported [`LayoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType). +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) container component allows you to change the view to a web layout or print layout using the [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container#layouttype) property with the supported [`LayoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType). ```typescript /** @@ -37,17 +37,17 @@ export class AppComponent { > The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. ->Note: Default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#layouttype) in DocumentEditorContainer component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType). +N> The default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#layouttype) in the Document Editor Container component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType). ### Online Demo -Explore how to view Word documents in web layout using the Angular Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/web-layout). +Explore how to view Word documents in web layout using the Angular Document Editor in this [live demo](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/web-layout). ## Ruler -Using ruler we can refer to setting specific margins, tab stops, or indentations within a document to ensure consistent formatting in Document Editor. +The ruler helps you set specific margins, tab stops, and indentations within a document to ensure consistent formatting in the Document Editor. -The following example illustrates how to enable ruler in Document Editor +The following example illustrates how to enable the ruler in the Document Editor. {% tabs %} {% highlight ts tabtitle="app.component.ts" %} @@ -63,13 +63,13 @@ The following example illustrates how to enable ruler in Document Editor ### Online Demo -Explore how to use the ruler in the Angular Document Editor for working with Word documents in this live demo [here](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/ruler). +Explore how to use the ruler in the Angular Document Editor for working with Word documents in this [live demo](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/ruler). -## Heading Navigation Pane +## Heading Navigation Pane -Using the heading navigation pane allows users to swiftly navigate documents by heading, enhancing their ability to move through the document efficiently. +The heading navigation pane allows users to quickly navigate documents by heading, making it easier to move through the document. -The following example demonstrates how to enable the heading navigation pane in a document editor. +The following example demonstrates how to enable the heading navigation pane in a Document Editor. ```typescript import { Component, OnInit } from '@angular/core'; @@ -91,4 +91,4 @@ export class AppComponent implements OnInit { ### Online Demo -Explore how to navigate through headings in Word documents using the Angular Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/heading-navigation). +Explore how to navigate through headings in Word documents using the Angular Document Editor in this [live demo](https://document.syncfusion.com/demos/docx-editor/angular/#/tailwind3/document-editor/heading-navigation). diff --git a/Document-Processing/Word/Word-Processor/angular/web-services-overview.md b/Document-Processing/Word/Word-Processor/angular/web-services-overview.md index bc62541b9e..7d2d542978 100644 --- a/Document-Processing/Word/Word-Processor/angular/web-services-overview.md +++ b/Document-Processing/Word/Word-Processor/angular/web-services-overview.md @@ -1,16 +1,16 @@ --- layout: post -title: Web services in Angular Document editor component | Syncfusion -description: Learn here all about Web services in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Web services in Angular DOCX Editor component | Syncfusion +description: Learn here all about Web services in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Web services documentation: ug domainurl: ##DomainURL## --- -# Web services in Angular Document editor component +# Web services in Angular Document Editor component -You can deploy web APIs for server-side dependencies of [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) component in the following platforms. +You can deploy web APIs for the server-side dependencies of the [Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) component on the following platforms. * [ASP.NET Core](./web-services/core) * [ASP.NET MVC](./web-services/mvc) @@ -24,12 +24,12 @@ You can deploy web APIs for server-side dependencies of [Angular DOCX Editor](ht |[Paste with formatting](./clipboard#paste-with-formatting)|When pasting the formatted content (HTML/RTF) received from system clipboard. For converting HTML/RTF to SFDT format.

    **Note**: Whereas plain text received from system clipboard will be pasted directly in the client-side.|**Client**: Sends the input Html or Rtf string.
    **Server**: Receives the input Html or Rtf string and sends the converted SFDT back to the client.| |[Restrict editing](./restrict-editing)|When protecting the document, for generating hash.|**Client**: Sends the input data for hashing algorithm.
    **Server**: Receives the input data for hashing algorithm and sends the result hash information back to the client.| |[Spellcheck](./spell-check)(default)|When the spellchecker is enabled on client-side Document Editor, and it performs the spell check validation for words in the document.|**Client**: Sends the words (string) with their language for spelling validation.
    **Server**: Receives the words (string) with their language for spelling validation and sends the validation result as JSON back to the client.| -|[SpellCheckByPage](./spell-check)|Document editor provides options to spellcheck page by page when loading the documents. By [enabling optimized spell check](./spell-check#enableoptimizedspellcheck) in client-side, you can perform spellcheck page by page when loading the documents.|**Client**: Sends the words (string) with their language for spelling validation.
    **Server**: Receives the words (string) with their language for spelling validation and sends the validation result as JSON back to the client.| +|[SpellCheckByPage](./spell-check)|Document Editor provides options to spellcheck page by page when loading the documents. By [enabling optimized spell check](./spell-check#enableoptimizedspellcheck) in client-side, you can perform spellcheck page by page when loading the documents.|**Client**: Sends the words (string) with their language for spelling validation.
    **Server**: Receives the words (string) with their language for spelling validation and sends the validation result as JSON back to the client.| |[Save as file formats other than SFDT and DOCX](./saving-documents/server-side-export) (optional API)|You can configure this API, if you want to save the document in file format other than DOCX and SFDT.

    For saving the files as WordML, DOC, RTF, HTML, ODT, Text using Word library (DocIO) and PDF using Word (DocIO) and PDF libraries.|You can transfer document from client to server either as SFDT or DOCX format.

    First option (SFDT):
    **Client**: Sends the SFDT.
    **Server**: Receives the SFDT and saves the converted document as any file format supported by [Word library (DocIO)](https://www.syncfusion.com/word-framework/net/word-library) in server or sends the saved file to the client browser.

    Second option (DOCX):
    **Client**: Sends the DOCX file.
    **Server**: Receives the DOCX file and saves the converted document as any file format supported by [Word library (DocIO)](https://www.syncfusion.com/word-framework/net/word-library) in server or sends the saved file to the client browser.| ->Note: If you don't require the above functionalities then you can deploy as pure client-side component without any server-side interactions. +N> If you don't require the above functionalities, you can deploy the component as a pure client-side solution without any server-side interactions. -Please refer the [example from GitHub](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) to configure the web service and set the [serviceUrl](https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/). +Please refer to the [example from GitHub](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) to configure the web service and set the [serviceUrl](https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/). If your running web service Url is `http://localhost:62869/`, set the serviceUrl like below: @@ -39,7 +39,7 @@ this.container.serviceUrl = "http://localhost:62869/api/documenteditor/"; ## Required Web API structure -Please check below table for expected web API structure. +Please check the table below for the expected web API structure. |Expected method name |Parameters |Return type | |-----|----|----| @@ -47,14 +47,14 @@ Please check below table for expected web API structure. |SystemClipboard|CustomerParameter: content(type string either rtf or html) and type(either .rtf or .html) |json(sfdt format) | |RestrictEditing |Parameter of type CustomRestrictParameter
    public class CustomRestrictParameter
    {
    public string passwordBase64 { get; set; }
    public string saltBase64 { get; set; }
    public int spinCount { get; set; }
    } |result hash information | |SpellCheck(default) |Parameter: SpellCheckJsonData
    public class SpellCheckJsonData
    {
    public int LanguageID { get; set; }
    public string TexttoCheck { get; set; }
    public bool CheckSpelling { get; set; }
    public bool CheckSuggestion { get; set; }
    public bool AddWord { get; set; }
    } |Json type of Spellcheck containing details of spell checked word | -|SpellCheckByPage |Parameter: SpellCheckJsonData
    public class SpellCheckJsonData
    {
    public int LanguageID { get; set; }
    public string TexttoCheck { get; set; }
    public bool CheckSpelling { get; set; }
    public bool CheckSuggestion { get; set; }
    public bool AddWord { get; set; }
    } |Json type of Spellcheck containing details of spell checked word

    **Note**: Document editor provides options to spellcheck page by page when loading the documents. By [enabling optimized spell check](./spell-check#enableoptimizedspellcheck) in client-side, you can perform spellcheck page by page when loading the documents. | +|SpellCheckByPage |Parameter: SpellCheckJsonData
    public class SpellCheckJsonData
    {
    public int LanguageID { get; set; }
    public string TexttoCheck { get; set; }
    public bool CheckSpelling { get; set; }
    public bool CheckSuggestion { get; set; }
    public bool AddWord { get; set; }
    } |Json type of Spellcheck containing details of spell checked word

    **Note**: Document Editor provides options to spellcheck page by page when loading the documents. By [enabling optimized spell check](./spell-check#enableoptimizedspellcheck) in client-side, you can perform spellcheck page by page when loading the documents. | |Save(optional API) |parameter: SaveParameter
    public class SaveParameter
    {
    public string Content { get; set; }
    public string FileName { get; set; }
    } |void(Save the file as file stream) | |ExportSFDT(optional API) |parameter: SaveParameter
    public class SaveParameter
    {
    public string Content { get; set; }
    public string FileName { get; set; }
    } |FileStreamResult (to save the document in client-side) | |Export(optional API) |Files(IFormCollection) |FileStreamResult (to save the document in client-side) | ## Customize the expected method name -Document editor component provides an option to customize the expected method name for Import, SystemClipboard, RestrictEditing and SpellCheck using [serverActionSettings](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/documentEditorContainerModel#serveractionsettings). +Document Editor component provides an option to customize the expected method name for Import, SystemClipboard, RestrictEditing and SpellCheck using [serverActionSettings](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/documentEditorContainerModel#serveractionsettings). The following example code illustrates how to customize the method name using serverActionSettings. @@ -78,9 +78,9 @@ export class AppComponent { ``` -## Add the custom headers to XMLHttpRequest +## Add custom headers to XMLHttpRequest -Document editor component provides an an option to add custom headers of XMLHttpRequest using the [`headers`](https://help.syncfusion.com/document-processing/word/word-processor/angular/header-footer). +Document Editor component provides an option to add custom headers to the XMLHttpRequest using the [`headers`](https://help.syncfusion.com/document-processing/word/word-processor/angular/header-footer). ```typescript @@ -102,9 +102,9 @@ export class AppComponent { ``` -## Modify the XMLHttpRequest before request send +## Modify the XMLHttpRequest before sending the request -Document editor component provides an option to modify the XMLHttpRequest object (setting additional headers, if needed) using [`beforeXmlHttpRequestSend`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container#beforexmlhttprequestsend) event and it gets triggered before a server request. +Document Editor component provides an option to modify the XMLHttpRequest object (setting additional headers, if needed) using the [`beforeXmlHttpRequestSend`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container#beforexmlhttprequestsend) event, which gets triggered before a server request. You can customize the required [`XMLHttpRequest`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/xmlHttpRequestEventArgs) properties. @@ -117,9 +117,9 @@ let container: DocumentEditorContainer = new DocumentEditorContainer({ enableToolbar: true, height: '590px', }); -// Below action, cancel all server-side interactions expect spell check +// Below action, cancel all server-side interactions except spell check container.beforeXmlHttpRequestSend = (args: XmlHttpRequestEventArgs): void => { - //Here, modifying the request headers + //Modifying the request headers here args.headers = [{ syncfusion: 'true' }]; args.withCredentials = true; switch (args.serverActionType) { @@ -134,4 +134,4 @@ container.appendTo('#container'); ``` -Note: Find the customizable serverActionType values are `'Import' | 'RestrictEditing' | 'SpellCheck' | 'SystemClipboard'`. \ No newline at end of file +N> The customizable serverActionType values are `'Import' | 'RestrictEditing' | 'SpellCheck' | 'SystemClipboard'`. \ No newline at end of file From 92a87a726ffd995791d3b224aeab16c8bd60b956 Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Tue, 28 Jul 2026 11:21:30 +0530 Subject: [PATCH 027/513] 1043289-changed document-view,cursor-color,highlight,color-picker --- .../angular/how-to/change-document-view.md | 36 +++++++++---------- ...nge-the-cursor-color-in-document-editor.md | 12 +++---- ...ange-the-default-search-highlight-color.md | 12 +++---- .../angular/how-to/customize-color-picker.md | 12 +++---- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/change-document-view.md b/Document-Processing/Word/Word-Processor/angular/how-to/change-document-view.md index 4469383e07..b38d76dd5c 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/change-document-view.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/change-document-view.md @@ -1,18 +1,18 @@ --- layout: post -title: Change document view in Angular Document editor component | Syncfusion -description: Learn here all about Change document view in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Change document view in Angular DOCX Editor component | Syncfusion +description: Learn here all about Change document view in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Change document view documentation: ug domainurl: ##DomainURL## --- -# Change document view in Angular Document editor component +# Change document view in Angular Document Editor component -## How to change the document view in DocumentEditor component +## How to change the document view in the DocumentEditor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) allows you to change the view to web layout and print using the [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#layouttype) property with the supported [`LayoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) allows you to change the view to web layout or print layout using the [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#layouttype) property with the supported [`LayoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). ```typescript import { Component, ViewChild, ViewEncapsulation } from '@angular/core'; @@ -27,12 +27,12 @@ import { @Component({ selector: 'app-root', - template: ` + template: ` `, encapsulation: ViewEncapsulation.None, providers: [PrintService, SfdtExportService, WordExportService, TextExportService, SelectionService, SearchService, EditorService, @@ -52,13 +52,13 @@ export class AppComponent { } ``` -> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. +N> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. ->Note: Default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#layouttype) in DocumentEditor component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). +N> Default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#layouttype) in the DocumentEditor component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). -## How to change the document view in DocumentEditorContainer component +## How to change the document view in the DocumentEditorContainer component -DocumentEditorContainer component allows you to change the view to web layout and print using the [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#layouttype) property with the supported [`LayoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). +The DocumentEditorContainer component allows you to change the view to web layout or print layout using the [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#layouttype) property with the supported [`LayoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). ```typescript /** @@ -66,7 +66,7 @@ DocumentEditorContainer component allows you to change the view to web layout an */ @Component({ selector: 'app-root', - templateUrl: '', + template: '', encapsulation: ViewEncapsulation.None, providers: [ToolbarService] }) @@ -82,6 +82,6 @@ export class AppComponent { } ``` -> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. +N> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. ->Note: Default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#layouttype) in DocumentEditorContainer component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). \ No newline at end of file +N> Default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#layouttype) in the DocumentEditorContainer component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/). \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/change-the-cursor-color-in-document-editor.md b/Document-Processing/Word/Word-Processor/angular/how-to/change-the-cursor-color-in-document-editor.md index 59a856ce19..27d4d5292b 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/change-the-cursor-color-in-document-editor.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/change-the-cursor-color-in-document-editor.md @@ -1,22 +1,22 @@ --- layout: post -title: Change the cursor color in document editor in Angular Document editor component | Syncfusion -description: Learn here all about Change the cursor color in document editor in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Change Cursor Color in Angular DOCX Editor | Syncfusion +description: Learn here all about Change the cursor color in Document Editor in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Change the cursor color in document editor documentation: ug domainurl: ##DomainURL## --- -# Change the cursor color in document editor in Angular Document editor component +# Change the cursor color in the Angular Document Editor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) default cursor color is black. The user can change the color by overriding the css property using class name. The Document editor cursor css have a class named `e-de-blink-cursor`. +The default cursor color of the [Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) is black. The user can change the color by overriding the CSS property using the class name. The Document Editor cursor CSS has a class named `e-de-blink-cursor`. -Please refer the below code snippet to change the cursor color to red. +Please refer to the below code snippet to change the cursor color to red. ```css .e-de-blink-cursor { -border-left: 1px solid red!important; +border-left: 1px solid red !important; } ``` diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/change-the-default-search-highlight-color.md b/Document-Processing/Word/Word-Processor/angular/how-to/change-the-default-search-highlight-color.md index feda025589..b6ea902ffe 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/change-the-default-search-highlight-color.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/change-the-default-search-highlight-color.md @@ -1,7 +1,7 @@ --- layout: post -title: Change Search Highlight Color in Angular Document Editor | Syncfusion -description: Learn here all about Change the default search highlight color in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Change Search Highlight Color in Angular DOCX Editor | Syncfusion +description: Learn here all about Change the default search highlight color in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Change the default search highlight color documentation: ug @@ -10,9 +10,9 @@ domainurl: ##DomainURL## # Change Search Highlight Color in Angular Document Editor -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) provides an options to change the default search highlight color using [`searchHighlightColor`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/documentEditorSettingsModel/#searchhighlightcolor) in Document editor settings. The highlight color which is given in [`documentEditorSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#documenteditorsettings) will be highlighted on the searched text. By default, search highlight color is `yellow`. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) provides an option to change the default search highlight color using [`searchHighlightColor`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/documentEditorSettingsModel/#searchhighlightcolor) in Document Editor settings. The color specified for `searchHighlightColor` within [`documentEditorSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor-container/#documenteditorsettings) is used to highlight the searched text. By default, the search highlight color is `yellow`. -Similarly, you can use [`documentEditorSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#documenteditorsettings) property for DocumentEditor also. +Similarly, you can use the [`documentEditorSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#documenteditorsettings) property for the DocumentEditor also. The following example code illustrates how to change the default search highlight color. @@ -40,7 +40,7 @@ import { DocumentEditorContainerModule } from '@syncfusion/ej2-angular-documente export class AppComponent implements OnInit { @ViewChild('documenteditor_default') public container?: DocumentEditorContainerComponent; - // Add required color to change the default search highlight color + // Specify the desired color to change the default search highlight color public searchHighlightColor = { searchHighlightColor: 'Grey' }; ngOnInit(): void {} } @@ -48,6 +48,6 @@ export class AppComponent implements OnInit { > The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. -Output will be like below: +The output will look like the following: ![How to change the default search highlight color](../images/search-color.png) \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/angular/how-to/customize-color-picker.md b/Document-Processing/Word/Word-Processor/angular/how-to/customize-color-picker.md index f2fa55ca7a..d1089cd619 100644 --- a/Document-Processing/Word/Word-Processor/angular/how-to/customize-color-picker.md +++ b/Document-Processing/Word/Word-Processor/angular/how-to/customize-color-picker.md @@ -1,7 +1,7 @@ --- layout: post -title: Customize color picker in Angular Document editor | Syncfusion -description: Learn here all about Customize color picker in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Customize color picker in Angular DOCX editor | Syncfusion +description: Learn here all about Customize color picker in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Customize color picker documentation: ug @@ -10,11 +10,11 @@ domainurl: ##DomainURL## # Customize color picker in Angular Document editor component -[Angular DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) provides an options to customize the color picker using [`colorPickerSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/documentEditorSettingsModel#colorpickersettings)in the document editor settings. The color picker offers customization options for default appearance, by allowing selection between Picker or Palette mode, for font and border colors. +[Angular Document Editor](https://www.syncfusion.com/docx-editor-sdk/angular-docx-editor) (Document Editor) provides options to customize the color picker using [`colorPickerSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/documentEditorSettingsModel#colorpickersettings) in Document Editor settings. The color picker allows customization of its default appearance by selecting between Picker and Palette modes for font and border colors. -Similarly, you can use [`documentEditorSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor) property for DocumentEditor also. +Similarly, you can also use the [`documentEditorSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor) property for the standalone DocumentEditor. -The following example code illustrates how to customize the color picker in the document editor container. +The following example code illustrates how to customize the color picker in the Document Editor container. ```typescript @@ -63,7 +63,7 @@ export class AppComponent implements OnInit { | showButtons | It is used to show / hide the control buttons (apply / cancel) of ColorPicker component. Defaults to true | ->**Note**: According to the Word document specifications, it is not possible to modify the **`Predefined Highlight colors`**. This limitation means that the range of highlight colors provided by default cannot be customized or expanded upon by the user to suit individual preferences. Consequently, users must work within the confines of the existing color palette, as no functionality currently exists to modify or personalize these predefined highlighting options. +N> According to the Word document specifications, it is not possible to modify the **`Predefined Highlight colors`**. This limitation means that the range of highlight colors provided by default cannot be customized or expanded upon by the user to suit individual preferences. Consequently, users must work within the confines of the existing color palette, as no functionality currently exists to modify or personalize these predefined highlighting options. ## Online Demo From 27115ee9d5da7232d322b4ce955b02e10675d54a Mon Sep 17 00:00:00 2001 From: Seenivasaperumal Nachiyappan Date: Tue, 28 Jul 2026 12:35:39 +0530 Subject: [PATCH 028/513] 1043288: corrected md files in the Angular --- .../angular/web-services/core.md | 62 +++++++------- .../angular/web-services/java.md | 82 +++++++++---------- .../angular/web-services/mvc.md | 52 ++++++------ 3 files changed, 98 insertions(+), 98 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/angular/web-services/core.md b/Document-Processing/Word/Word-Processor/angular/web-services/core.md index a9b921381d..f0cd8c345b 100644 --- a/Document-Processing/Word/Word-Processor/angular/web-services/core.md +++ b/Document-Processing/Word/Word-Processor/angular/web-services/core.md @@ -1,16 +1,16 @@ --- layout: post -title: Core in Angular Document editor component | Syncfusion -description: Learn here all about Core in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Core in the Angular DOCX Editor component | Syncfusion +description: Learn here all about Core in the Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Core documentation: ug domainurl: ##DomainURL## --- -# Core in Angular Document editor component +# Core in the Angular Document Editor component -DocumentEditor depends on server side interaction for below listed operations can be written in ASP.NET Core using [Syncfusion.EJ2.WordEditor.AspNet.Core](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Core). +DocumentEditor depends on server-side interactions for the operations listed below, which can be written in ASP.NET Core using [Syncfusion.EJ2.WordEditor.AspNet.Core](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Core). * Import Word Document * Paste with formatting @@ -18,15 +18,15 @@ DocumentEditor depends on server side interaction for below listed operations ca * Spell Check * Save as file formats other than SFDT and DOCX ->Note: Syncfusion® provides a predefined [Word Processor server docker image](https://hub.docker.com/r/syncfusion/word-processor-server) targeting ASP.NET Core 2.1 framework. You can directly pull this docker image and deploy it in server on the go. You can also create own docker image by customizing the existing [docker project from GitHub](https://github.com/SyncfusionExamples/Word-Processor-Server-Docker). To know more, refer this link.[Word Processor Server Docker Image Overview](../server-deployment/word-processor-server-docker-image-overview) +N> Syncfusion® provides a predefined [Word Processor server docker image](https://hub.docker.com/r/syncfusion/word-processor-server) targeting ASP.NET Core 2.1 framework. You can directly pull this docker image and deploy it on a server on the go. You can also create your own docker image by customizing the existing [docker project from GitHub](https://github.com/SyncfusionExamples/Word-Processor-Server-Docker). To know more, refer to this link: [Word Processor Server Docker Image Overview](../server-deployment/word-processor-server-docker-image-overview) This section explains how to create the service for DocumentEditor in ASP.NET Core. -## Importing Word Document +## Importing Word documents -As the Document editor client-side script requires the document in SFDT file format, you can convert the Word documents (.dotx,.docx,.docm,.dot,.doc), rich text format documents (.rtf), and text documents (.txt) into SFDT format by using this Web API. +As the Document Editor client-side script requires the document in SFDT file format, you can convert the Word documents (.dotx,.docx,.docm,.dot,.doc), rich text format documents (.rtf), and text documents (.txt) into SFDT format by using this Web API. -The following example code illustrates how to write a Web API for importing Word documents into Document Editor component. +The following example code illustrates how to write a Web API for importing Word documents into the Document Editor component. ```csharp [AcceptVerbs("Post")] @@ -52,13 +52,13 @@ The following example code illustrates how to write a Web API for importing Word } ``` -### Import document with TIFF, EMF and WMF images +### Import a document with TIFF, EMF, and WMF images -The web browsers do not support to display metafile images like EMF and WMF and also TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to raster image using any image converter in the `MetafileImageParsed` event and this fallback raster image will be displayed in the client-side Document editor component. +Web browsers do not support displaying metafile images like EMF and WMF, or TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to a raster image using any image converter in the `MetafileImageParsed` event, and this fallback raster image will be displayed in the client-side Document Editor component. ->Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `MetafileStream` property and you can get the `IsMetafile` boolean value to determine whether the image is meta file images(WMF,EMF) or TIFF format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using `Bitmiracle https://www.nuget.org/packages/BitMiracle.LibTiff.NET`. +N> In the `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using the `MetafileStream` property, and you can get the `IsMetafile` boolean value to determine whether the image is a metafile image (WMF, EMF) or a TIFF format image. In the example below, the TIFF is converted to a raster image in the `ConvertTiffToRasterImage()` method using [BitMiracle.LibTiff.NET](https://www.nuget.org/packages/BitMiracle.LibTiff.NET). -The following example code illustrates how to use `MetafileImageParsed` event for creating fallback raster image for metafile present in a Word document. +The following example code illustrates how to use the `MetafileImageParsed` event for creating a fallback raster image for a metafile present in a Word document. ```c# using SkiaSharp; @@ -216,9 +216,9 @@ The following example code illustrates how to write a Web API for paste with for ## Restrict editing -This Web API generates hash from the specified password and salt value which is required for restrict editing functionality of Document Editor component. +This Web API generates a hash from the specified password and salt value which is required for the restrict editing functionality of the Document Editor component. -The following example code illustrates how to write a Web API for restrict editing. +The following example code illustrates how to write a Web API to restrict editing. ```csharp [AcceptVerbs("Post")] @@ -243,11 +243,11 @@ The following example code illustrates how to write a Web API for restrict editi ## Spell Check -Document Editor supports performing spell checking for any input text. You can perform spell checking for the text in Document Editor and it will provide suggestions for the mis-spelled words through dialog and in context menu. Document editor client-side script requires this Web API to show error words and list suggestions in context menu. This Web API returns the json type of spell-checked word which contains details about error words if any and suggestions. +Document Editor supports spell checking for input text. It identifies misspelled words and provides suggestions through a dialog and the context menu. The Document Editor client-side script requires this Web API to display error words and suggestions. This Web API returns a JSON response containing details about misspelled words and their suggestions. To know more about configure spell check, please check this [link](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). -In startup.cs file, you can configure the spell check files like below: +In the `Startup.cs` file, you can configure the spell check files as shown below: ```csharp public Startup(IConfiguration configuration, IHostingEnvironment env) @@ -283,13 +283,13 @@ In startup.cs file, you can configure the spell check files like below: } ``` -Document editor provides options to spell check word by word and spellcheck page by page when loading the documents. +Document Editor provides options to spell check word by word and spellcheck page by page when loading the documents. ### Spell check word by word -This Web API performs the spell check word by word and return the json which contains information about error words and suggestions if any. By default, spell check word by word is performed in Document editor when enabling spell check in client-side. +This Web API performs spell checking word by word and returns a JSON response containing information about error words and suggestions, if any. By default, word-by-word spell checking is performed in the Document Editor when spell check is enabled on the client side. -The following example code illustrates how to write a Web API for spell check word by word. +The following example code illustrates how to write a Web API for word-by-word spell checking. ```csharp [AcceptVerbs("Post")] @@ -322,9 +322,9 @@ The following example code illustrates how to write a Web API for spell check wo ### Spell check page by page -This Web API performs the spell check page by page and return the json which contains information about error words and suggestions if any. By [enabling optimized spell check](../spell-check#enableoptimizedspellcheck) in client-side, you can perform spellcheck page by page when loading the documents. +This Web API performs spell checking page by page and returns a JSON response containing information about error words and suggestions, if any. By [enabling optimized spell check](../spell-check#enableoptimizedspellcheck) on the client side, you can perform page-by-page spell checking when loading documents. -The following example code illustrates how to write a Web API for spell check page by page. +The following example code illustrates how to write a Web API for page-by-page spell checking. ```csharp [AcceptVerbs("Post")] @@ -357,13 +357,13 @@ The following example code illustrates how to write a Web API for spell check pa ## Save as file formats other than SFDT and DOCX -You can configure this API, if you want to save the document in file format other than DOCX and SFDT using server-side. You can save the document in following ways: +You can configure this API if you want to save the document in a file format other than DOCX and SFDT on the server side. You can save the document in the following ways: -### Save the document in database or file server +### Save the document in a database or file server -This Web API saves the document in the server machine. You can customize this API to save the document into databases or file servers. +This Web API saves the document on the server. You can customize this API to save the document into databases or file servers. -The following example code illustrates how to write a Web API for save document in server-side. +The following example code illustrates how to write a Web API to save a document on the server side. ```csharp [AcceptVerbs("Post")] @@ -379,7 +379,7 @@ The following example code illustrates how to write a Web API for save document name = "Document1.doc"; } WDocument document = WordDocument.Save(data.Content); - // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. + // Saves the document to the server file system. You can customize this to save into databases or file servers based on your requirements. FileStream fileStream = new FileStream(name, FileMode.OpenOrCreate, FileAccess.ReadWrite); document.Save(fileStream, GetWFormatType(format)); document.Close(); @@ -395,9 +395,9 @@ The following example code illustrates how to write a Web API for save document ### Save as other file formats by passing SFDT string -This Web API converts the SFDT string to required format and returns the document as FileStreamResult to client-side. Using this API, you can save the document in file format other than SFDT and DOCX and download the document in client browser. +This Web API converts the SFDT string to the required format and returns the document as a FileStreamResult to the client side. Using this API, you can save the document in a file format other than SFDT and DOCX and download the document in the client browser. -The following example code illustrates how to write a Web API for export sfdt. +The following example code illustrates how to write a Web API to export SFDT. ```csharp [AcceptVerbs("Post")] @@ -467,9 +467,9 @@ The following example code illustrates how to write a Web API for export sfdt. ### Save as other file formats by passing DOCX file -This Web API converts the DOCX document to required format and returns the document as FileStreamResult to client-side. Using this API, you can save the document in file format other than SFDT and DOCX and download the document in client browser. +This Web API converts the DOCX document to the required format and returns the document as a FileStreamResult to the client side. Using this API, you can save the document in a file format other than SFDT and DOCX and download the document in the client browser. -The following example code illustrates how to write a Web API for export. +The following example code illustrates how to write a Web API to export. ```csharp [AcceptVerbs("Post")] @@ -513,4 +513,4 @@ The following example code illustrates how to write a Web API for export. } ``` ->Note: Please refer the [ASP.NET Core Web API sample](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). \ No newline at end of file +N> Please refer to the [ASP.NET Core Web API sample](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/angular/web-services/java.md b/Document-Processing/Word/Word-Processor/angular/web-services/java.md index 8c0c9d29e0..914f89813f 100644 --- a/Document-Processing/Word/Word-Processor/angular/web-services/java.md +++ b/Document-Processing/Word/Word-Processor/angular/web-services/java.md @@ -1,16 +1,16 @@ --- layout: post -title: Java in Angular Document editor component | Syncfusion -description: Learn here all about Java in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Java in Angular DOCX Editor component | Syncfusion +description: Learn here all about Java in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Java documentation: ug domainurl: ##DomainURL## --- -# Java in Angular Document editor component +# Java in Angular Document Editor component -This page illustrates how to create web service in Java for the server-side dependent functionalities of Word Processor component a.k.a. Document Editor. Document Editor depends on server side interaction for below listed operations and it can be written in Java using `syncfusion-ej2-wordprocessor.jar` file. +This page illustrates how to create a web service in Java for the server-side dependencies of the Word Processor component (a.k.a. Document Editor). Document Editor depends on server-side interactions for the operations listed below, which can be written in Java using the `syncfusion-ej2-wordprocessor.jar` file. * Import Word Document * Paste with formatting @@ -20,9 +20,9 @@ This page illustrates how to create web service in Java for the server-side depe ## Supported Java versions -Java library supports Java SE 8.0(1.8) or above versions. +Syncfusion® Java library supports Java SE 8.0 (1.8) or above. -## External Jars Required +## External jars required The following jar files are required to be referenced in your Java application. @@ -32,11 +32,11 @@ The following jar files are required to be referenced in your Java application. ## Download JAR file -The JAR file is available in both [Syncfusion® Essential-JS2](https://www.syncfusion.com/downloads/essential-js2) build and maven repository. +The JAR file is available in both the [Syncfusion® Essential-JS2](https://www.syncfusion.com/downloads/essential-js2) build and the Maven repository. ### Get JAR file from Syncfusion® build -You can get the `syncfusion-ej2-wordprocessor.jar` and its dependent jar files from Syncfusion® build installed location. +You can get the `syncfusion-ej2-wordprocessor.jar` and its dependent jar files from the Syncfusion® build installed location. **Syntax:** > Jar file: `(installed location)/Syncfusion/Essential Studio/{Platform}/{version}/JarFiles/syncfusion-ej2-wordprocessor-{version}.jar` @@ -44,7 +44,7 @@ You can get the `syncfusion-ej2-wordprocessor.jar` and its dependent jar files f **Example:** > Jar file: `C:/Program Files (x86)/Syncfusion/Essential Studio/Angular - EJ2/18.4.0.30/JarFiles/syncfusion-ej2-wordprocessor-18.4.0.30.jar` -You can also get the jar files by installing [file formats controls](https://www.syncfusion.com/sales/products/fileformats?utm_source=ug&utm_medium=listing&utm_campaign=java-word-processor#). You can find the required jars in the build installed location. +You can also get the jar files by installing [file format controls](https://www.syncfusion.com/sales/products/fileformats?utm_source=ug&utm_medium=listing&utm_campaign=java-word-processor#). You can find the required jars in the build installed location. **Syntax:** > Jar file: `(installed location)/Syncfusion/Essential Studio/{Platform}/{version}/JarFiles/syncfusion-ej2-wordprocessor-{version}.jar` @@ -52,15 +52,15 @@ You can also get the jar files by installing [file formats controls](https://www **Example:** > Jar file: `C:/Program Files (x86)/Syncfusion/Essential Studio/FileFormats/18.4.0.30/JarFiles/syncfusion-ej2-wordprocessor-18.4.0.30.jar` -### Referring JAR from Syncfusion® Maven Repository +### Refer to the JAR from the Syncfusion® Maven Repository -You can download the jars from the Syncfusion® [maven repository](https://jars.syncfusion.com/) to use our artifacts in your projects. It helps to use the Syncfusion® Java packages without installing Essential Studio® or platform installation to development with Syncfusion® controls. +You can download the jars from the Syncfusion® [Maven repository](https://jars.syncfusion.com/) to use our artifacts in your projects. It helps you use the Syncfusion® Java packages without installing Essential Studio® or platform installation for development with Syncfusion® controls. #### Download Syncfusion® Java packages -You can easily download the Syncfusion® packages for Java via maven repository. Follow the below guidelines to configure as per the tool. +You can easily download the Syncfusion® packages for Java via the Maven repository. Follow the guidelines below to configure as per the tool. -#### Refer the maven repository in build tool +#### Refer to the Maven repository in the build tool ##### Gradle @@ -83,7 +83,7 @@ You can easily download the Syncfusion® pac ``` -#### Refer the Syncfusion® package in your project as the dependency +#### Refer to the Syncfusion® package in your project as a dependency ##### Gradle @@ -105,13 +105,13 @@ You can easily download the Syncfusion® pac This section explains how to create the Java web service for DocumentEditor. -## Importing Word Document +## Importing Word documents -As the Document editor client-side script requires the document in SFDT file format, you can convert the Word documents (.dotx,.docx,.docm), rich text format documents (.rtf), and text documents (.txt) into SFDT format by using this Web API. +As the Document Editor client-side script requires the document in SFDT file format, you can convert the Word documents (.dotx,.docx,.docm), rich text format documents (.rtf), and text documents (.txt) into SFDT format by using this Web API. -Note: Document editor Java library doesn’t have support for the **DOC format** Word document. As the DOC format is an older file format, we are concentrating on latest DOCX specific features and it will be more helpful in future if you use DOCX format to utilize some more features from Document editor. So, we recommend you to use the DOCX file format instead of DOC file format, to achieve your requirement. +N> The Document Editor Java library does not support the **DOC format** Word document. As the DOC format is an older file format, we recommend using the DOCX file format to take advantage of the latest features. -The following example code illustrates how to write a Web API for importing Word documents into Document Editor component. +The following example code illustrates how to write a Web API for importing Word documents into the Document Editor component. ```java @CrossOrigin(origins = "*", allowedHeaders = "*") @@ -126,13 +126,13 @@ The following example code illustrates how to write a Web API for importing Word } ``` -### Import document with TIFF, EMF and WMF images +### Import a document with TIFF, EMF, and WMF images -The web browsers do not support to display metafile images like EMF and WMF and also TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to raster image using any image converter in the `MetafileImageParsed` event and this fallback raster image will be displayed in the client-side Document editor component. +Web browsers do not support displaying metafile images like EMF and WMF, or TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to a raster image using any image converter in the `MetafileImageParsed` event, and this fallback raster image will be displayed in the client-side Document Editor component. ->Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or TIFF format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. +N> In the `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using the `getMetafileStream()` property, and you can get the `getIsMetafile()` boolean value to determine whether the image is a metafile image (WMF, EMF) or a TIFF format image. In the example below, the TIFF is converted to a raster image in the `ConvertTiffToRasterImage()` method using the TwelveMonkeys ImageIO TIFF library. -The following example code illustrates how to use `MetafileImageParsed` event for creating fallback raster image for metafile present in a Word document. +The following example code illustrates how to use the `MetafileImageParsed` event for creating a fallback raster image for a metafile present in a Word document. ```java import com.syncfusion.javahelper.system.collections.generic.*; @@ -207,7 +207,7 @@ import com.twelvemonkeys.imageio.plugins.tiff.TIFFImageReaderSpi; } private static StreamSupport ConvertTiffToRasterImage(StreamSupport ImageStream) throws Exception { - InputStream inputStream = StreamSupport.toStream(args.getMetafileStream()); + InputStream inputStream = StreamSupport.toStream(ImageStream); // Use ByteArrayOutputStream to collect data into a byte array ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); @@ -323,9 +323,9 @@ The following example code illustrates how to write a Web API for paste with for ## Restrict editing -This Web API generates hash from the specified password and salt value which is required for restrict editing functionality of Document Editor component. +This Web API generates a hash from the specified password and salt value which is required for the restrict editing functionality of the Document Editor component. -The following example code illustrates how to write a Web API for restrict editing. +The following example code illustrates how to write a Web API to restrict editing. ```java @CrossOrigin(origins = "*", allowedHeaders = "*") @@ -370,11 +370,11 @@ The following example code illustrates how to write a Web API for restrict editi ## Spell Check -Document Editor supports performing spell checking for any input text. You can perform spell checking for the text in Document Editor and it will provide suggestions for the mis-spelled words through dialog and in context menu. Document editor client-side script requires this Web API to show error words and list suggestions in context menu. This Web API returns the json type of spell-checked word which contains details about error words if any and suggestions. +Document Editor supports performing spell checking for any input text. You can perform spell checking for the text in Document Editor and it will provide suggestions for the misspelled words through a dialog and the context menu. The Document Editor client-side script requires this Web API to display error words and list suggestions in the context menu. This Web API returns a JSON response containing details about the spell-checked words, including error words and suggestions if any. -To know more about configure spell check, please check this [link](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). +To know more about configuring spell check, please check this [link](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). -In controller file, you can configure the spell check files like below: +In the controller file, you can configure the spell check files as below: ```java List spellDictionary; @@ -401,11 +401,11 @@ In controller file, you can configure the spell check files like below: } ``` -Document editor provides options to spell check word by word and spellcheck page by page when loading the documents. +Document Editor provides options to spell check word by word and spell check page by page when loading documents. ### Spell check word by word -This Web API performs the spell check word by word and return the json which contains information about error words and suggestions if any. By default, spell check word by word is performed in Document editor when enabling spell check in client-side. +This Web API performs the spell check word by word and returns the JSON which contains information about error words and suggestions if any. By default, spell check word by word is performed in the Document Editor when spell check is enabled on the client side. The following example code illustrates how to write a Web API for spell check word by word. @@ -441,7 +441,7 @@ The following example code illustrates how to write a Web API for spell check wo ### Spell check page by page -This Web API performs the spell check page by page and return the json which contains information about error words and suggestions if any. By [enabling optimized spell check](../spell-check#enableoptimizedspellcheck) in client-side, you can perform spellcheck page by page when loading the documents. +This Web API performs the spell check page by page and returns the JSON which contains information about error words and suggestions if any. By [enabling optimized spell check](../spell-check#enableoptimizedspellcheck) on the client side, you can perform spell check page by page when loading documents. The following example code illustrates how to write a Web API for spell check page by page. @@ -477,13 +477,13 @@ The following example code illustrates how to write a Web API for spell check pa ## Save as file formats other than SFDT and DOCX -You can configure this API, if you want to save the document in file format other than DOCX and SFDT using server-side. You can save the document in following ways: +You can configure this API if you want to save the document in a file format other than DOCX and SFDT on the server side. You can save the document in the following ways: -### Save the document in database or file server +### Save the document in a database or file server -This Web API saves the document in the server machine. You can customize this API to save the document into databases or file servers. +This Web API saves the document on the server. You can customize this API to save the document into databases or file servers. -The following example code illustrates how to write a Web API for save document in server-side. +The following example code illustrates how to write a Web API to save a document on the server side. ```csharp @CrossOrigin(origins = "*", allowedHeaders = "*") @@ -496,7 +496,7 @@ The following example code illustrates how to write a Web API for save document name = "Document1.docx"; } WordDocument document = WordProcessorHelper.save(data.getContent()); - // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. + // Saves the document to the server file system. You can customize this to save into databases or file servers based on your requirements. FileOutputStream fileStream = new FileOutputStream(name); document.save(fileStream, getWFormatType(format)); fileStream.close(); @@ -557,9 +557,9 @@ The following example code illustrates how to write a Web API for save document ### Save as other file formats by passing SFDT string -This Web API converts the SFDT string to required format and returns the document as FileStreamResult to client-side. Using this API, you can save the document in file format other than SFDT and DOCX and download the document in client browser. +This Web API converts the SFDT string to the required format and returns the document as a FileStreamResult to the client side. Using this API, you can save the document in a file format other than SFDT and DOCX and download the document in the client browser. -The following example code illustrates how to write a Web API for export sfdt. +The following example code illustrates how to write a Web API to export SFDT. ```csharp @CrossOrigin(origins = "*", allowedHeaders = "*") @@ -631,9 +631,9 @@ The following example code illustrates how to write a Web API for export sfdt. ### Save as other file formats by passing DOCX file -This Web API converts the DOCX document to required format and returns the document as FileStreamResult to client-side. Using this API, you can save the document in file format other than SFDT and DOCX and download the document in client browser. +This Web API converts the DOCX document to the required format and returns the document as a FileStreamResult to the client side. Using this API, you can save the document in a file format other than SFDT and DOCX and download the document in the client browser. -The following example code illustrates how to write a Web API for export. +The following example code illustrates how to write a Web API to export. ```csharp @CrossOrigin(origins = "*", allowedHeaders = "*") @@ -680,4 +680,4 @@ The following example code illustrates how to write a Web API for export. } ``` ->Note: Please refer the [Java Web API example from GitHub](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). \ No newline at end of file +N> Please refer to the [Java Web API example from GitHub](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). \ No newline at end of file diff --git a/Document-Processing/Word/Word-Processor/angular/web-services/mvc.md b/Document-Processing/Word/Word-Processor/angular/web-services/mvc.md index 1decda18e8..3564dc187f 100644 --- a/Document-Processing/Word/Word-Processor/angular/web-services/mvc.md +++ b/Document-Processing/Word/Word-Processor/angular/web-services/mvc.md @@ -1,16 +1,16 @@ --- layout: post -title: Mvc in Angular Document editor component | Syncfusion -description: Learn here all about Mvc in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more. +title: Mvc in Angular DOCX Editor component | Syncfusion +description: Learn here all about Mvc in Syncfusion Angular Document Editor component of Syncfusion Essential JS 2 and more. platform: document-processing control: Mvc documentation: ug domainurl: ##DomainURL## --- -# MVC in Angular Document editor component +# MVC in Angular Document Editor component -DocumentEditor depends on server side interaction for below listed operations can be written in ASP.NET MVC using [Syncfusion.EJ2.WordEditor.AspNet.Mvc5](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc5) or [Syncfusion.EJ2.WordEditor.AspNet.Mvc4](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc4). +DocumentEditor depends on server-side interactions for the operations listed below, which can be written in ASP.NET MVC using [Syncfusion.EJ2.WordEditor.AspNet.Mvc5](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc5) or [Syncfusion.EJ2.WordEditor.AspNet.Mvc4](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc4). * Import Word Document * Paste with formatting @@ -20,11 +20,11 @@ DocumentEditor depends on server side interaction for below listed operations ca This section explains how to create the service for DocumentEditor in ASP.NET MVC. -## Importing Word Document +## Importing Word documents -As the Document editor client-side script requires the document in SFDT file format, you can convert the Word documents (.dotx,.docx,.docm,.dot,.doc), rich text format documents (.rtf), and text documents (.txt) into SFDT format by using this Web API. +As the Document Editor client-side script requires the document in SFDT file format, you can convert the Word documents (.dotx,.docx,.docm,.dot,.doc), rich text format documents (.rtf), and text documents (.txt) into SFDT format by using this Web API. -The following example code illustrates how to write a Web API for importing Word documents into Document Editor component. +The following example code illustrates how to write a Web API for importing Word documents into the Document Editor component. ```csharp [HttpPost] @@ -88,9 +88,9 @@ The following example code illustrates how to write a Web API for paste with for ## Restrict editing -This Web API generates hash from the specified password and salt value which is required for restrict editing functionality of Document Editor component. +This Web API generates a hash from the specified password and salt value which is required for the restrict editing functionality of the Document Editor component. -The following example code illustrates how to write a Web API for restrict editing. +The following example code illustrates how to write a Web API to restrict editing. ```csharp [HttpPost] @@ -114,11 +114,11 @@ The following example code illustrates how to write a Web API for restrict editi ## Spell Check -Document Editor supports performing spell checking for any input text. You can perform spell checking for the text in Document Editor and it will provide suggestions for the mis-spelled words through dialog and in context menu. Document editor client-side script requires this Web API to show error words and list suggestions in context menu. This Web API returns the json type of spell-checked word which contains details about error words if any and suggestions. +Document Editor supports performing spell checking for any input text. You can perform spell checking for the text in Document Editor and it will provide suggestions for the misspelled words through a dialog and the context menu. The Document Editor client-side script requires this Web API to display error words and list suggestions in the context menu. This Web API returns a JSON response containing details about the spell-checked words, including error words and suggestions if any. -To know more about configure spell check, please check this [link](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). +To know more about configuring spell check, please check this [link](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). -In `Global.asax.cs` file, you can configure the spell check files like below: +In the `Global.asax.cs` file, you can configure the spell check files as below: ```csharp internal static List spellDictCollection; @@ -130,7 +130,7 @@ In `Global.asax.cs` file, you can configure the spell check files like below: //check the spell check dictionary path environment variable value and assign default data folder //if it is null. string path = HostingEnvironment.MapPath("//App_Data//"); - //Set the default spellcheck.json file if the json filename is empty. + //Set the default spellcheck.json file if the JSON filename is empty. string jsonFileName = HostingEnvironment.MapPath("//App_Data//spellcheck.json"); if (System.IO.File.Exists(jsonFileName)) { @@ -147,11 +147,11 @@ In `Global.asax.cs` file, you can configure the spell check files like below: } ``` -Document editor provides options to spell check word by word and spellcheck page by page when loading the documents. +Document Editor provides options to spell check word by word and spell check page by page when loading documents. ### Spell check word by word -This Web API performs the spell check word by word and return the json which contains information about error words and suggestions if any. By default, spell check word by word is performed in Document editor when enabling spell check in client-side. +This Web API performs the spell check word by word and returns the JSON which contains information about error words and suggestions if any. By default, spell check word by word is performed in the Document Editor when spell check is enabled on the client side. The following example code illustrates how to write a Web API for spell check word by word. @@ -186,7 +186,7 @@ The following example code illustrates how to write a Web API for spell check wo ### Spell check page by page -This Web API performs the spell check page by page and return the json which contains information about error words and suggestions if any. By [enabling optimized spell check](../spell-check#enableoptimizedspellcheck) in client-side, you can perform spellcheck page by page when loading the documents. +This Web API performs the spell check page by page and returns the JSON which contains information about error words and suggestions if any. By [enabling optimized spell check](../spell-check#enableoptimizedspellcheck) on the client side, you can perform spell check page by page when loading documents. The following example code illustrates how to write a Web API for spell check page by page. @@ -221,13 +221,13 @@ The following example code illustrates how to write a Web API for spell check pa ## Save as file formats other than SFDT and DOCX -You can configure this API, if you want to save the document in file format other than DOCX and SFDT using server-side. You can save the document in following ways: +You can configure this API if you want to save the document in a file format other than DOCX and SFDT on the server side. You can save the document in the following ways: -### Save the document in database or file server +### Save the document in a database or file server -This Web API saves the document in the server machine. You can customize this API to save the document into databases or file servers. +This Web API saves the document on the server. You can customize this API to save the document into databases or file servers. -The following example code illustrates how to write a Web API for save document in server-side. +The following example code illustrates how to write a Web API to save a document on the server side. ```csharp [HttpPost] @@ -242,7 +242,7 @@ The following example code illustrates how to write a Web API for save document name = "Document1.doc"; } WDocument document = WordDocument.Save(data.Content); - // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. + // Saves the document to the server file system. You can customize this to save into databases or file servers based on your requirements. FileStream fileStream = new FileStream(name, FileMode.OpenOrCreate, FileAccess.ReadWrite); document.Save(fileStream, GetWFormatType(format)); document.Close(); @@ -258,9 +258,9 @@ The following example code illustrates how to write a Web API for save document ### Save as other file formats by passing SFDT string -This Web API converts the SFDT string to required format and returns the document as FileStreamResult to client-side. Using this API, you can save the document in file format other than SFDT and DOCX and download the document in client browser. +This Web API converts the SFDT string to the required format and returns the document as a FileStreamResult to the client side. Using this API, you can save the document in a file format other than SFDT and DOCX and download the document in the client browser. -The following example code illustrates how to write a Web API for export sfdt. +The following example code illustrates how to write a Web API to export SFDT. ```csharp [HttpPost] @@ -329,9 +329,9 @@ The following example code illustrates how to write a Web API for export sfdt. ### Save as other file formats by passing DOCX file -This Web API converts the DOCX document to required format and returns the document as FileStreamResult to client-side. Using this API, you can save the document in file format other than SFDT and DOCX and download the document in client browser. +This Web API converts the DOCX document to the required format and returns the document as a FileStreamResult to the client side. Using this API, you can save the document in a file format other than SFDT and DOCX and download the document in the client browser. -The following example code illustrates how to write a Web API for export. +The following example code illustrates how to write a Web API to export. ```csharp [HttpPost] @@ -374,4 +374,4 @@ The following example code illustrates how to write a Web API for export. } ``` ->Note: Please refer the [ASP.NET MVC Web API sample](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). \ No newline at end of file +N> Please refer to the [ASP.NET MVC Web API sample](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices). \ No newline at end of file From 5f36c7a51acf9783692c2aea77baf95264cd567a Mon Sep 17 00:00:00 2001 From: Dhanush Sugumaran Date: Tue, 28 Jul 2026 14:53:42 +0530 Subject: [PATCH 029/513] Task(1043919): Revamped the UG documentation for the Annotation samples in the Vue PDF Viewer platform --- .../annotation/annotation-comment-filter.md | 12 ++- .../vue/annotation/annotation-event.md | 4 +- .../annotation/annotations-in-mobile-view.md | 3 +- .../PDF/PDF-Viewer/vue/annotation/comments.md | 4 +- .../vue/annotation/free-text-annotation.md | 8 +- .../vue/annotation/ink-annotation.md | 6 +- .../PDF-Viewer/vue/annotation/ink-eraser.md | 2 +- .../vue/annotation/line-angle-constraints.md | 4 +- .../vue/annotation/measurement-annotation.md | 82 +++++++++---------- .../vue/annotation/shape-annotation.md | 2 +- .../vue/annotation/signature-annotation.md | 8 +- .../vue/annotation/stamp-annotation.md | 16 ++-- .../vue/annotation/sticky-notes-annotation.md | 18 ++-- .../vue/annotation/text-markup-annotation.md | 38 ++++----- 14 files changed, 102 insertions(+), 105 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-comment-filter.md b/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-comment-filter.md index bb18c764a8..6513d3854e 100644 --- a/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-comment-filter.md +++ b/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-comment-filter.md @@ -63,7 +63,7 @@ Follow these steps to filter annotations by their type and status: 1. Click the **filter icon** in the comments panel toolbar 2. In the **Annotation Type** dropdown, select the annotation types you want to view (e.g., Highlight, Underline) -3. In the **Status** dropdown, select the status you want to filter by (e.g., Accepted, Rejected, Pending) +3. In the **Status** dropdown, select the status you want to filter by (e.g., Accepted, Rejected) 4. Click **APPLY** to see only annotations matching your criteria 5. Use the **CLEAR** button to reset all filters @@ -177,12 +177,10 @@ export default { // includereplies: true, applyToDocument: true }); - } - }, - - handleClearFilter() { - if (viewerRef.current) { - viewerRef.current.annotation.applyCommentFilter(null); + }, + clearFilter() { + const pdfViewer = this.$refs.pdfViewer.ej2Instances; + pdfViewer.annotation.applyCommentFilter(null); } }, provide: { diff --git a/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-event.md b/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-event.md index e1ddf0e701..ac3d060567 100644 --- a/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-event.md +++ b/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotation-event.md @@ -2,7 +2,7 @@ layout: post title: Annotation Events in Vue PDF Viewer control | Syncfusion description: Learn here all about Annotation Events in Syncfusion Vue PDF Viewer component of Syncfusion Essential JS 2 and more. -control: Annotation Events +control: PDF Viewer platform: document-processing documentation: ug domainurl: ##DomainURL## @@ -33,7 +33,7 @@ The annotation events supported by the PDF Viewer control are: | [resizeSignature](#resizesignature) | Triggers when a signature is resized. | | [signaturePropertiesChange](#signaturepropertieschange) | Triggers when signature properties change. | | [signatureSelect](#signatureselect) | Triggers when a signature is selected. | -| [signatureUnselect](#signatureunselect) | Triggers when a signature is unselected. | | +| [signatureUnselect](#signatureunselect) | Triggers when a signature is unselected. | ### annotationAdd diff --git a/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotations-in-mobile-view.md b/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotations-in-mobile-view.md index cac0c5d9f9..5f578835fa 100644 --- a/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotations-in-mobile-view.md +++ b/Document-Processing/PDF/PDF-Viewer/vue/annotation/annotations-in-mobile-view.md @@ -7,6 +7,7 @@ control: PDF Viewer documentation: ug domainurl: ##DomainURL## --- + # Annotations in mobile view in Vue PDF Viewer control This article describes how to use annotation tools in the Syncfusion Vue PDF Viewer on touch-enabled (mobile) devices. It covers enabling the annotation toolbar, adding common annotation types, adjusting annotation properties, using comments, and removing annotations. @@ -49,7 +50,7 @@ This article describes how to use annotation tools in the Syncfusion Vue PDF Vie **Step 2:** Choose a shape or measurement type, then draw the annotation on the page using touch gestures. -![Select measurement type](../images/open-radius.png) +![Select radius measurement type](../images/open-radius.png) **Step 3:** The shape or measurement annotation is added to the PDF and can be adjusted via its property toolbar. diff --git a/Document-Processing/PDF/PDF-Viewer/vue/annotation/comments.md b/Document-Processing/PDF/PDF-Viewer/vue/annotation/comments.md index aad161cf08..55b6d48de9 100644 --- a/Document-Processing/PDF/PDF-Viewer/vue/annotation/comments.md +++ b/Document-Processing/PDF/PDF-Viewer/vue/annotation/comments.md @@ -2,7 +2,7 @@ layout: post title: Comments in Vue PDF Viewer component | Syncfusion description: Learn about comments, replies, and status in the Syncfusion Vue PDF Viewer component of Syncfusion Essential JS 2 and more. -control: Comments +control: PDF Viewer platform: document-processing documentation: ug domainurl: ##DomainURL## @@ -105,7 +105,7 @@ Edit comments and replies in the following ways: * Click More options in the comment or reply container. * Select Delete from the context menu. -![CommentDelete](../images/commentsdelete.png) +![Delete a comment from the comment panel](../images/commentsdelete.png) N> Deleting the root comment from the comment panel also deletes the associated annotation. diff --git a/Document-Processing/PDF/PDF-Viewer/vue/annotation/free-text-annotation.md b/Document-Processing/PDF/PDF-Viewer/vue/annotation/free-text-annotation.md index bb51d3ef14..be3740f1c8 100644 --- a/Document-Processing/PDF/PDF-Viewer/vue/annotation/free-text-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/vue/annotation/free-text-annotation.md @@ -2,7 +2,7 @@ layout: post title: Free text annotation in Vue PDF viewer component | Syncfusion description: Learn about free text annotations in the Syncfusion Vue PDF Viewer (Essential JS 2): add, edit, delete, and default settings. -control: Free text annotation +control: PDF Viewer platform: document-processing documentation: ug domainurl: ##DomainURL## @@ -627,7 +627,7 @@ Select a color from the Font Color palette to change the font color. Use the Text Align tool to set the annotation text alignment. -![FreeTextAnnotation](../images/textalign.png) +![Set free text alignment](../images/textalign.png) ### Font styles @@ -694,7 +694,7 @@ provide('PdfViewer', [Toolbar, Magnification, Navigation, LinkAnnotation, Bookma {% endhighlight %} -{% highlight html tabtitle="Optiions API (Standalone)" %} +{% highlight html tabtitle="Options API (Standalone)" %}
  • Data Source

    Examples

    Sample