From e3108572ee311c5a19b4356bfec21e0d44a0b4d6 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 20 Jan 2025 14:07:38 +0300 Subject: [PATCH 01/61] Added desc --- .../Working with Node.cs | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs index f0bb7553a..18a9e0c8f 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs @@ -8,48 +8,45 @@ namespace DocsExamples.Programming_with_Documents internal class WorkingWithNode : DocsExamplesBase { [Test] - public void UseNodeType() + public void GetNodeType() { - //ExStart:UseNodeType + //ExStart:GetNodeType + //GistDesc:Aspose.Words Document Object Model (DOM) using C# Document doc = new Document(); - NodeType type = doc.NodeType; - //ExEnd:UseNodeType + //ExEnd:GetNodeType } [Test] public void GetParentNode() { - //ExStart:GetParentNode + //ExStart:GetParentNode + //GistDesc:Aspose.Words Document Object Model (DOM) using C# Document doc = new Document(); - // The section is the first child node of the document. Node section = doc.FirstChild; // The section's parent node is the document. Console.WriteLine("Section parent is the document: " + (doc == section.ParentNode)); - //ExEnd:GetParentNode + //ExEnd:GetParentNode } [Test] public void OwnerDocument() { //ExStart:OwnerDocument + //GistDesc:Aspose.Words Document Object Model (DOM) using C# Document doc = new Document(); // Creating a new node of any type requires a document passed into the constructor. Paragraph para = new Paragraph(doc); - // The new paragraph node does not yet have a parent. Console.WriteLine("Paragraph has no parent node: " + (para.ParentNode == null)); - // But the paragraph node knows its document. Console.WriteLine("Both nodes' documents are the same: " + (para.Document == doc)); - // The fact that a node always belongs to a document allows us to access and modify // properties that reference the document-wide data, such as styles or lists. para.ParagraphFormat.StyleName = "Heading 1"; - // Now add the paragraph to the main text of the first section. doc.FirstSection.Body.AppendChild(para); @@ -61,7 +58,8 @@ public void OwnerDocument() [Test] public void EnumerateChildNodes() { - //ExStart:EnumerateChildNodes + //ExStart:EnumerateChildNodes + //GistDesc:Aspose.Words Document Object Model (DOM) using C# Document doc = new Document(); Paragraph paragraph = (Paragraph) doc.GetChild(NodeType.Paragraph, 0, true); @@ -80,10 +78,10 @@ public void EnumerateChildNodes() [Test] //ExStart:RecurseAllNodes + //GistDesc:Aspose.Words Document Object Model (DOM) using C# public void RecurseAllNodes() { Document doc = new Document(MyDir + "Paragraphs.docx"); - // Invoke the recursive function that will walk the tree. TraverseAllNodes(doc); } @@ -110,19 +108,17 @@ public void TraverseAllNodes(CompositeNode parentNode) public void TypedAccess() { //ExStart:TypedAccess + //GistDesc:Aspose.Words Document Object Model (DOM) using C# Document doc = new Document(); Section section = doc.FirstSection; Body body = section.Body; - // Quick typed access to all Table child nodes contained in the Body. TableCollection tables = body.Tables; - foreach (Table table in tables) { // Quick typed access to the first row of the table. table.FirstRow?.Remove(); - // Quick typed access to the last row of the table. table.LastRow?.Remove(); } From 208d2cd5fc9b69774574a509fc15928ad265ba1e Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 20 Jan 2025 16:12:43 +0300 Subject: [PATCH 02/61] Updated "aspose-words-document-object-model" --- Examples/DocsExamples/Docker/Docker.csproj | 2 +- .../DocsExamples/DocsExamples/DocsExamples.csproj | 8 ++++---- .../Working with Node.cs | 15 +++++++-------- .../DocumentExplorer/DocumentExplorer.csproj | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Examples/DocsExamples/Docker/Docker.csproj b/Examples/DocsExamples/Docker/Docker.csproj index b16a432a2..ac853cf01 100644 --- a/Examples/DocsExamples/Docker/Docker.csproj +++ b/Examples/DocsExamples/Docker/Docker.csproj @@ -6,7 +6,7 @@ - + diff --git a/Examples/DocsExamples/DocsExamples/DocsExamples.csproj b/Examples/DocsExamples/DocsExamples/DocsExamples.csproj index 68b60251a..62829d479 100644 --- a/Examples/DocsExamples/DocsExamples/DocsExamples.csproj +++ b/Examples/DocsExamples/DocsExamples/DocsExamples.csproj @@ -116,10 +116,10 @@ - - - - + + + + diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs index 18a9e0c8f..556418345 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Node.cs @@ -11,7 +11,7 @@ internal class WorkingWithNode : DocsExamplesBase public void GetNodeType() { //ExStart:GetNodeType - //GistDesc:Aspose.Words Document Object Model (DOM) using C# + //GistId:3e9d92093b2f5995f984791bfc10c944 Document doc = new Document(); NodeType type = doc.NodeType; //ExEnd:GetNodeType @@ -21,11 +21,10 @@ public void GetNodeType() public void GetParentNode() { //ExStart:GetParentNode - //GistDesc:Aspose.Words Document Object Model (DOM) using C# + //GistId:3e9d92093b2f5995f984791bfc10c944 Document doc = new Document(); // The section is the first child node of the document. Node section = doc.FirstChild; - // The section's parent node is the document. Console.WriteLine("Section parent is the document: " + (doc == section.ParentNode)); //ExEnd:GetParentNode @@ -35,7 +34,7 @@ public void GetParentNode() public void OwnerDocument() { //ExStart:OwnerDocument - //GistDesc:Aspose.Words Document Object Model (DOM) using C# + //GistId:3e9d92093b2f5995f984791bfc10c944 Document doc = new Document(); // Creating a new node of any type requires a document passed into the constructor. @@ -49,7 +48,7 @@ public void OwnerDocument() para.ParagraphFormat.StyleName = "Heading 1"; // Now add the paragraph to the main text of the first section. doc.FirstSection.Body.AppendChild(para); - + // The paragraph node is now a child of the Body node. Console.WriteLine("Paragraph has a parent node: " + (para.ParentNode != null)); //ExEnd:OwnerDocument @@ -59,7 +58,7 @@ public void OwnerDocument() public void EnumerateChildNodes() { //ExStart:EnumerateChildNodes - //GistDesc:Aspose.Words Document Object Model (DOM) using C# + //GistId:3e9d92093b2f5995f984791bfc10c944 Document doc = new Document(); Paragraph paragraph = (Paragraph) doc.GetChild(NodeType.Paragraph, 0, true); @@ -78,7 +77,7 @@ public void EnumerateChildNodes() [Test] //ExStart:RecurseAllNodes - //GistDesc:Aspose.Words Document Object Model (DOM) using C# + //GistId:3e9d92093b2f5995f984791bfc10c944 public void RecurseAllNodes() { Document doc = new Document(MyDir + "Paragraphs.docx"); @@ -108,7 +107,7 @@ public void TraverseAllNodes(CompositeNode parentNode) public void TypedAccess() { //ExStart:TypedAccess - //GistDesc:Aspose.Words Document Object Model (DOM) using C# + //GistId:3e9d92093b2f5995f984791bfc10c944 Document doc = new Document(); Section section = doc.FirstSection; diff --git a/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj b/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj index eb8fc886b..299db9e17 100644 --- a/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj +++ b/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj @@ -141,7 +141,7 @@ - 24.10.0 + 25.1.0 From 46a601e1b504fe8099ad4087b24865c20bcfc148 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 20 Jan 2025 17:26:29 +0300 Subject: [PATCH 03/61] Updated "Translate Markdown to DOM" --- .../Working with Markdown.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs index 8d923f62f..cb3b2fd0a 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs @@ -11,6 +11,7 @@ internal class WorkingWithMarkdown : DocsExamplesBase public void BoldText() { //ExStart:BoldText + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -24,6 +25,7 @@ public void BoldText() public void ItalicText() { //ExStart:ItalicText + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -37,6 +39,7 @@ public void ItalicText() public void Strikethrough() { //ExStart:Strikethrough + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -70,6 +73,7 @@ public void InlineCode() public void Autolink() { //ExStart:Autolink + //GistDesc:Translate Markdown to DOM using C# // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -83,6 +87,7 @@ public void Autolink() public void Link() { //ExStart:Link + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -95,6 +100,7 @@ public void Link() public void Image() { //ExStart:Image + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -108,6 +114,7 @@ public void Image() public void HorizontalRule() { //ExStart:HorizontalRule + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -120,6 +127,7 @@ public void HorizontalRule() public void Heading() { //ExStart:Heading + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -137,6 +145,7 @@ public void Heading() public void SetextHeading() { //ExStart:SetextHeading + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -174,6 +183,7 @@ public void SetextHeading() public void IndentedCode() { //ExStart:IndentedCode + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -187,6 +197,7 @@ public void IndentedCode() public void FencedCode() { //ExStart:FencedCode + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -204,6 +215,7 @@ public void FencedCode() public void Quote() { //ExStart:Quote + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -223,6 +235,7 @@ public void Quote() public void BulletedList() { //ExStart:BulletedList + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); @@ -243,6 +256,7 @@ public void BulletedList() public void OrderedList() { //ExStart:OrderedList + //GistId:0697355b7f872839932388d269ed6a63 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -262,6 +276,7 @@ public void OrderedList() public void Table() { //ExStart:Table + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); From 9bc120b92b2272ec16dbb5e495dfb430ff2fc6ae Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 12:10:43 +0300 Subject: [PATCH 04/61] Updated "Document Builder Overview" --- .../Add content using DocumentBuilder.cs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs index 3b60cbb09..a82a6dba7 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs @@ -29,9 +29,9 @@ public void CreateNewDocument() } [Test] - public void DocumentBuilderInsertBookmark() + public void InsertBookmark() { - //ExStart:DocumentBuilderInsertBookmark + //ExStart:InsertBookmark Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -39,14 +39,14 @@ public void DocumentBuilderInsertBookmark() builder.Writeln("This is just a fine bookmark."); builder.EndBookmark("FineBookmark"); - doc.Save(ArtifactsDir + "AddContentUsingDocumentBuilder.DocumentBuilderInsertBookmark.docx"); - //ExEnd:DocumentBuilderInsertBookmark + doc.Save(ArtifactsDir + "AddContentUsingDocumentBuilder.InsertBookmark.docx"); + //ExEnd:InsertBookmark } [Test] public void BuildTable() { - //ExStart:BuildTable + //ExStart:BuildTable Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -298,6 +298,7 @@ public void InsertFloatingImage() public void InsertParagraph() { //ExStart:InsertParagraph + //GistId:ecf2c438314e6c8318ca9833c7f62326 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -444,7 +445,7 @@ public void MoveToDocumentStartEnd() // Move the cursor position to the end of your document. builder.MoveToDocumentEnd(); Console.WriteLine("\nThis is the end of the document."); - //ExEnd:MoveToDocumentStartEnd + //ExEnd:MoveToDocumentStartEnd } [Test] @@ -515,7 +516,7 @@ public void MoveToParagraph() builder.MoveToParagraph(2, 0); builder.Writeln("This is the 3rd paragraph."); - //ExEnd:MoveToParagraph + //ExEnd:MoveToParagraph } [Test] @@ -532,19 +533,20 @@ public void MoveToTableCell() Assert.AreEqual(table.Rows[2].Cells[3], builder.CurrentNode.ParentNode.ParentNode); Assert.AreEqual("Cell contents added by DocumentBuilderCell 3 contents\a", table.Rows[2].Cells[3].GetText().Trim()); - //ExEnd:MoveToTableCell + //ExEnd:MoveToTableCell } [Test] public void MoveToBookmarkEnd() { //ExStart:MoveToBookmarkEnd + //GistId:ecf2c438314e6c8318ca9833c7f62326 Document doc = new Document(MyDir + "Bookmarks.docx"); DocumentBuilder builder = new DocumentBuilder(doc); builder.MoveToBookmark("MyBookmark1", false, true); builder.Writeln("This is a bookmark."); - //ExEnd:MoveToBookmarkEnd + //ExEnd:MoveToBookmarkEnd } [Test] @@ -568,7 +570,7 @@ public void MoveToMergeField() // we will need to move it to a field's FieldStart or FieldSeparator node using the DocumentBuilder.MoveTo() method. Assert.AreEqual(field.End, builder.CurrentNode.PreviousSibling); builder.Write(" Text immediately after the field."); - //ExEnd:MoveToMergeField + //ExEnd:MoveToMergeField } } } \ No newline at end of file From 73ab97e329584218ab1cef7f62e1e71152600b4a Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 12:28:32 +0300 Subject: [PATCH 05/61] Updated "Navigation with Cursor" --- .../Add content using DocumentBuilder.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs index a82a6dba7..ee79d7575 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs @@ -397,7 +397,9 @@ public void CursorPosition() public void MoveToNode() { //ExStart:MoveToNode + //GistId:1a2c340d1a9dde6fe70c2733084d9aab //ExStart:MoveToBookmark + //GistId:1a2c340d1a9dde6fe70c2733084d9aab Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -435,6 +437,7 @@ public void MoveToNode() public void MoveToDocumentStartEnd() { //ExStart:MoveToDocumentStartEnd + //GistId:1a2c340d1a9dde6fe70c2733084d9aab Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -452,6 +455,7 @@ public void MoveToDocumentStartEnd() public void MoveToSection() { //ExStart:MoveToSection + //GistId:1a2c340d1a9dde6fe70c2733084d9aab Document doc = new Document(); doc.AppendChild(new Section(doc)); @@ -475,13 +479,14 @@ public void MoveToSection() Assert.AreEqual(2, paragraphs.IndexOf(builder.CurrentParagraph)); builder.Writeln("This is a new third paragraph. "); Assert.AreEqual(3, paragraphs.IndexOf(builder.CurrentParagraph)); - //ExEnd:MoveToSection + //ExEnd:MoveToSection } [Test] public void MoveToHeadersFooters() { //ExStart:MoveToHeadersFooters + //GistId:1a2c340d1a9dde6fe70c2733084d9aab Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -523,6 +528,7 @@ public void MoveToParagraph() public void MoveToTableCell() { //ExStart:MoveToTableCell + //GistId:1a2c340d1a9dde6fe70c2733084d9aab Document doc = new Document(MyDir + "Tables.docx"); DocumentBuilder builder = new DocumentBuilder(doc); @@ -553,6 +559,7 @@ public void MoveToBookmarkEnd() public void MoveToMergeField() { //ExStart:MoveToMergeField + //GistId:1a2c340d1a9dde6fe70c2733084d9aab Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -571,6 +578,6 @@ public void MoveToMergeField() Assert.AreEqual(field.End, builder.CurrentNode.PreviousSibling); builder.Write(" Text immediately after the field."); //ExEnd:MoveToMergeField - } + } } } \ No newline at end of file From a90a3d600dcb44061f63c3b16ece36123d63dda5 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 12:44:11 +0300 Subject: [PATCH 06/61] Updated "Work with document properties" --- .../Working with document properties.cs | 26 ++++++++++++------- .../Working with Markdown.cs | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs index a74c1e113..f2eef533a 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs @@ -12,6 +12,7 @@ internal class DocumentPropertiesAndVariables : DocsExamplesBase public void GetVariables() { //ExStart:GetVariables + //GistId:0593a8803015363f3026f648332e7026 Document doc = new Document(MyDir + "Document.docx"); string variables = ""; @@ -28,15 +29,16 @@ public void GetVariables() variables = variables + "Name: " + name + "," + "Value: {1}" + value; } } - //ExEnd:GetVariables Console.WriteLine("\nDocument have following variables " + variables); + //ExEnd:GetVariables } [Test] public void EnumerateProperties() { - //ExStart:EnumerateProperties + //ExStart:EnumerateProperties + //GistId:0593a8803015363f3026f648332e7026 Document doc = new Document(MyDir + "Properties.docx"); Console.WriteLine("1. Document name: {0}", doc.OriginalFileName); @@ -53,9 +55,10 @@ public void EnumerateProperties() } [Test] - public void AddCustomDocumentProperties() + public void AddCustomProperties() { - //ExStart:AddCustomDocumentProperties + //ExStart:AddCustomProperties + //GistId:0593a8803015363f3026f648332e7026 Document doc = new Document(MyDir + "Properties.docx"); CustomDocumentProperties customDocumentProperties = doc.CustomDocumentProperties; @@ -67,22 +70,24 @@ public void AddCustomDocumentProperties() customDocumentProperties.Add("Authorized Date", DateTime.Today); customDocumentProperties.Add("Authorized Revision", doc.BuiltInDocumentProperties.RevisionNumber); customDocumentProperties.Add("Authorized Amount", 123.45); - //ExEnd:AddCustomDocumentProperties + //ExEnd:AddCustomProperties } [Test] - public void RemoveCustomDocumentProperties() + public void RemoveCustomProperties() { - //ExStart:CustomRemove + //ExStart:RemoveCustomProperties + //GistId:0593a8803015363f3026f648332e7026 Document doc = new Document(MyDir + "Properties.docx"); doc.CustomDocumentProperties.Remove("Authorized Date"); - //ExEnd:CustomRemove + //ExEnd:RemoveCustomProperties } [Test] public void RemovePersonalInformation() { - //ExStart:RemovePersonalInformation + //ExStart:RemovePersonalInformation + //GistId:0593a8803015363f3026f648332e7026 Document doc = new Document(MyDir + "Properties.docx") { RemovePersonalInformation = true }; doc.Save(ArtifactsDir + "DocumentPropertiesAndVariables.RemovePersonalInformation.docx"); @@ -92,7 +97,8 @@ public void RemovePersonalInformation() [Test] public void ConfiguringLinkToContent() { - //ExStart:ConfiguringLinkToContent + //ExStart:ConfiguringLinkToContent + //GistId:0593a8803015363f3026f648332e7026 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs index cb3b2fd0a..7394a9353 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs @@ -73,7 +73,7 @@ public void InlineCode() public void Autolink() { //ExStart:Autolink - //GistDesc:Translate Markdown to DOM using C# + //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. DocumentBuilder builder = new DocumentBuilder(); From 6151505bead065bb55ef2a30d5926f6198342ca9 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 12:51:19 +0300 Subject: [PATCH 07/61] Updated "Convert between units" --- .../Working with Document/Working with document properties.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs index f2eef533a..6c31a7d4e 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs @@ -124,6 +124,7 @@ public void ConfiguringLinkToContent() public void ConvertBetweenMeasurementUnits() { //ExStart:ConvertBetweenMeasurementUnits + //GistId:f266e937d2c656f9441071e9a7b053c1 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); From 409a69c3c8b07630f9443bf91ad689bb1fdaded0 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 12:58:44 +0300 Subject: [PATCH 08/61] Updated "Clean Up a Document" --- .../Working with document options and settings.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs index 52466e902..3871dce88 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs @@ -37,7 +37,8 @@ public void ShowGrammaticalAndSpellingErrors() [Test] public void CleanupUnusedStylesAndLists() { - //ExStart:CleanupUnusedStylesandLists + //ExStart:CleanupUnusedStylesAndLists + //GistId:669f3d08f45b14f75f9d2cb17fa1056a Document doc = new Document(MyDir + "Unused styles.docx"); // Combined with the built-in styles, the document now has eight styles. @@ -54,13 +55,14 @@ public void CleanupUnusedStylesAndLists() $"Count of lists after Cleanup is the same: {doc.Lists.Count}"); doc.Save(ArtifactsDir + "WorkingWithDocumentOptionsAndSettings.CleanupUnusedStylesAndLists.docx"); - //ExEnd:CleanupUnusedStylesandLists + //ExEnd:CleanupUnusedStylesAndLists } [Test] public void CleanupDuplicateStyle() { //ExStart:CleanupDuplicateStyle + //GistId:669f3d08f45b14f75f9d2cb17fa1056a Document doc = new Document(MyDir + "Document.docx"); // Count of styles before Cleanup. From 947e7128a426d4b6151236297918e27fa24a8f67 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 14:22:04 +0300 Subject: [PATCH 09/61] Updated "Work with Options and Appearance" --- .../Working with document options and settings.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs index 3871dce88..dc30fb394 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document options and settings.cs @@ -10,15 +10,16 @@ namespace DocsExamples.Programming_with_Documents.Working_with_Document internal class WorkingWithDocumentOptionsAndSettings : DocsExamplesBase { [Test] - public void OptimizeForMsWord() + public void OptimizeFor() { - //ExStart:OptimizeForMsWord + //ExStart:OptimizeFor + //GistId:5d2997d42c1f1fad79b18873f170855f Document doc = new Document(MyDir + "Document.docx"); doc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2016); - doc.Save(ArtifactsDir + "WorkingWithDocumentOptionsAndSettings.OptimizeForMsWord.docx"); - //ExEnd:OptimizeForMsWord + doc.Save(ArtifactsDir + "WorkingWithDocumentOptionsAndSettings.OptimizeFor.docx"); + //ExEnd:OptimizeFor } [Test] @@ -83,6 +84,7 @@ public void CleanupDuplicateStyle() public void ViewOptions() { //ExStart:SetViewOption + //GistId:5d2997d42c1f1fad79b18873f170855f Document doc = new Document(MyDir + "Document.docx"); doc.ViewOptions.ViewType = ViewType.PageLayout; @@ -96,6 +98,7 @@ public void ViewOptions() public void DocumentPageSetup() { //ExStart:DocumentPageSetup + //GistId:5d2997d42c1f1fad79b18873f170855f Document doc = new Document(MyDir + "Document.docx"); // Set the layout mode for a section allowing to define the document grid behavior. @@ -132,6 +135,7 @@ public void AddEditingLanguage() public void SetRussianAsDefaultEditingLanguage() { //ExStart:SetRussianAsDefaultEditingLanguage + //GistId:5d2997d42c1f1fad79b18873f170855f LoadOptions loadOptions = new LoadOptions(); loadOptions.LanguagePreferences.DefaultEditingLanguage = EditingLanguage.Russian; From c45b6552baa2820e4eb00498c655dc7e9e8e36a2 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 14:29:23 +0300 Subject: [PATCH 10/61] Updated "Work with Office Add-ins" --- .../Working with WebExtension.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with WebExtension.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with WebExtension.cs index 909f8797a..0afa29cb6 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with WebExtension.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with WebExtension.cs @@ -1,4 +1,4 @@ -using System; +using System; using Aspose.Words; using Aspose.Words.WebExtensions; using NUnit.Framework; @@ -8,9 +8,10 @@ namespace DocsExamples.Programming_with_Documents.Working_with_Document internal class WorkingWithWebExtension : DocsExamplesBase { [Test] - public void UsingWebExtensionTaskPanes() + public void WebExtensionTaskPanes() { - //ExStart:UsingWebExtensionTaskPanes + //ExStart:WebExtensionTaskPanes + //GistId:8c31c018ea71c92828223776b1a113f7 Document doc = new Document(); TaskPane taskPane = new TaskPane(); @@ -28,11 +29,12 @@ public void UsingWebExtensionTaskPanes() taskPane.WebExtension.Bindings.Add(new WebExtensionBinding("UnnamedBinding_0_1506535429545", WebExtensionBindingType.Text, "194740422")); - doc.Save(ArtifactsDir + "WorkingWithWebExtension.UsingWebExtensionTaskPanes.docx"); - //ExEnd:UsingWebExtensionTaskPanes - + doc.Save(ArtifactsDir + "WorkingWithWebExtension.WebExtensionTaskPanes.docx"); + //ExEnd:WebExtensionTaskPanes + //ExStart:GetListOfAddins - doc = new Document(ArtifactsDir + "WorkingWithWebExtension.UsingWebExtensionTaskPanes.docx"); + //GistId:8c31c018ea71c92828223776b1a113f7 + doc = new Document(ArtifactsDir + "WorkingWithWebExtension.WebExtensionTaskPanes.docx"); Console.WriteLine("Task panes sources:\n"); From 55bfa87d10a825262b8f3954da8db741c50a7dc6 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 15:01:58 +0300 Subject: [PATCH 11/61] Updated "Open a Document Read-Only" --- .../Protect or Encrypt Document/Document protection.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs index 2c04b6f00..2d2d41da9 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs @@ -120,6 +120,7 @@ public void GetProtectionType() public void ReadOnlyProtection() { //ExStart:ReadOnlyProtection + //GistId:7cf6735e83804ba8942663695b22ee42 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -141,6 +142,7 @@ public void ReadOnlyProtection() public void RemoveReadOnlyRestriction() { //ExStart:RemoveReadOnlyRestriction + //GistId:7cf6735e83804ba8942663695b22ee42 Document doc = new Document(); // Enter a password that's up to 15 characters long. From 67e410d49c7576b0719a8aac1af029389d67835b Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 16:02:52 +0300 Subject: [PATCH 12/61] Updated "Restrict document editing" --- .../Protect or Encrypt Document/Document protection.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs index 2d2d41da9..941e7df53 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Protect or Encrypt Document/Document protection.cs @@ -9,6 +9,7 @@ class DocumentProtection : DocsExamplesBase public void PasswordProtection() { //ExStart:PasswordProtection + //GistId:856ba85fa704fa728b0ec20aafddd16b Document doc = new Document(); // Apply document protection. @@ -22,6 +23,7 @@ public void PasswordProtection() public void AllowOnlyFormFieldsProtect() { //ExStart:AllowOnlyFormFieldsProtect + //GistId:856ba85fa704fa728b0ec20aafddd16b // Insert two sections with some text. Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -39,6 +41,7 @@ public void AllowOnlyFormFieldsProtect() public void RemoveDocumentProtection() { //ExStart:RemoveDocumentProtection + //GistId:856ba85fa704fa728b0ec20aafddd16b Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -57,6 +60,7 @@ public void RemoveDocumentProtection() public void UnrestrictedEditableRegions() { //ExStart:UnrestrictedEditableRegions + //GistId:856ba85fa704fa728b0ec20aafddd16b // Upload a document and make it as read-only. Document doc = new Document(MyDir + "Document.docx"); DocumentBuilder builder = new DocumentBuilder(doc); @@ -86,6 +90,7 @@ public void UnrestrictedEditableRegions() public void UnrestrictedSection() { //ExStart:UnrestrictedSection + //GistId:856ba85fa704fa728b0ec20aafddd16b // Insert two sections with some text. Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); From 03c51f4eefb358f40ee7dbdb37ba9be85886cb74 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 21 Jan 2025 18:55:18 +0300 Subject: [PATCH 13/61] Updated "Compare Documents" --- .../Working with Document/Compare documents.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Compare documents.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Compare documents.cs index 7c3f5b83b..0a50caeaa 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Compare documents.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Compare documents.cs @@ -11,6 +11,7 @@ internal class CompareDocument : DocsExamplesBase public void CompareForEqual() { //ExStart:CompareForEqual + //GistId:66cba61d079d8ef1e676820633ba4586 Document docA = new Document(MyDir + "Document.docx"); Document docB = docA.Clone(); @@ -18,13 +19,14 @@ public void CompareForEqual() docA.Compare(docB, "user", DateTime.Now); Console.WriteLine(docA.Revisions.Count == 0 ? "Documents are equal" : "Documents are not equal"); - //ExEnd:CompareForEqual + //ExEnd:CompareForEqual } [Test] public void CompareOptions() { //ExStart:CompareOptions + //GistId:66cba61d079d8ef1e676820633ba4586 Document docA = new Document(MyDir + "Document.docx"); Document docB = docA.Clone(); @@ -43,7 +45,7 @@ public void CompareOptions() docA.Compare(docB, "user", DateTime.Now, options); Console.WriteLine(docA.Revisions.Count == 0 ? "Documents are equal" : "Documents are not equal"); - //ExEnd:CompareOptions + //ExEnd:CompareOptions } [Test] @@ -73,7 +75,7 @@ public void ComparisonGranularity() CompareOptions compareOptions = new CompareOptions { Granularity = Granularity.CharLevel }; builderA.Document.Compare(builderB.Document, "author", DateTime.Now, compareOptions); - //ExEnd:ComparisonGranularity + //ExEnd:ComparisonGranularity } } } \ No newline at end of file From e27c5dc48b6eb0d17b0be8d437c849966c7a3767 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 12:11:02 +0300 Subject: [PATCH 14/61] Updated "Clone document" --- .../Clone and combine documents.cs | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Clone and combine documents.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Clone and combine documents.cs index af5fd317e..05770d0c3 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Clone and combine documents.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Clone and combine documents.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using System.Text.RegularExpressions; @@ -12,14 +12,36 @@ namespace DocsExamples.Programming_with_Documents.Working_with_Document internal class CloneAndCombineDocuments : DocsExamplesBase { [Test] - public void CloningDocument() + public void CloneDocument() { - //ExStart:CloningDocument - Document doc = new Document(MyDir + "Document.docx"); + //ExStart:CloneDocument + //GistId:b2f62f736a2090163de7b0f221cf46d4 + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + builder.Writeln("This is the original document before applying the clone method"); + // Clone the document. Document clone = doc.Clone(); + + // Edit the cloned document. + builder = new DocumentBuilder(clone); + builder.Write("Section 1"); + builder.InsertBreak(BreakType.SectionBreakNewPage); + builder.Write("Section 2"); + + // This shows what is in the document originally. The document has two sections. + Assert.AreEqual("Section 1\fSection 2This is the original document before applying the clone method", clone.GetText().Trim()); + + // Duplicate the last section and append the copy to the end of the document. + int lastSectionIdx = clone.Sections.Count - 1; + Section newSection = clone.Sections[lastSectionIdx].Clone(); + clone.Sections.Add(newSection); + + // Check what the document contains after we changed it. + Assert.AreEqual("Section 1\fSection 2This is the original document before applying the clone method" + + "\r\fSection 2This is the original document before applying the clone method", clone.GetText().Trim()); clone.Save(ArtifactsDir + "CloneAndCombineDocuments.CloningDocument.docx"); - //ExEnd:CloningDocument + //ExEnd:CloneDocument } [Test] From 5c3fb06093abb1a3e50f4e207bb5bf4a3bb065ef Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 12:28:42 +0300 Subject: [PATCH 15/61] Updated "Split a Document" --- .../Split Documents/Split document.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Split Documents/Split document.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Split Documents/Split document.cs index 504bba13f..a59bdb107 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Split Documents/Split document.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Split Documents/Split document.cs @@ -29,18 +29,20 @@ public void ByHeadings() public void BySectionsHtml() { Document doc = new Document(MyDir + "Rendering.docx"); - + //ExStart:SplitDocumentBySectionsHtml + //GistId:6759a1a6b7f448798751d54922a8efcb HtmlSaveOptions options = new HtmlSaveOptions { DocumentSplitCriteria = DocumentSplitCriteria.SectionBreak }; //ExEnd:SplitDocumentBySectionsHtml - - doc.Save(ArtifactsDir + "SplitDocument.BySectionsHtml.html", options); + + doc.Save(ArtifactsDir + "SplitDocument.BySections.html", options); } [Test] public void BySections() { //ExStart:SplitDocumentBySections + //GistId:6759a1a6b7f448798751d54922a8efcb Document doc = new Document(MyDir + "Big document.docx"); for (int i = 0; i < doc.Sections.Count; i++) @@ -64,6 +66,7 @@ public void BySections() public void PageByPage() { //ExStart:SplitDocumentPageByPage + //GistId:6759a1a6b7f448798751d54922a8efcb Document doc = new Document(MyDir + "Big document.docx"); int pageCount = doc.PageCount; @@ -80,6 +83,7 @@ public void PageByPage() } //ExStart:MergeSplitDocuments + //GistId:6759a1a6b7f448798751d54922a8efcb private void MergeDocuments() { // Find documents using for merge. @@ -114,6 +118,7 @@ private void MergeDocuments() public void ByPageRange() { //ExStart:SplitDocumentByPageRange + //GistId:6759a1a6b7f448798751d54922a8efcb Document doc = new Document(MyDir + "Big document.docx"); // Get part of the document. From 56b553db2fca7aabfca0ae23334c69844008d506 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 14:19:15 +0300 Subject: [PATCH 16/61] Updated "Find and Replace" --- .../Contents Management/Find and replace.cs | 57 ++++++++++++++++++- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs index 022c9b0d6..60e911750 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs @@ -1,5 +1,6 @@ -using System; +using System; using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.Text; using System.Text.RegularExpressions; @@ -9,6 +10,7 @@ using Aspose.Words.Replacing; using Aspose.Words.Tables; using NUnit.Framework; +using static DocsExamples.Programming_with_Documents.Working_with_Document.AddContentUsingDocumentBuilder; namespace DocsExamples.Programming_with_Documents.Contents_Management { @@ -155,6 +157,7 @@ public void MetaCharactersInSearchPattern() public void ReplaceTextContainingMetaCharacters() { //ExStart:ReplaceTextContainingMetaCharacters + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -179,6 +182,19 @@ public void ReplaceTextContainingMetaCharacters() //ExEnd:ReplaceTextContainingMetaCharacters } + [Test] + public void HighlightColor() + { + //ExStart:HighlightColor + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 + Document doc = new Document(MyDir + "Footer.docx"); + + FindReplaceOptions options = new FindReplaceOptions(); + options.ApplyFont.HighlightColor = Color.DarkOrange; + doc.Range.Replace(new Regex("(header|footer)"), "", options); + //ExEnd:HighlightColor + } + [Test] public void IgnoreTextInsideFields() { @@ -207,6 +223,7 @@ public void IgnoreTextInsideFields() public void IgnoreTextInsideDeleteRevisions() { //ExStart:IgnoreTextInsideDeleteRevisions + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -301,13 +318,13 @@ ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e) public void ReplaceTextInFooter() { //ExStart:ReplaceTextInFooter + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 Document doc = new Document(MyDir + "Footer.docx"); HeaderFooterCollection headersFooters = doc.FirstSection.HeadersFooters; HeaderFooter footer = headersFooters[HeaderFooterType.FooterPrimary]; FindReplaceOptions options = new FindReplaceOptions { MatchCase = false, FindWholeWordsOnly = false }; - footer.Range.Replace("(C) 2006 Aspose Pty Ltd.", "Copyright (C) 2020 by Aspose Pty Ltd.", options); doc.Save(ArtifactsDir + "FindAndReplace.ReplaceTextInFooter.docx"); @@ -496,6 +513,7 @@ ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e) [Test] //ExStart:ReplaceWithHtml + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 public void ReplaceWithHtml() { Document doc = new Document(); @@ -542,6 +560,7 @@ ReplaceAction IReplacingCallback.Replacing(ReplacingArgs args) public void ReplaceWithRegex() { //ExStart:ReplaceWithRegex + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -576,6 +595,7 @@ public void RecognizeAndSubstitutionsWithinReplacementPatterns() public void ReplaceWithString() { //ExStart:ReplaceWithString + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -636,5 +656,38 @@ public void ReplaceTextInTable() doc.Save(ArtifactsDir + "FindAndReplace.ReplaceTextInTable.docx"); //ExEnd:ReplaceText } + + //ExStart:LineCounter + //GistId:27c3408b2c7fbee8d6dc6a1c8b61c105 + [Test] //ExSkip + public void LineCounter() + { + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + + builder.Writeln("This is first line"); + builder.Writeln("Second line"); + builder.Writeln("And last line"); + + // Prepend each line with line number. + FindReplaceOptions opt = new FindReplaceOptions() { ReplacingCallback = new LineCounterCallback() }; + doc.Range.Replace(new Regex("[^&p]*&p"), "", opt); + + doc.Save(ArtifactsDir + "FindAndReplace.LineCounter.docx"); + } + + internal class LineCounterCallback : IReplacingCallback + { + public ReplaceAction Replacing(ReplacingArgs args) + { + Debug.WriteLine(args.Match.Value); + + args.Replacement = string.Format("{0} {1}", mCounter++, args.Match.Value); + return ReplaceAction.Replace; + } + + private int mCounter = 1; + } + //ExEnd:LineCounter } } From 83b716f827d8e144dadcd6947f3866e350aa4a50 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 14:50:12 +0300 Subject: [PATCH 17/61] Updated "Styles and Themes" --- .../Contents Management/Extract content.cs | 4 +++- .../Working with styles and themes.cs | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Extract content.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Extract content.cs index afb6643e0..8448ac1b3 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Extract content.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Extract content.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; using Aspose.Words; @@ -387,6 +387,7 @@ public void ExtractImages() public void ExtractContentBasedOnStyles() { //ExStart:ExtractContentBasedOnStyles + //GistId:a73b495f610523670f0847331ef4d6fc Document doc = new Document(MyDir + "Styles.docx"); List paragraphs = ParagraphsByStyleName(doc, "Heading 1"); @@ -404,6 +405,7 @@ public void ExtractContentBasedOnStyles() } //ExStart:RunsByStyleName + //GistId:a73b495f610523670f0847331ef4d6fc public List RunsByStyleName(Document doc, string styleName) { List runsWithStyle = new List(); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs index fb23d4e38..a53e9282c 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Drawing; using Aspose.Words; using NUnit.Framework; @@ -11,6 +11,7 @@ internal class WorkingWithStylesAndThemes : DocsExamplesBase public void AccessStyles() { //ExStart:AccessStyles + //GistId:a73b495f610523670f0847331ef4d6fc Document doc = new Document(); string styleName = ""; @@ -37,6 +38,7 @@ public void AccessStyles() public void CopyStyles() { //ExStart:CopyStyles + //GistId:a73b495f610523670f0847331ef4d6fc Document doc = new Document(); Document target = new Document(MyDir + "Rendering.docx"); @@ -50,6 +52,7 @@ public void CopyStyles() public void GetThemeProperties() { //ExStart:GetThemeProperties + //GistId:a73b495f610523670f0847331ef4d6fc Document doc = new Document(); Aspose.Words.Themes.Theme theme = doc.Theme; @@ -57,19 +60,20 @@ public void GetThemeProperties() Console.WriteLine(theme.MajorFonts.Latin); Console.WriteLine(theme.MinorFonts.EastAsian); Console.WriteLine(theme.Colors.Accent1); - //ExEnd:GetThemeProperties + //ExEnd:GetThemeProperties } [Test] public void SetThemeProperties() { //ExStart:SetThemeProperties + //GistId:a73b495f610523670f0847331ef4d6fc Document doc = new Document(); Aspose.Words.Themes.Theme theme = doc.Theme; theme.MinorFonts.Latin = "Times New Roman"; theme.Colors.Hyperlink = Color.Gold; - //ExEnd:SetThemeProperties + //ExEnd:SetThemeProperties } [Test] From 5f38547e589acd9a055f9c672a37ceef318cb360 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 15:19:35 +0300 Subject: [PATCH 18/61] Updated "Ranges" --- .../Contents Management/Working with Ranges.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Ranges.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Ranges.cs index f63f28ae7..bc2ae4bcb 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Ranges.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Ranges.cs @@ -9,6 +9,7 @@ internal class WorkingWithRanges : DocsExamplesBase public void RangesDeleteText() { //ExStart:RangesDeleteText + //GistId:9164e9c0658006e51db723b0742c12fc Document doc = new Document(MyDir + "Document.docx"); doc.Sections[0].Range.Delete(); //ExEnd:RangesDeleteText @@ -18,6 +19,7 @@ public void RangesDeleteText() public void RangesGetText() { //ExStart:RangesGetText + //GistId:9164e9c0658006e51db723b0742c12fc Document doc = new Document(MyDir + "Document.docx"); string text = doc.Range.Text; //ExEnd:RangesGetText From 40fc9cf4d0d44d9c591f5cc1a51550512a30652e Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 15:28:41 +0300 Subject: [PATCH 19/61] Updated "Footnote and endnote" --- .../Working with Footnote and Endnote.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Footnote and Endnote.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Footnote and Endnote.cs index 2dc4641d6..46e25458d 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Footnote and Endnote.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Footnote and Endnote.cs @@ -7,35 +7,38 @@ namespace DocsExamples.Programming_with_Documents internal class WorkingWithFootnotes : DocsExamplesBase { [Test] - public void SetFootNoteColumns() + public void SetFootnoteColumns() { - //ExStart:SetFootNoteColumns + //ExStart:SetFootnoteColumns + //GistId:3b39c2019380ee905e7d9596494916a4 Document doc = new Document(MyDir + "Document.docx"); // Specify the number of columns with which the footnotes area is formatted. doc.FootnoteOptions.Columns = 3; - doc.Save(ArtifactsDir + "WorkingWithFootnotes.SetFootNoteColumns.docx"); - //ExEnd:SetFootNoteColumns + doc.Save(ArtifactsDir + "WorkingWithFootnotes.SetFootnoteColumns.docx"); + //ExEnd:SetFootnoteColumns } [Test] - public void SetFootnoteAndEndNotePosition() + public void SetFootnoteAndEndnotePosition() { - //ExStart:SetFootnoteAndEndNotePosition + //ExStart:SetFootnoteAndEndnotePosition + //GistId:3b39c2019380ee905e7d9596494916a4 Document doc = new Document(MyDir + "Document.docx"); doc.FootnoteOptions.Position = FootnotePosition.BeneathText; doc.EndnoteOptions.Position = EndnotePosition.EndOfSection; - doc.Save(ArtifactsDir + "WorkingWithFootnotes.SetFootnoteAndEndNotePosition.docx"); - //ExEnd:SetFootnoteAndEndNotePosition + doc.Save(ArtifactsDir + "WorkingWithFootnotes.SetFootnoteAndEndnotePosition.docx"); + //ExEnd:SetFootnoteAndEndnotePosition } [Test] public void SetEndnoteOptions() { //ExStart:SetEndnoteOptions + //GistId:3b39c2019380ee905e7d9596494916a4 Document doc = new Document(MyDir + "Document.docx"); DocumentBuilder builder = new DocumentBuilder(doc); From 7a9efc374f732d5ff826d9df4941c2d68edc6518 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 15:47:10 +0300 Subject: [PATCH 20/61] Updated "Working with Table of Contents" --- .../Contents Management/Remove content.cs | 5 ++- .../Working with table of content.cs | 41 +++++++++++++++++-- .../Add content using DocumentBuilder.cs | 18 ++++---- 3 files changed, 51 insertions(+), 13 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Remove content.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Remove content.cs index 6b7eba1ab..71a3c940d 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Remove content.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Remove content.cs @@ -87,7 +87,8 @@ public void RemoveFooters() } [Test] - //ExStart:RemoveTOCFromDocument + //ExStart:RemoveToc + //GistId:db118a3e1559b9c88355356df9d7ea10 public void RemoveToc() { Document doc = new Document(MyDir + "Table of contents.docx"); @@ -146,6 +147,6 @@ public void RemoveTableOfContents(Document doc, int index) node.Remove(); } } - //ExEnd:RemoveTOCFromDocument + //ExEnd:RemoveToc } } \ No newline at end of file diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with table of content.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with table of content.cs index 193ac6508..1415f85be 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with table of content.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with table of content.cs @@ -1,5 +1,7 @@ using Aspose.Words; +using Aspose.Words.Fields; using NUnit.Framework; +using System; namespace DocsExamples.Programming_with_Documents.Contents_Management { @@ -8,17 +10,19 @@ class WorkingWithTableOfContent : DocsExamplesBase [Test] public void ChangeStyleOfTocLevel() { - //ExStart:ChangeStyleOfTOCLevel + //ExStart:ChangeStyleOfTocLevel + //GistId:db118a3e1559b9c88355356df9d7ea10 Document doc = new Document(); // Retrieve the style used for the first level of the TOC and change the formatting of the style. doc.Styles[StyleIdentifier.Toc1].Font.Bold = true; - //ExEnd:ChangeStyleOfTOCLevel + //ExEnd:ChangeStyleOfTocLevel } [Test] public void ChangeTocTabStops() { - //ExStart:ChangeTOCTabStops + //ExStart:ChangeTocTabStops + //GistId:db118a3e1559b9c88355356df9d7ea10 Document doc = new Document(MyDir + "Table of contents.docx"); foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true)) @@ -41,7 +45,36 @@ public void ChangeTocTabStops() } doc.Save(ArtifactsDir + "WorkingWithTableOfContent.ChangeTocTabStops.docx"); - //ExEnd:ChangeTOCTabStops + //ExEnd:ChangeTocTabStops + } + + [Test] + public void ExtractToc() + { + //ExStart:ExtractToc + //GistId:db118a3e1559b9c88355356df9d7ea10 + Document doc = new Document(MyDir + "Table of contents.docx"); + + foreach (Field field in doc.Range.Fields) + { + if (field.Type.Equals(FieldType.FieldHyperlink)) + { + FieldHyperlink hyperlink = (FieldHyperlink)field; + if (hyperlink.SubAddress != null && hyperlink.SubAddress.StartsWith("_Toc")) + { + Paragraph tocItem = (Paragraph)field.Start.GetAncestor(NodeType.Paragraph); + Console.WriteLine(tocItem.ToString(SaveFormat.Text).Trim()); + Console.WriteLine("------------------"); + if (tocItem != null) + { + Bookmark bm = doc.Range.Bookmarks[hyperlink.SubAddress]; + Paragraph pointer = (Paragraph)bm.BookmarkStart.GetAncestor(NodeType.Paragraph); + Console.WriteLine(pointer.ToString(SaveFormat.Text)); + } + } + } + } + //ExEnd:ExtractToc } } } \ No newline at end of file diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs index ee79d7575..fae4cad7b 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs @@ -214,6 +214,7 @@ public void InsertHyperlink() public void InsertTableOfContents() { //ExStart:InsertTableOfContents + //GistId:db118a3e1559b9c88355356df9d7ea10 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -252,6 +253,7 @@ public void InsertTableOfContents() builder.Writeln("Heading 3.3"); //ExStart:UpdateFields + //GistId:db118a3e1559b9c88355356df9d7ea10 // The newly inserted table of contents will be initially empty. // It needs to be populated by updating the fields in the document. doc.UpdateFields(); @@ -321,22 +323,24 @@ public void InsertParagraph() } [Test] - public void InsertTCField() + public void InsertTcField() { - //ExStart:InsertTCField + //ExStart:InsertTcField + //GistId:db118a3e1559b9c88355356df9d7ea10 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.InsertField("TC \"Entry Text\" \\f t"); - doc.Save(ArtifactsDir + "AddContentUsingDocumentBuilder.InsertTCField.docx"); - //ExEnd:InsertTCField + doc.Save(ArtifactsDir + "AddContentUsingDocumentBuilder.InsertTcField.docx"); + //ExEnd:InsertTcField } [Test] - public void InsertTCFieldsAtText() + public void InsertTcFieldsAtText() { - //ExStart:InsertTCFieldsAtText + //ExStart:InsertTcFieldsAtText + //GistId:db118a3e1559b9c88355356df9d7ea10 Document doc = new Document(); FindReplaceOptions options = new FindReplaceOptions(); @@ -344,7 +348,7 @@ public void InsertTCFieldsAtText() options.ReplacingCallback = new InsertTCFieldHandler("Chapter 1", "\\l 1"); doc.Range.Replace(new Regex("The Beginning"), "", options); - //ExEnd:InsertTCFieldsAtText + //ExEnd:InsertTcFieldsAtText } //ExStart:InsertTCFieldHandler From 5b542930cb4211a4eec361bcb51d8c185a87972e Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 17:13:15 +0300 Subject: [PATCH 21/61] Updated "Working with Bookmarks" --- .../Contents Management/Working with Bookmarks.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Bookmarks.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Bookmarks.cs index 52ce2c456..d4dcafcff 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Bookmarks.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with Bookmarks.cs @@ -13,8 +13,8 @@ internal class WorkingWithBookmarks : DocsExamplesBase public void AccessBookmarks() { //ExStart:AccessBookmarks + //GistId:c4555b1a088856e21394104faeb86e51 Document doc = new Document(MyDir + "Bookmarks.docx"); - // By index: Bookmark bookmark1 = doc.Range.Bookmarks[0]; // By name: @@ -26,6 +26,7 @@ public void AccessBookmarks() public void UpdateBookmarkData() { //ExStart:UpdateBookmarkData + //GistId:c4555b1a088856e21394104faeb86e51 Document doc = new Document(MyDir + "Bookmarks.docx"); Bookmark bookmark = doc.Range.Bookmarks["MyBookmark1"]; @@ -42,6 +43,7 @@ public void UpdateBookmarkData() public void BookmarkTableColumns() { //ExStart:BookmarkTable + //GistId:c4555b1a088856e21394104faeb86e51 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -71,6 +73,7 @@ public void BookmarkTableColumns() //ExEnd:BookmarkTable //ExStart:BookmarkTableColumns + //GistId:c4555b1a088856e21394104faeb86e51 foreach (Bookmark bookmark in doc.Range.Bookmarks) { Console.WriteLine("Bookmark: {0}{1}", bookmark.Name, bookmark.IsColumn ? " (Column)" : ""); @@ -148,6 +151,7 @@ private void AppendBookmarkedText(NodeImporter importer, Bookmark srcBookmark, C public void CreateBookmark() { //ExStart:CreateBookmark + //GistId:c4555b1a088856e21394104faeb86e51 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -173,6 +177,7 @@ public void CreateBookmark() public void ShowHideBookmarks() { //ExStart:ShowHideBookmarks + //GistId:c4555b1a088856e21394104faeb86e51 Document doc = new Document(MyDir + "Bookmarks.docx"); ShowHideBookmarkedContent(doc, "MyBookmark1", true); @@ -182,6 +187,7 @@ public void ShowHideBookmarks() } //ExStart:ShowHideBookmarkedContent + //GistId:c4555b1a088856e21394104faeb86e51 public void ShowHideBookmarkedContent(Document doc, string bookmarkName, bool isHidden) { Bookmark bm = doc.Range.Bookmarks[bookmarkName]; From f05d73bead2cb3386b6b41a08c57de1ca4c8bebd Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 22 Jan 2025 18:21:25 +0300 Subject: [PATCH 22/61] Updated "Working with Paragraphs" --- .../Working with styles and themes.cs | 1 + .../Document formatting.cs | 86 +++++++++++++++++++ .../Working with List.cs | 1 + 3 files changed, 88 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs index a53e9282c..63de9d924 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with styles and themes.cs @@ -80,6 +80,7 @@ public void SetThemeProperties() public void InsertStyleSeparator() { //ExStart:InsertStyleSeparator + //GistId:4b5526c3c0d9cad73e05fb4b18d2c3d2 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs index a14b058ed..a5f1a0606 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs @@ -1,5 +1,7 @@ using System; using Aspose.Words; +using Aspose.Words.Layout; +using Aspose.Words.Tables; using NUnit.Framework; namespace DocsExamples.Programming_with_Documents.Working_with_Document @@ -43,6 +45,7 @@ public void AsianTypographyLineBreakGroup() public void ParagraphFormatting() { //ExStart:ParagraphFormatting + //GistId:4b5526c3c0d9cad73e05fb4b18d2c3d2 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -65,6 +68,7 @@ public void ParagraphFormatting() public void MultilevelListFormatting() { //ExStart:MultilevelListFormatting + //GistId:a1dfeba1e0480d5b277a61742c8921af Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -96,6 +100,7 @@ public void MultilevelListFormatting() public void ApplyParagraphStyle() { //ExStart:ApplyParagraphStyle + //GistId:4b5526c3c0d9cad73e05fb4b18d2c3d2 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -110,6 +115,7 @@ public void ApplyParagraphStyle() public void ApplyBordersAndShadingToParagraph() { //ExStart:ApplyBordersAndShadingToParagraph + //GistId:4b5526c3c0d9cad73e05fb4b18d2c3d2 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -172,6 +178,7 @@ public void SnapToGrid() public void GetParagraphStyleSeparator() { //ExStart:GetParagraphStyleSeparator + //GistId:4b5526c3c0d9cad73e05fb4b18d2c3d2 Document doc = new Document(MyDir + "Document.docx"); foreach (Paragraph paragraph in doc.GetChildNodes(NodeType.Paragraph, true)) @@ -183,5 +190,84 @@ public void GetParagraphStyleSeparator() } //ExEnd:GetParagraphStyleSeparator } + + [Test] + //ExStart:GetParagraphLines + //GistId:4b5526c3c0d9cad73e05fb4b18d2c3d2 + public void GetParagraphLines() + { + Document doc = new Document(MyDir + "Properties.docx"); + + LayoutCollector collector = new LayoutCollector(doc); + LayoutEnumerator enumerator = new LayoutEnumerator(doc); + foreach (Paragraph paragraph in doc.GetChildNodes(NodeType.Paragraph, true)) + { + ProcessParagraph(paragraph, collector, enumerator); + } + } + + private static void ProcessParagraph(Paragraph paragraph, LayoutCollector collector, LayoutEnumerator enumerator) + { + object paragraphBreak = collector.GetEntity(paragraph); + if (paragraphBreak == null) + return; + + object stopEntity = GetStopEntity(paragraph, collector, enumerator); + + enumerator.Current = paragraphBreak; + enumerator.MoveParent(); + + int lineCount = CountLines(enumerator, stopEntity); + + string paragraphText = GetTruncatedText(paragraph.GetText()); + Console.WriteLine($"Paragraph '{paragraphText}' has {lineCount} line(-s)."); + } + + private static object GetStopEntity(Paragraph paragraph, LayoutCollector collector, LayoutEnumerator enumerator) + { + Node previousNode = paragraph.PreviousSibling; + if (previousNode == null) + return null; + + if (previousNode is Paragraph prevParagraph) + { + enumerator.Current = collector.GetEntity(prevParagraph); // Para break. + enumerator.MoveParent(); // Last line. + return enumerator.Current; + } + else if (previousNode is Table table) + { + enumerator.Current = collector.GetEntity(table.LastRow.LastCell.LastParagraph); // Cell break. + enumerator.MoveParent(); // Cell. + enumerator.MoveParent(); // Row. + return enumerator.Current; + } + else + { + throw new InvalidOperationException("Unsupported node type encountered."); + } + } + /// + /// We move from line to line in a paragraph. + /// When paragraph spans multiple pages the we will follow across them. + /// + private static int CountLines(LayoutEnumerator enumerator, object stopEntity) + { + int count = 1; + while (enumerator.Current != stopEntity) + { + if (!enumerator.MovePreviousLogical()) + break; + count++; + } + return count; + } + + private static string GetTruncatedText(string text) + { + int MaxChars = 16; + return text.Length > MaxChars ? $"{text.Substring(0, MaxChars)}..." : text; + } + //ExEnd:GetParagraphLines } } \ No newline at end of file diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with List.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with List.cs index 9fafafeec..f8fee950b 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with List.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with List.cs @@ -13,6 +13,7 @@ internal class WorkingWithList : DocsExamplesBase public void RestartListAtEachSection() { //ExStart:RestartListAtEachSection + //GistId:a1dfeba1e0480d5b277a61742c8921af Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); From 88101f1531c7bd20969d2a63e0b391f3736b16f9 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 12:43:06 +0300 Subject: [PATCH 23/61] Updated "Working with fonts" --- .../Working with Fonts.cs | 7 +++++-- .../Working with Hyphenation.cs | 21 +++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fonts.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fonts.cs index 4fc5b056e..f28112bd9 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fonts.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fonts.cs @@ -37,6 +37,7 @@ public void FontFormatting() public void GetFontLineSpacing() { //ExStart:GetFontLineSpacing + //GistId:7cb86f131b74afcbebc153f0039e3947 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -69,7 +70,8 @@ public void CheckDMLTextEffect() [Test] public void SetFontFormatting() { - //ExStart:DocumentBuilderSetFontFormatting + //ExStart:SetFontFormatting + //GistId:7cb86f131b74afcbebc153f0039e3947 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -85,13 +87,14 @@ public void SetFontFormatting() builder.Writeln("I'm a very nice formatted string."); doc.Save(ArtifactsDir + "WorkingWithFonts.SetFontFormatting.docx"); - //ExEnd:DocumentBuilderSetFontFormatting + //ExEnd:SetFontFormatting } [Test] public void SetFontEmphasisMark() { //ExStart:SetFontEmphasisMark + //GistId:7cb86f131b74afcbebc153f0039e3947 Document document = new Document(); DocumentBuilder builder = new DocumentBuilder(document); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Hyphenation.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Hyphenation.cs index 6ce0ed93d..acdb438cf 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Hyphenation.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Hyphenation.cs @@ -8,33 +8,36 @@ namespace DocsExamples.Programming_with_Documents internal class WorkingWithHyphenation : DocsExamplesBase { [Test] - public void HyphenateWordsOfLanguages() + public void HyphenateWords() { - //ExStart:HyphenateWordsOfLanguages + //ExStart:HyphenateWords + //GistId:a52aacf87a36f7881ba29d25de92fb83 Document doc = new Document(MyDir + "German text.docx"); Hyphenation.RegisterDictionary("en-US", MyDir + "hyph_en_US.dic"); Hyphenation.RegisterDictionary("de-CH", MyDir + "hyph_de_CH.dic"); - doc.Save(ArtifactsDir + "WorkingWithHyphenation.HyphenateWordsOfLanguages.pdf"); - //ExEnd:HyphenateWordsOfLanguages + doc.Save(ArtifactsDir + "WorkingWithHyphenation.HyphenateWords.pdf"); + //ExEnd:HyphenateWords } [Test] - public void LoadHyphenationDictionaryForLanguage() + public void LoadHyphenationDictionary() { - //ExStart:LoadHyphenationDictionaryForLanguage + //ExStart:LoadHyphenationDictionary + //GistId:a52aacf87a36f7881ba29d25de92fb83 Document doc = new Document(MyDir + "German text.docx"); Stream stream = File.OpenRead(MyDir + "hyph_de_CH.dic"); Hyphenation.RegisterDictionary("de-CH", stream); - doc.Save(ArtifactsDir + "WorkingWithHyphenation.LoadHyphenationDictionaryForLanguage.pdf"); - //ExEnd:LoadHyphenationDictionaryForLanguage + doc.Save(ArtifactsDir + "WorkingWithHyphenation.LoadHyphenationDictionary.pdf"); + //ExEnd:LoadHyphenationDictionary } - [Test] + [Test] //ExStart:CustomHyphenation + //GistId:a52aacf87a36f7881ba29d25de92fb83 public void HyphenationCallback() { try From 266c26e9ac7be74e85d0394d7d16613d028d5dfa Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 12:53:45 +0300 Subject: [PATCH 24/61] Updated "Asian Typography" --- .../Working with Document/Document formatting.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs index a5f1a0606..546f2be41 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Document formatting.cs @@ -12,6 +12,7 @@ internal class DocumentFormatting : DocsExamplesBase public void SpaceBetweenAsianAndLatinText() { //ExStart:SpaceBetweenAsianAndLatinText + //GistId:4f54ffd5c7580f0d146b53e52d986f38 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -30,6 +31,7 @@ public void SpaceBetweenAsianAndLatinText() public void AsianTypographyLineBreakGroup() { //ExStart:AsianTypographyLineBreakGroup + //GistId:4f54ffd5c7580f0d146b53e52d986f38 Document doc = new Document(MyDir + "Asian typography.docx"); ParagraphFormat format = doc.FirstSection.Body.Paragraphs[0].ParagraphFormat; From ab4388764a71b47b7973ed3ce014e92cf90397dc Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 14:38:09 +0300 Subject: [PATCH 25/61] Updated "Working with TextBoxes" --- .../Working with Textboxes.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs index da8463e7b..93850a14b 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs @@ -8,9 +8,10 @@ namespace DocsExamples.Programming_with_Documents internal class WorkingWithTextboxes { [Test] - public void CreateALink() + public void CreateLink() { - //ExStart:CreateALink + //ExStart:CreateLink + //GistId:68b6041746b3d6bf5137cff8e6385b5f Document doc = new Document(); Shape shape1 = new Shape(doc, ShapeType.TextBox); @@ -21,13 +22,14 @@ public void CreateALink() if (textBox1.IsValidLinkTarget(textBox2)) textBox1.Next = textBox2; - //ExEnd:CreateALink + //ExEnd:CreateLink } [Test] public void CheckSequence() { //ExStart:CheckSequence + //GistId:68b6041746b3d6bf5137cff8e6385b5f Document doc = new Document(); Shape shape = new Shape(doc, ShapeType.TextBox); @@ -51,9 +53,10 @@ public void CheckSequence() } [Test] - public void BreakALink() + public void BreakLink() { - //ExStart:BreakALink + //ExStart:BreakLink + //GistId:68b6041746b3d6bf5137cff8e6385b5f Document doc = new Document(); Shape shape = new Shape(doc, ShapeType.TextBox); @@ -67,7 +70,7 @@ public void BreakALink() // Break a link, which leads to this textbox. textBox.Previous?.BreakForwardLink(); - //ExEnd:BreakALink + //ExEnd:BreakLink } } } \ No newline at end of file From 719f525624ed102291a7d213bc0688fb5738bf1d Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 14:59:58 +0300 Subject: [PATCH 26/61] Updated "Working with Comments" --- .../Working with Comments.cs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs index edaa8658e..9fd67385f 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs @@ -11,6 +11,7 @@ internal class WorkingWithComments : DocsExamplesBase public void AddComments() { //ExStart:AddComments + //GistId:70902b20df8b1f6b0459f676e21623bb //ExStart:CreateSimpleDocumentUsingDocumentBuilder Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -31,6 +32,7 @@ public void AddComments() public void AnchorComment() { //ExStart:AnchorComment + //GistId:70902b20df8b1f6b0459f676e21623bb Document doc = new Document(); Paragraph para1 = new Paragraph(doc); @@ -66,6 +68,7 @@ public void AnchorComment() public void AddRemoveCommentReply() { //ExStart:AddRemoveCommentReply + //GistId:70902b20df8b1f6b0459f676e21623bb Document doc = new Document(MyDir + "Comments.docx"); Comment comment = (Comment) doc.GetChild(NodeType.Comment, 0, true); @@ -81,6 +84,7 @@ public void AddRemoveCommentReply() public void ProcessComments() { //ExStart:ProcessComments + //GistId:70902b20df8b1f6b0459f676e21623bb Document doc = new Document(MyDir + "Comments.docx"); // Extract the information about the comments of all the authors. @@ -107,6 +111,7 @@ public void ProcessComments() } //ExStart:ExtractComments + //GistId:70902b20df8b1f6b0459f676e21623bb List ExtractComments(Document doc) { List collectedComments = new List(); @@ -123,6 +128,7 @@ List ExtractComments(Document doc) //ExEnd:ExtractComments //ExStart:ExtractCommentsByAuthor + //GistId:70902b20df8b1f6b0459f676e21623bb List ExtractComments(Document doc, string authorName) { List collectedComments = new List(); @@ -140,6 +146,7 @@ List ExtractComments(Document doc, string authorName) //ExEnd:ExtractCommentsByAuthor //ExStart:RemoveComments + //GistId:70902b20df8b1f6b0459f676e21623bb void RemoveComments(Document doc) { NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true); @@ -149,6 +156,7 @@ void RemoveComments(Document doc) //ExEnd:RemoveComments //ExStart:RemoveCommentsByAuthor + //GistId:70902b20df8b1f6b0459f676e21623bb void RemoveComments(Document doc, string authorName) { NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true); @@ -164,6 +172,7 @@ void RemoveComments(Document doc, string authorName) //ExEnd:RemoveCommentsByAuthor //ExStart:CommentResolvedAndReplies + //GistId:70902b20df8b1f6b0459f676e21623bb void CommentResolvedAndReplies(Document doc) { NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true); @@ -180,5 +189,31 @@ void CommentResolvedAndReplies(Document doc) } } //ExEnd:CommentResolvedAndReplies + + [Test] + public void RemoveRangeText() + { + //ExStart:RemoveRangeText + //GistId:70902b20df8b1f6b0459f676e21623bb + Document doc = new Document(MyDir + "Comments.docx"); + + CommentRangeStart commentStart = (CommentRangeStart)doc.GetChild(NodeType.CommentRangeStart, 0, true); + CommentRangeEnd commentEnd = (CommentRangeEnd)doc.GetChild(NodeType.CommentRangeEnd, 0, true); + + Node currentNode = commentStart; + bool isRemoving = true; + while (currentNode != null && isRemoving) + { + if (currentNode.NodeType == NodeType.CommentRangeEnd) + isRemoving = false; + + Node nextNode = currentNode.NextPreOrder(doc); + currentNode.Remove(); + currentNode = nextNode; + } + + doc.Save(ArtifactsDir + "WorkingWithComments.RemoveRangeText.docx"); + //ExEnd:RemoveRangeText + } } } From 5148563b345867314dda8672bcba64c0dca1aa75 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 15:08:13 +0300 Subject: [PATCH 27/61] Updated "Track Changes" --- .../Programming with Documents/Working with Revisions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Revisions.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Revisions.cs index ca4619066..9bdf136b7 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Revisions.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Revisions.cs @@ -14,6 +14,7 @@ internal class WorkingWithRevisions : DocsExamplesBase public void AcceptRevisions() { //ExStart:AcceptAllRevisions + //GistId:e8d71fde166d275d0fc9471c56c3ad39 Document doc = new Document(); Body body = doc.FirstSection.Body; Paragraph para = body.FirstParagraph; @@ -172,6 +173,7 @@ public void AccessRevisedVersion() public void MoveNodeInTrackedDocument() { //ExStart:MoveNodeInTrackedDocument + //GistId:e8d71fde166d275d0fc9471c56c3ad39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.Writeln("Paragraph 1"); @@ -210,6 +212,7 @@ public void MoveNodeInTrackedDocument() public void ShapeRevision() { //ExStart:ShapeRevision + //GistId:e8d71fde166d275d0fc9471c56c3ad39 Document doc = new Document(); // Insert an inline shape without tracking revisions. From 9a66b9b35a36f98aa642c304db2e4ec5fc2d812d Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 15:22:09 +0300 Subject: [PATCH 28/61] Updated "Working with shapes" --- .../Load Options/Working with LoadOptions.cs | 1 + .../Add content using DocumentBuilder.cs | 2 ++ .../Working with Graphic Elements/Working with Shapes.cs | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs index 844e807fc..902b08bdd 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs @@ -53,6 +53,7 @@ public void LoadEncryptedDocumentWithoutPassword() public void ConvertShapeToOfficeMath() { //ExStart:ConvertShapeToOfficeMath + //GistId:ad463bf5f128fe6e6c1485df3c046a4c LoadOptions loadOptions = new LoadOptions { ConvertShapeToOfficeMath = true }; Document doc = new Document(MyDir + "Office math.docx", loadOptions); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs index fae4cad7b..43cbe5892 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs @@ -85,6 +85,7 @@ public void BuildTable() public void InsertHorizontalRule() { //ExStart:InsertHorizontalRule + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -99,6 +100,7 @@ public void InsertHorizontalRule() public void HorizontalRuleFormat() { //ExStart:HorizontalRuleFormat + //GistId:ad463bf5f128fe6e6c1485df3c046a4c DocumentBuilder builder = new DocumentBuilder(); Shape shape = builder.InsertHorizontalRule(); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs index d772beed5..6e47ba681 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs @@ -43,6 +43,7 @@ public void AddGroupShape() public void InsertShape() { //ExStart:InsertShape + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -68,6 +69,7 @@ public void InsertShape() public void AspectRatioLocked() { //ExStart:AspectRatioLocked + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -82,6 +84,7 @@ public void AspectRatioLocked() public void LayoutInCell() { //ExStart:LayoutInCell + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -133,6 +136,7 @@ public void LayoutInCell() public void AddCornersSnipped() { //ExStart:AddCornersSnipped + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -151,6 +155,7 @@ public void AddCornersSnipped() public void GetActualShapeBoundsPoints() { //ExStart:GetActualShapeBoundsPoints + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -166,6 +171,7 @@ public void GetActualShapeBoundsPoints() public void VerticalAnchor() { //ExStart:VerticalAnchor + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -183,6 +189,7 @@ public void VerticalAnchor() public void DetectSmartArtShape() { //ExStart:DetectSmartArtShape + //GistId:ad463bf5f128fe6e6c1485df3c046a4c Document doc = new Document(MyDir + "SmartArt.docx"); int count = doc.GetChildNodes(NodeType.Shape, true).Cast().Count(shape => shape.HasSmartArt); From 5af9e40fb7870f9e7c98b1b89ab36b5a43ce4eb6 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 17:04:08 +0300 Subject: [PATCH 29/61] Updated "Working with Images" --- .../Working with RtfSaveOptions.cs | 1 + .../Add content using DocumentBuilder.cs | 2 + .../Working with Images.cs | 50 +++++++++++++++++-- .../Working with Shapes.cs | 1 + 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with RtfSaveOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with RtfSaveOptions.cs index 6bfa6d7b1..4e77479e7 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with RtfSaveOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with RtfSaveOptions.cs @@ -10,6 +10,7 @@ public class WorkingWithRtfSaveOptions : DocsExamplesBase public void SavingImagesAsWmf() { //ExStart:SavingImagesAsWmf + //GistId:6f849e51240635a6322ab0460938c922 Document doc = new Document(MyDir + "Document.docx"); RtfSaveOptions saveOptions = new RtfSaveOptions { SaveImagesAsWmf = true }; diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs index 43cbe5892..25a707ca0 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs @@ -269,6 +269,7 @@ public void InsertTableOfContents() public void InsertInlineImage() { //ExStart:InsertInlineImage + //GistId:6f849e51240635a6322ab0460938c922 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -282,6 +283,7 @@ public void InsertInlineImage() public void InsertFloatingImage() { //ExStart:InsertFloatingImage + //GistId:6f849e51240635a6322ab0460938c922 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Images.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Images.cs index a97344cee..4fc392ffb 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Images.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Images.cs @@ -9,11 +9,12 @@ using Aspose.Words; using Aspose.Words.Drawing; using Aspose.Words.Layout; +using Aspose.Words.Saving; using NUnit.Framework; namespace DocsExamples.Programming_with_Documents.Working_with_Graphic_Elements { - internal class WorkingWithImages : DocsExamplesBase + public class WorkingWithImages : DocsExamplesBase { [Test] public void AddImageToEachPage() @@ -86,6 +87,7 @@ public void AddImageToPage(Paragraph para, int page, string imagesDir) public void InsertBarcodeImage() { //ExStart:InsertBarcodeImage + //GistId:6f849e51240635a6322ab0460938c922 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -107,11 +109,12 @@ public void InsertBarcodeImage() // Save the document as a PDF to disk // You can also save this directly to a stream - doc.Save(ArtifactsDir + "InsertBarcodeImage.docx"); + doc.Save(ArtifactsDir + "WorkingWithImages.InsertBarcodeImage.docx"); //ExEnd:InsertBarcodeImage } //ExStart:InsertBarcodeIntoFooter + //GistId:6f849e51240635a6322ab0460938c922 private void InsertBarcodeIntoFooter(DocumentBuilder builder, Section section, HeaderFooterType footerType) { @@ -160,16 +163,55 @@ public void CompressImages() if (count != 1) Console.WriteLine("We expected to have only 1 image resampled in this test document!"); - doc.Save(ArtifactsDir + "CompressImages.docx"); + doc.Save(ArtifactsDir + "WorkingWithImages.CompressImages.docx"); // Verify that the first image was compressed by checking the new PPI. - doc = new Document(ArtifactsDir + "CompressImages.docx"); + doc = new Document(ArtifactsDir + "WorkingWithImages.CompressImages.docx"); Shape shape = (Shape) doc.GetChild(NodeType.Shape, 0, true); double imagePpi = shape.ImageData.ImageSize.WidthPixels / ConvertUtil.PointToInch(shape.SizeInPoints.Width); Debug.Assert(imagePpi < 150, "Image was not resampled successfully."); } + + [Test] + public void CropImages() + { + //ExStart:CropImages + //GistId:6f849e51240635a6322ab0460938c922 + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + + Image img = Image.FromFile(ImagesDir + "Logo.jpg"); + + int effectiveWidth = img.Width - 570; + int effectiveHeight = img.Height - 571; + + Shape croppedImage = builder.InsertImage(img, + ConvertUtil.PixelToPoint(img.Width - effectiveWidth), + ConvertUtil.PixelToPoint(img.Height - effectiveHeight)); + + double widthRatio = croppedImage.Width / ConvertUtil.PixelToPoint(img.Width); + double heightRatio = croppedImage.Height / ConvertUtil.PixelToPoint(img.Height); + + if (widthRatio < 1) + croppedImage.ImageData.CropRight = 1 - widthRatio; + + if (heightRatio < 1) + croppedImage.ImageData.CropBottom = 1 - heightRatio; + + float leftToWidth = (float)124 / img.Width; + float topToHeight = (float)90 / img.Height; + + croppedImage.ImageData.CropLeft = leftToWidth; + croppedImage.ImageData.CropRight = croppedImage.ImageData.CropRight - leftToWidth; + + croppedImage.ImageData.CropTop = topToHeight; + croppedImage.ImageData.CropBottom = croppedImage.ImageData.CropBottom - topToHeight; + + croppedImage.GetShapeRenderer().Save(ArtifactsDir + "WorkingWithImages.CropImages.jpg", new ImageSaveOptions(SaveFormat.Jpeg)); + //ExEnd:CropImages + } } public class Resampler diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs index 6e47ba681..057d03cbc 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs @@ -15,6 +15,7 @@ internal class WorkingWithShapes : DocsExamplesBase public void AddGroupShape() { //ExStart:AddGroupShape + //GistId:072edc4bbb0dd0eebf1f61f610bd8d36 Document doc = new Document(); doc.EnsureMinimum(); From f27ac1105f64e57927dc78059cb7c9507cab7c93 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 24 Jan 2025 17:29:05 +0300 Subject: [PATCH 30/61] Updated "Working with Charts" --- .../Working with Charts.cs | 118 +++++++++++++++--- 1 file changed, 102 insertions(+), 16 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Charts.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Charts.cs index 2f1bdb476..e3cbe3103 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Charts.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Charts.cs @@ -1,4 +1,5 @@ using System; +using System.Drawing; using Aspose.Words; using Aspose.Words.Drawing; using Aspose.Words.Drawing.Charts; @@ -12,6 +13,7 @@ internal class WorkingWithCharts : DocsExamplesBase public void FormatNumberOfDataLabel() { //ExStart:FormatNumberOfDataLabel + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -45,6 +47,7 @@ public void FormatNumberOfDataLabel() public void CreateChartUsingShape() { //ExStart:CreateChartUsingShape + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -68,6 +71,7 @@ public void CreateChartUsingShape() public void InsertSimpleColumnChart() { //ExStart:InsertSimpleColumnChart + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -75,11 +79,12 @@ public void InsertSimpleColumnChart() Shape shape = builder.InsertChart(ChartType.Column, 432, 252); Chart chart = shape.Chart; - //ExStart:ChartSeriesCollection + //ExStart:ChartSeriesCollection + //GistId:23d39c0b874655d7e7354f1ecc122e39 ChartSeriesCollection seriesColl = chart.Series; Console.WriteLine(seriesColl.Count); - //ExEnd:ChartSeriesCollection + //ExEnd:ChartSeriesCollection // Delete default generated series. seriesColl.Clear(); @@ -102,6 +107,7 @@ public void InsertSimpleColumnChart() public void InsertColumnChart() { //ExStart:InsertColumnChart + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -118,6 +124,7 @@ public void InsertColumnChart() public void InsertAreaChart() { //ExStart:InsertAreaChart + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -142,6 +149,7 @@ public void InsertAreaChart() public void InsertBubbleChart() { //ExStart:InsertBubbleChart + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -159,6 +167,7 @@ public void InsertBubbleChart() public void InsertScatterChart() { //ExStart:InsertScatterChart + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -172,9 +181,10 @@ public void InsertScatterChart() } [Test] - public void DefineXYAxisProperties() + public void DefineAxisProperties() { - //ExStart:DefineXYAxisProperties + //ExStart:DefineAxisProperties + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -212,14 +222,15 @@ public void DefineXYAxisProperties() yAxis.Scaling.Minimum = new AxisBound(100); yAxis.Scaling.Maximum = new AxisBound(700); - doc.Save(ArtifactsDir + "WorkingWithCharts.DefineXYAxisProperties.docx"); - //ExEnd:DefineXYAxisProperties + doc.Save(ArtifactsDir + "WorkingWithCharts.DefineAxisProperties.docx"); + //ExEnd:DefineAxisProperties } [Test] public void DateTimeValuesToAxis() { - //ExStart:SetDateTimeValuesToAxis + //ExStart:DateTimeValuesToAxis + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -247,13 +258,14 @@ public void DateTimeValuesToAxis() xAxis.MinorTickMark = AxisTickMark.Outside; doc.Save(ArtifactsDir + "WorkingWithCharts.DateTimeValuesToAxis.docx"); - //ExEnd:SetDateTimeValuesToAxis + //ExEnd:DateTimeValuesToAxis } [Test] public void NumberFormatForAxis() { - //ExStart:SetNumberFormatForAxis + //ExStart:NumberFormatForAxis + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -270,13 +282,14 @@ public void NumberFormatForAxis() chart.AxisY.NumberFormat.FormatCode = "#,##0"; doc.Save(ArtifactsDir + "WorkingWithCharts.NumberFormatForAxis.docx"); - //ExEnd:SetNumberFormatForAxis + //ExEnd:NumberFormatForAxis } [Test] public void BoundsOfAxis() { - //ExStart:SetboundsOfAxis + //ExStart:BoundsOfAxis + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -294,13 +307,14 @@ public void BoundsOfAxis() chart.AxisY.Scaling.Maximum = new AxisBound(6); doc.Save(ArtifactsDir + "WorkingWithCharts.BoundsOfAxis.docx"); - //ExEnd:SetboundsOfAxis + //ExEnd:BoundsOfAxis } [Test] public void IntervalUnitBetweenLabelsOnAxis() { - //ExStart:SetIntervalUnitBetweenLabelsOnAxis + //ExStart:IntervalUnitBetweenLabelsOnAxis + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -317,13 +331,14 @@ public void IntervalUnitBetweenLabelsOnAxis() chart.AxisX.TickLabels.Spacing = 2; doc.Save(ArtifactsDir + "WorkingWithCharts.IntervalUnitBetweenLabelsOnAxis.docx"); - //ExEnd:SetIntervalUnitBetweenLabelsOnAxis + //ExEnd:IntervalUnitBetweenLabelsOnAxis } [Test] public void HideChartAxis() { //ExStart:HideChartAxis + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -347,6 +362,7 @@ public void HideChartAxis() public void TickMultiLineLabelAlignment() { //ExStart:TickMultiLineLabelAlignment + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -364,6 +380,7 @@ public void TickMultiLineLabelAlignment() public void ChartDataLabel() { //ExStart:WorkWithChartDataLabel + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -393,6 +410,7 @@ public void ChartDataLabel() public void DefaultOptionsForDataLabels() { //ExStart:DefaultOptionsForDataLabels + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -420,6 +438,7 @@ public void DefaultOptionsForDataLabels() public void SingleChartDataPoint() { //ExStart:WorkWithSingleChartDataPoint + //GistId:23d39c0b874655d7e7354f1ecc122e39 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -460,6 +479,7 @@ public void SingleChartSeries() Chart chart = shape.Chart; //ExStart:WorkWithSingleChartSeries + //GistId:23d39c0b874655d7e7354f1ecc122e39 ChartSeries series0 = chart.Series[0]; ChartSeries series1 = chart.Series[1]; @@ -471,7 +491,8 @@ public void SingleChartSeries() series1.Smooth = true; //ExEnd:WorkWithSingleChartSeries - //ExStart:ChartDataPoint + //ExStart:ChartDataPoint + //GistId:23d39c0b874655d7e7354f1ecc122e39 // Specifies whether by default the parent element shall inverts its colors if the value is negative. series0.InvertIfNegative = true; @@ -480,9 +501,74 @@ public void SingleChartSeries() series1.Marker.Symbol = MarkerSymbol.Star; series1.Marker.Size = 10; - //ExEnd:ChartDataPoint + //ExEnd:ChartDataPoint doc.Save(ArtifactsDir + "WorkingWithCharts.SingleChartSeries.docx"); } + + [Test] + public void FillFormatting() + { + //ExStart:FillFormatting + //GistId:23d39c0b874655d7e7354f1ecc122e39 + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + + Shape shape = builder.InsertChart(ChartType.Column, 432, 252); + + Chart chart = shape.Chart; + ChartSeriesCollection seriesColl = chart.Series; + + // Delete default generated series. + seriesColl.Clear(); + + // Create category names array. + string[] categories = new string[] { "AW Category 1", "AW Category 2" }; + + // Adding new series. Value and category arrays must be the same size. + ChartSeries series1 = seriesColl.Add("AW Series 1", categories, new double[] { 1, 2 }); + ChartSeries series2 = seriesColl.Add("AW Series 2", categories, new double[] { 3, 4 }); + ChartSeries series3 = seriesColl.Add("AW Series 3", categories, new double[] { 5, 6 }); + + // Set series color. + series1.Format.Fill.ForeColor = Color.Red; + series2.Format.Fill.ForeColor = Color.Yellow; + series3.Format.Fill.ForeColor = Color.Blue; + + doc.Save(ArtifactsDir + "WorkingWithCharts.FillFormatting.docx"); + //ExEnd:FillFormatting + } + + [Test] + public void StrokeFormatting() + { + //ExStart:StrokeFormatting + //GistId:23d39c0b874655d7e7354f1ecc122e39 + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + + Shape shape = builder.InsertChart(ChartType.Line, 432, 252); + + Chart chart = shape.Chart; + ChartSeriesCollection seriesColl = chart.Series; + + // Delete default generated series. + seriesColl.Clear(); + + // Adding new series. + ChartSeries series1 = seriesColl.Add("AW Series 1", new double[] { 0.7, 1.8, 2.6 }, + new double[] { 2.7, 3.2, 0.8 }); + ChartSeries series2 = seriesColl.Add("AW Series 2", new double[] { 0.5, 1.5, 2.5 }, + new double[] { 3, 1, 2 }); + + // Set series color. + series1.Format.Stroke.ForeColor = Color.Red; + series1.Format.Stroke.Weight = 5; + series2.Format.Stroke.ForeColor = Color.LightGreen; + series2.Format.Stroke.Weight = 5; + + doc.Save(ArtifactsDir + "WorkingWithCharts.StrokeFormatting.docx"); + //ExEnd:StrokeFormatting + } } } From 5f2be46b5ce5f7a713343e9c6f532a0821f15103 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 27 Jan 2025 10:35:47 +0300 Subject: [PATCH 31/61] Updated "Working with OfficeMath" --- .../Programming with Documents/Working with Fields.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index ad7bb30b7..ff37edc3b 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -50,14 +50,15 @@ public void ChangeFieldUpdateCultureSource() [Test] public void SpecifyLocaleAtFieldLevel() { - //ExStart:SpecifylocaleAtFieldlevel + //ExStart:SpecifyLocaleAtFieldLevel + //GistId:e19d5874b376b07466fd7a397d554648 DocumentBuilder builder = new DocumentBuilder(); Field field = builder.InsertField(FieldType.FieldDate, true); field.LocaleId = 1049; - builder.Document.Save(ArtifactsDir + "WorkingWithFields.SpecifylocaleAtFieldlevel.docx"); - //ExEnd:SpecifylocaleAtFieldlevel + builder.Document.Save(ArtifactsDir + "WorkingWithFields.SpecifyLocaleAtFieldLevel.docx"); + //ExEnd:SpecifyLocaleAtFieldLevel } [Test] From 8c1c6595122d757735b1c3702e060bea94c58281 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 27 Jan 2025 10:51:52 +0300 Subject: [PATCH 32/61] Updated "Working with SmartArt" --- .../Working with Graphic Elements/Working with Shapes.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs index 057d03cbc..8b39526a4 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Shapes.cs @@ -205,6 +205,7 @@ public void UpdateSmartArtDrawing() Document doc = new Document(MyDir + "SmartArt.docx"); //ExStart:UpdateSmartArtDrawing + //GistId:683cdbe52b97598d9d4ee4695b4f83c9 foreach (Shape shape in doc.GetChildNodes(NodeType.Shape, true)) if (shape.HasSmartArt) shape.UpdateSmartArtDrawing(); From a7fac4f44d126495c0ab2efa4755f2ce46822e62 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 27 Jan 2025 17:58:55 +0300 Subject: [PATCH 33/61] Updated "Working with watermark" --- .../Working with Watermark.cs | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Watermark.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Watermark.cs index 7f7eac5ca..0ddfb6a4b 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Watermark.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with Watermark.cs @@ -8,9 +8,10 @@ namespace DocsExamples.Programming_with_Documents.Working_with_Graphic_Elements internal class WorkWithWatermark : DocsExamplesBase { [Test] - public void AddTextWatermarkWithSpecificOptions() + public void AddTextWatermark() { - //ExStart:AddTextWatermarkWithSpecificOptions + //ExStart:AddTextWatermark + //GistId:1f690a31c188a851d80d7aed4ff7e44c Document doc = new Document(MyDir + "Document.docx"); TextWatermarkOptions options = new TextWatermarkOptions() @@ -24,15 +25,16 @@ public void AddTextWatermarkWithSpecificOptions() doc.Watermark.SetText("Test", options); - doc.Save(ArtifactsDir + "WorkWithWatermark.AddTextWatermarkWithSpecificOptions.docx"); - //ExEnd:AddTextWatermarkWithSpecificOptions + doc.Save(ArtifactsDir + "WorkWithWatermark.AddTextWatermark.docx"); + //ExEnd:AddTextWatermark } #if NET48 [Test] - public void AddImageWatermarkWithSpecificOptions() + public void AddImageWatermark() { - //ExStart:AddImageWatermarkWithSpecificOptions + //ExStart:AddImageWatermark + //GistId:1f690a31c188a851d80d7aed4ff7e44c Document doc = new Document(MyDir + "Document.docx"); ImageWatermarkOptions options = new ImageWatermarkOptions @@ -44,13 +46,14 @@ public void AddImageWatermarkWithSpecificOptions() doc.Watermark.SetImage(Image.FromFile(ImagesDir + "Transparent background logo.png"), options); doc.Save(ArtifactsDir + "WorkWithWatermark.AddImageWatermark.docx"); - //ExEnd:AddImageWatermarkWithSpecificOptions + //ExEnd:AddImageWatermark } [Test] - public void RemoveWatermarkFromDocument() + public void RemoveDocumentWatermark() { - //ExStart:RemoveWatermarkFromDocument + //ExStart:RemoveDocumentWatermark + //GistId:1f690a31c188a851d80d7aed4ff7e44c Document doc = new Document(); // Add a plain text watermark. @@ -73,12 +76,13 @@ public void RemoveWatermarkFromDocument() if (doc.Watermark.Type == WatermarkType.Text) doc.Watermark.Remove(); - doc.Save(ArtifactsDir + "WorkWithWatermark.RemoveWatermarkFromDocument.docx"); - //ExEnd:RemoveWatermarkFromDocument + doc.Save(ArtifactsDir + "WorkWithWatermark.RemoveDocumentWatermark.docx"); + //ExEnd:RemoveDocumentWatermark } #endif - //ExStart:AddWatermark + //ExStart:AddDocumentWatermark + //GistId:1f690a31c188a851d80d7aed4ff7e44c [Test] public void AddAndRemoveWatermark() { @@ -87,7 +91,7 @@ public void AddAndRemoveWatermark() InsertWatermarkText(doc, "CONFIDENTIAL"); doc.Save(ArtifactsDir + "WorkWithWatermark.AddWatermark.docx"); - RemoveWatermarkText(doc); + RemoveWatermarkShape(doc); doc.Save(ArtifactsDir + "WorkWithWatermark.RemoveWatermark.docx"); } @@ -98,8 +102,11 @@ public void AddAndRemoveWatermark() /// Text of the watermark. private void InsertWatermarkText(Document doc, string watermarkText) { + //ExStart:SetShapeName + //GistId:1f690a31c188a851d80d7aed4ff7e44c // Create a watermark shape, this will be a WordArt shape. Shape watermark = new Shape(doc, ShapeType.TextPlainText) { Name = "Watermark" }; + //ExEnd:SetShapeName watermark.TextPath.Text = watermarkText; watermark.TextPath.FontFamily = "Arial"; @@ -150,22 +157,23 @@ private void InsertWatermarkIntoHeader(Paragraph watermarkPara, Section sect, // Insert a clone of the watermark into the header. header.AppendChild(watermarkPara.Clone(true)); } - //ExEnd:AddWatermark - - //ExStart:RemoveWatermark - private void RemoveWatermarkText(Document doc) + //ExEnd:AddDocumentWatermark + + //ExStart:RemoveWatermarkShape + //GistId:1f690a31c188a851d80d7aed4ff7e44c + private void RemoveWatermarkShape(Document doc) { foreach (HeaderFooter hf in doc.GetChildNodes(NodeType.HeaderFooter, true)) { foreach (Shape shape in hf.GetChildNodes(NodeType.Shape, true)) { - if (shape.Name.Contains("WaterMark")) + if (shape.Name.Contains("Watermark")) { shape.Remove(); } } } } - //ExEnd:RemoveWatermark + //ExEnd:RemoveWatermarkShape } } From 7c6ffbb09e4baf099714e30b3932ca85db2a1751 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 28 Jan 2025 13:00:33 +0300 Subject: [PATCH 34/61] Updated "Working with OLE" --- .../Working with OleObjects and ActiveX.cs | 64 ++++++++++++++++--- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with OleObjects and ActiveX.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with OleObjects and ActiveX.cs index 7546f5a22..7cf51ee2d 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with OleObjects and ActiveX.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with OleObjects and ActiveX.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Runtime.InteropServices.ComTypes; using Aspose.Words; using Aspose.Words.Drawing; using Aspose.Words.Drawing.Ole; @@ -12,20 +13,22 @@ class WorkingWithOleObjectsAndActiveX : DocsExamplesBase [Test] public void InsertOleObject() { - //ExStart:DocumentBuilderInsertOleObject + //ExStart:InsertOleObject + //GistId:4996b573cf231d9f66ab0d1f3f981222 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.InsertOleObject("http://www.aspose.com", "htmlfile", true, true, null); doc.Save(ArtifactsDir + "WorkingWithOleObjectsAndActiveX.InsertOleObject.docx"); - //ExEnd:DocumentBuilderInsertOleObject + //ExEnd:InsertOleObject } [Test] public void InsertOleObjectWithOlePackage() { //ExStart:InsertOleObjectwithOlePackage + //GistId:4996b573cf231d9f66ab0d1f3f981222 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -41,16 +44,18 @@ public void InsertOleObjectWithOlePackage() } //ExEnd:InsertOleObjectwithOlePackage - //ExStart:GetAccessToOLEObjectRawData + //ExStart:GetAccessToOleObjectRawData + //GistId:4996b573cf231d9f66ab0d1f3f981222 Shape oleShape = (Shape) doc.GetChild(NodeType.Shape, 0, true); byte[] oleRawData = oleShape.OleFormat.GetRawData(); - //ExEnd:GetAccessToOLEObjectRawData + //ExEnd:GetAccessToOleObjectRawData } [Test] public void InsertOleObjectAsIcon() { - //ExStart:InsertOLEObjectAsIcon + //ExStart:InsertOleObjectAsIcon + //GistId:4996b573cf231d9f66ab0d1f3f981222 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -58,13 +63,14 @@ public void InsertOleObjectAsIcon() "My embedded file"); doc.Save(ArtifactsDir + "WorkingWithOleObjectsAndActiveX.InsertOleObjectAsIcon.docx"); - //ExEnd:InsertOLEObjectAsIcon + //ExEnd:InsertOleObjectAsIcon } [Test] public void InsertOleObjectAsIconUsingStream() { - //ExStart:InsertOLEObjectAsIconUsingStream + //ExStart:InsertOleObjectAsIconUsingStream + //GistId:4996b573cf231d9f66ab0d1f3f981222 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -72,7 +78,7 @@ public void InsertOleObjectAsIconUsingStream() builder.InsertOleObjectAsIcon(stream, "Package", ImagesDir + "Logo icon.ico", "My embedded file"); doc.Save(ArtifactsDir + "WorkingWithOleObjectsAndActiveX.InsertOleObjectAsIconUsingStream.docx"); - //ExEnd:InsertOLEObjectAsIconUsingStream + //ExEnd:InsertOleObjectAsIconUsingStream } [Test] @@ -105,5 +111,47 @@ public void ReadActiveXControlProperties() properties = properties + "\nTotal ActiveX Controls found: " + doc.GetChildNodes(NodeType.Shape, true).Count; Console.WriteLine("\n" + properties); } + + [Test] + public void InsertOnlineVideo() + { + //ExStart:InsertOnlineVideo + //GistId:4996b573cf231d9f66ab0d1f3f981222 + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + + string url = "https://youtu.be/t_1LYZ102RA"; + double width = 360; + double height = 270; + + Shape shape = builder.InsertOnlineVideo(url, width, height); + + doc.Save(ArtifactsDir + "WorkingWithOleObjectsAndActiveX.InsertOnlineVideo.docx"); + //ExEnd:InsertOnlineVideo + } + + [Test] + public void InsertOnlineVideoWithEmbedHtml() + { + //ExStart:InsertOnlineVideoWithEmbedHtml + //GistId:4996b573cf231d9f66ab0d1f3f981222 + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + + double width = 360; + double height = 270; + + string videoUrl = "https://vimeo.com/52477838"; + string videoEmbedCode = + ""; + + byte[] thumbnailImageBytes = File.ReadAllBytes(ImagesDir + "Logo.jpg"); + + builder.InsertOnlineVideo(videoUrl, videoEmbedCode, thumbnailImageBytes, width, height); + + doc.Save(ArtifactsDir + "WorkingWithOleObjectsAndActiveX.InsertOnlineVideoWithEmbedHtml.docx"); + //ExEnd:InsertOnlineVideoWithEmbedHtml + } } } \ No newline at end of file From a19c262fcd23b83a43f78d09b03864e210e25635 Mon Sep 17 00:00:00 2001 From: KotovDE <40274062+KotovDE@users.noreply.github.com> Date: Tue, 28 Jan 2025 17:13:37 +0700 Subject: [PATCH 35/61] updated examples for correct porting to python (#375) --- Examples/ApiExamples/ApiExamples/ExAI.cs | 8 +++--- Examples/ApiExamples/ApiExamples/ExComment.cs | 4 +-- .../ApiExamples/ApiExamples/ExDocument.cs | 4 +-- .../ApiExamples/ApiExamples/ExDocumentBase.cs | 2 +- Examples/ApiExamples/ApiExamples/ExField.cs | 6 ++--- .../ApiExamples/ApiExamples/ExFontSettings.cs | 4 +-- Examples/ApiExamples/ApiExamples/ExLists.cs | 26 +++++++++---------- Examples/ApiExamples/ApiExamples/ExShape.cs | 4 --- 8 files changed, 27 insertions(+), 31 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ExAI.cs b/Examples/ApiExamples/ApiExamples/ExAI.cs index 5a18525f8..cc5ae9cd4 100644 --- a/Examples/ApiExamples/ApiExamples/ExAI.cs +++ b/Examples/ApiExamples/ApiExamples/ExAI.cs @@ -60,9 +60,9 @@ public void AiTranslate() { //ExStart:AiTranslate //GistId:695136dbbe4f541a8a0a17b3d3468689 - //ExFor:IAiModelText.Translate(Document, AI.Language) - //ExFor:AI.Language - //ExSummary:Shows how to translate text using Google models. + //ExFor:IAiModelText.Translate(Document, AI.Language) + //ExFor:AI.Language + //ExSummary:Shows how to translate text using Google models. Document doc = new Document(MyDir + "Document.docx"); string apiKey = Environment.GetEnvironmentVariable("API_KEY"); @@ -86,7 +86,7 @@ public void AiGrammar() string apiKey = Environment.GetEnvironmentVariable("API_KEY"); // Use OpenAI generative language models. - IAiModelText model = (IAiModelText)AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey); + IAiModelText model = (OpenAiModel)AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey); CheckGrammarOptions grammarOptions = new CheckGrammarOptions(); grammarOptions.ImproveStylistics = true; diff --git a/Examples/ApiExamples/ApiExamples/ExComment.cs b/Examples/ApiExamples/ApiExamples/ExComment.cs index deccca7ad..cb4164a63 100644 --- a/Examples/ApiExamples/ApiExamples/ExComment.cs +++ b/Examples/ApiExamples/ApiExamples/ExComment.cs @@ -77,7 +77,7 @@ public void PrintAllComments() // If a comment has no ancestor, it is a "top-level" comment as opposed to a reply-type comment. // Print all top-level comments along with any replies they may have. - foreach (Comment comment in comments.OfType().Where(c => c.Ancestor == null)) + foreach (Comment comment in comments.OfType().Where(c => c.Ancestor == null).ToList()) { Console.WriteLine("Top-level comment:"); Console.WriteLine($"\t\"{comment.GetText().Trim()}\", by {comment.Author}"); @@ -219,7 +219,7 @@ private static void PrintAllCommentInfo(NodeCollection comments) CommentInfoPrinter commentVisitor = new CommentInfoPrinter(); // Iterate over all top-level comments. Unlike reply-type comments, top-level comments have no ancestor. - foreach (Comment comment in comments.Where(c => ((Comment)c).Ancestor == null)) + foreach (Comment comment in comments.Where(c => ((Comment)c).Ancestor == null).ToList()) { // First, visit the start of the comment range. CommentRangeStart commentRangeStart = (CommentRangeStart)comment.PreviousSibling.PreviousSibling.PreviousSibling; diff --git a/Examples/ApiExamples/ApiExamples/ExDocument.cs b/Examples/ApiExamples/ApiExamples/ExDocument.cs index 2dd82ce1b..1fc16e457 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocument.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocument.cs @@ -548,8 +548,8 @@ public void AppendDocument() string outDocText = new Document(ArtifactsDir + "Document.AppendDocument.docx").GetText(); - Assert.True(outDocText.StartsWith(dstDoc.GetText(), StringComparison.Ordinal)); - Assert.True(outDocText.EndsWith(srcDoc.GetText(), StringComparison.Ordinal)); + Assert.True(outDocText.StartsWith(dstDoc.GetText())); + Assert.True(outDocText.EndsWith(srcDoc.GetText())); } [Test] diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs b/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs index 663bce3bb..1d62a0f80 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs @@ -77,7 +77,7 @@ public void ImportNode() // Every node has a parent document, which is the document that contains the node. // Inserting a node into a document that the node does not belong to will throw an exception. Assert.AreNotEqual(dstDoc, srcDoc.FirstSection.Document); - Assert.Throws(() => { dstDoc.AppendChild(srcDoc.FirstSection); }); + Assert.Throws(() => dstDoc.AppendChild(srcDoc.FirstSection)); // Use the ImportNode method to create a copy of a node, which will have the document // that called the ImportNode method set as its new owner document. diff --git a/Examples/ApiExamples/ApiExamples/ExField.cs b/Examples/ApiExamples/ApiExamples/ExField.cs index 69535adcb..a1448efd2 100644 --- a/Examples/ApiExamples/ApiExamples/ExField.cs +++ b/Examples/ApiExamples/ApiExamples/ExField.cs @@ -1401,7 +1401,7 @@ public void FieldAutoNumLgl() // has reset the count for this level so that this field will display "2.2.1.". InsertNumberedClause(builder, "\tHeading 6", fillerText, StyleIdentifier.Heading3); - foreach (FieldAutoNumLgl field in doc.Range.Fields.Where(f => f.Type == FieldType.FieldAutoNumLegal)) + foreach (FieldAutoNumLgl field in doc.Range.Fields.Where(f => f.Type == FieldType.FieldAutoNumLegal).ToList()) { // The separator character, which appears in the field result immediately after the number, // is a full stop by default. If we leave this property null, @@ -1440,7 +1440,7 @@ private void TestFieldAutoNumLgl(Document doc) { doc = DocumentHelper.SaveOpen(doc); - foreach (FieldAutoNumLgl field in doc.Range.Fields.Where(f => f.Type == FieldType.FieldAutoNumLegal)) + foreach (FieldAutoNumLgl field in doc.Range.Fields.Where(f => f.Type == FieldType.FieldAutoNumLegal).ToList()) { TestUtil.VerifyField(FieldType.FieldAutoNumLegal, " AUTONUMLGL \\s : \\e", string.Empty, field); @@ -1471,7 +1471,7 @@ public void FieldAutoNumOut() builder.InsertField(FieldType.FieldAutoNumOutline, true); builder.Writeln("\tParagraph 2."); - foreach (FieldAutoNumOut field in doc.Range.Fields.Where(f => f.Type == FieldType.FieldAutoNumOutline)) + foreach (FieldAutoNumOut field in doc.Range.Fields.Where(f => f.Type == FieldType.FieldAutoNumOutline).ToList()) Assert.AreEqual(" AUTONUMOUT ", field.GetFieldCode()); doc.Save(ArtifactsDir + "Field.AUTONUMOUT.docx"); diff --git a/Examples/ApiExamples/ApiExamples/ExFontSettings.cs b/Examples/ApiExamples/ApiExamples/ExFontSettings.cs index 7549812f8..c8cb39f82 100644 --- a/Examples/ApiExamples/ApiExamples/ExFontSettings.cs +++ b/Examples/ApiExamples/ApiExamples/ExFontSettings.cs @@ -170,7 +170,7 @@ public void SubstitutionWarning() Assert.True(callback.FontSubstitutionWarnings[0].WarningType == WarningType.FontSubstitution); Assert.True(callback.FontSubstitutionWarnings[0].Description .Equals( - "Font 'Times New Roman' has not been found. Using 'Fanwood' font instead. Reason: first available font.", StringComparison.Ordinal)); + "Font 'Times New Roman' has not been found. Using 'Fanwood' font instead. Reason: first available font.")); } private class FontSubstitutionWarningCollector : IWarningCallback @@ -303,7 +303,7 @@ public void SubstitutionWarningsClosestMatch() Assert.True(callback.FontWarnings[0].Description .Equals( - "Font \'SymbolPS\' has not been found. Using \'Wingdings\' font instead. Reason: font info substitution.", StringComparison.Ordinal)); + "Font \'SymbolPS\' has not been found. Using \'Wingdings\' font instead. Reason: font info substitution.")); } [Test] diff --git a/Examples/ApiExamples/ApiExamples/ExLists.cs b/Examples/ApiExamples/ApiExamples/ExLists.cs index 85657f634..404da51af 100644 --- a/Examples/ApiExamples/ApiExamples/ExLists.cs +++ b/Examples/ApiExamples/ApiExamples/ExLists.cs @@ -517,7 +517,7 @@ public void DetectBulletedParagraphs() NodeCollection paras = doc.GetChildNodes(NodeType.Paragraph, true); - foreach (Paragraph para in paras.OfType().Where(p => p.ListFormat.IsListItem)) + foreach (Paragraph para in paras.OfType().Where(p => p.ListFormat.IsListItem).ToList()) { Console.WriteLine($"This paragraph belongs to list ID# {para.ListFormat.List.ListId}, number style \"{para.ListFormat.ListLevel.NumberStyle}\""); Console.WriteLine($"\t\"{para.GetText().Trim()}\""); @@ -527,7 +527,7 @@ public void DetectBulletedParagraphs() doc = DocumentHelper.SaveOpen(doc); paras = doc.GetChildNodes(NodeType.Paragraph, true); - Assert.AreEqual(6, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); + Assert.AreEqual(6, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); } [Test] @@ -546,12 +546,12 @@ public void RemoveBulletsFromParagraphs() builder.ListFormat.RemoveNumbers(); NodeCollection paras = doc.GetChildNodes(NodeType.Paragraph, true); - Assert.AreEqual(3, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); + Assert.AreEqual(3, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); foreach (Paragraph paragraph in paras) paragraph.ListFormat.RemoveNumbers(); - Assert.AreEqual(0, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); + Assert.AreEqual(0, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); //ExEnd } @@ -570,7 +570,7 @@ public void ApplyExistingListToParagraphs() NodeCollection paras = doc.GetChildNodes(NodeType.Paragraph, true); - Assert.AreEqual(0, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); + Assert.AreEqual(0, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); doc.Lists.Add(ListTemplate.NumberDefault); List list = doc.Lists[0]; @@ -581,14 +581,14 @@ public void ApplyExistingListToParagraphs() paragraph.ListFormat.ListLevelNumber = 2; } - Assert.AreEqual(3, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); + Assert.AreEqual(3, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); //ExEnd doc = DocumentHelper.SaveOpen(doc); paras = doc.GetChildNodes(NodeType.Paragraph, true); - Assert.AreEqual(3, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); - Assert.AreEqual(3, paras.Count(n => (n as Paragraph).ListFormat.ListLevelNumber == 2)); + Assert.AreEqual(3, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); + Assert.AreEqual(3, paras.Count(n => ((Paragraph)n).ListFormat.ListLevelNumber == 2)); } [Test] @@ -606,7 +606,7 @@ public void ApplyNewListToParagraphs() NodeCollection paras = doc.GetChildNodes(NodeType.Paragraph, true); - Assert.AreEqual(0, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); + Assert.AreEqual(0, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); List list = doc.Lists.Add(ListTemplate.NumberUppercaseLetterDot); @@ -616,14 +616,14 @@ public void ApplyNewListToParagraphs() paragraph.ListFormat.ListLevelNumber = 1; } - Assert.AreEqual(3, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); + Assert.AreEqual(3, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); //ExEnd doc = DocumentHelper.SaveOpen(doc); paras = doc.GetChildNodes(NodeType.Paragraph, true); - Assert.AreEqual(3, paras.Count(n => (n as Paragraph).ListFormat.IsListItem)); - Assert.AreEqual(3, paras.Count(n => (n as Paragraph).ListFormat.ListLevelNumber == 1)); + Assert.AreEqual(3, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); + Assert.AreEqual(3, paras.Count(n => ((Paragraph)n).ListFormat.ListLevelNumber == 1)); } //ExStart @@ -904,7 +904,7 @@ public void GetListLabels() // Find if we have the paragraph list. In our document, our list uses plain Arabic numbers, // which start at three and ends at six. - foreach (Paragraph paragraph in paras.OfType().Where(p => p.ListFormat.IsListItem)) + foreach (Paragraph paragraph in paras.OfType().Where(p => p.ListFormat.IsListItem).ToList()) { Console.WriteLine($"List item paragraph #{paras.IndexOf(paragraph)}"); diff --git a/Examples/ApiExamples/ApiExamples/ExShape.cs b/Examples/ApiExamples/ApiExamples/ExShape.cs index 7062b5199..6392c0b78 100644 --- a/Examples/ApiExamples/ApiExamples/ExShape.cs +++ b/Examples/ApiExamples/ApiExamples/ExShape.cs @@ -1253,9 +1253,6 @@ public void LinkedChartSourceFullName() var sourceFullName = shape.Chart.SourceFullName; Assert.True(sourceFullName.Contains("Examples\\Data\\Spreadsheet.xlsx")); - - sourceFullName = "D:\\Documents\\ChartData.xlsx"; - Assert.True(sourceFullName.Equals("D:\\Documents\\ChartData.xlsx", StringComparison.Ordinal)); //ExEnd } @@ -2329,7 +2326,6 @@ public void CreateLinkBetweenTextBoxes() // Break the forward link between textBox2 and textBox3, and then verify that they are no longer linked. textBox3.Previous.BreakForwardLink(); - Assert.IsTrue(textBox2.Next == null); Assert.IsTrue(textBox3.Previous == null); } From 5ffc37d63f5052bf9b5d400c86ea8c6b08ecb47d Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 28 Jan 2025 15:48:34 +0300 Subject: [PATCH 36/61] Updated "Fields Overview" --- .../Programming with Documents/Working with Fields.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index ff37edc3b..04219e74c 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -1,7 +1,6 @@ using System; using System.Globalization; using System.Linq; -using System.Runtime.InteropServices.ComTypes; using System.Threading; using Aspose.Words; using Aspose.Words.Fields; @@ -27,6 +26,7 @@ public void FieldCode() public void ChangeFieldUpdateCultureSource() { //ExStart:ChangeFieldUpdateCultureSource + //GistId:9e90defe4a7bcafb004f73a2ef236986 //ExStart:DocumentBuilderInsertField Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -569,6 +569,7 @@ public void ConvertFieldsInBody() public void ChangeLocale() { //ExStart:ChangeLocale + //GistId:9e90defe4a7bcafb004f73a2ef236986 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); From 9e48ff2ccbaea3bf7ded17321cd0fec0d2e119d0 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 28 Jan 2025 16:05:07 +0300 Subject: [PATCH 37/61] Updated "Insert Fields" --- .../Working with Fields.cs | 57 ++++++++++++------- .../Working with OfficeMath.cs | 1 + 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index 04219e74c..fb34937c7 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -51,7 +51,7 @@ public void ChangeFieldUpdateCultureSource() public void SpecifyLocaleAtFieldLevel() { //ExStart:SpecifyLocaleAtFieldLevel - //GistId:e19d5874b376b07466fd7a397d554648 + //GistId:1cf07762df56f15067d6aef90b14b3db DocumentBuilder builder = new DocumentBuilder(); Field field = builder.InsertField(FieldType.FieldDate, true); @@ -131,9 +131,10 @@ public void UnlinkFields() } [Test] - public void InsertTOAFieldWithoutDocumentBuilder() + public void InsertToaFieldWithoutDocumentBuilder() { - //ExStart:InsertTOAFieldWithoutDocumentBuilder + //ExStart:InsertToaFieldWithoutDocumentBuilder + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); Paragraph para = new Paragraph(doc); @@ -155,14 +156,15 @@ public void InsertTOAFieldWithoutDocumentBuilder() fieldToa.Update(); - doc.Save(ArtifactsDir + "WorkingWithFields.InsertTOAFieldWithoutDocumentBuilder.docx"); - //ExEnd:InsertTOAFieldWithoutDocumentBuilder + doc.Save(ArtifactsDir + "WorkingWithFields.InsertToaFieldWithoutDocumentBuilder.docx"); + //ExEnd:InsertToaFieldWithoutDocumentBuilder } [Test] public void InsertNestedFields() { //ExStart:InsertNestedFields + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -187,9 +189,10 @@ public void InsertNestedFields() } [Test] - public void InsertMergeFieldUsingDOM() + public void InsertMergeFieldUsingDom() { - //ExStart:InsertMergeFieldUsingDOM + //ExStart:InsertMergeFieldUsingDom + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -212,14 +215,15 @@ public void InsertMergeFieldUsingDOM() field.Update(); - doc.Save(ArtifactsDir + "WorkingWithFields.InsertMergeFieldUsingDOM.docx"); - //ExEnd:InsertMergeFieldUsingDOM + doc.Save(ArtifactsDir + "WorkingWithFields.InsertMergeFieldUsingDom.docx"); + //ExEnd:InsertMergeFieldUsingDom } [Test] - public void InsertMailMergeAddressBlockFieldUsingDOM() + public void InsertAddressBlockFieldUsingDom() { - //ExStart:InsertMailMergeAddressBlockFieldUsingDOM + //ExStart:InsertAddressBlockFieldUsingDom + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -242,14 +246,15 @@ public void InsertMailMergeAddressBlockFieldUsingDOM() field.Update(); - doc.Save(ArtifactsDir + "WorkingWithFields.InsertMailMergeAddressBlockFieldUsingDOM.docx"); - //ExEnd:InsertMailMergeAddressBlockFieldUsingDOM + doc.Save(ArtifactsDir + "WorkingWithFields.InsertAddressBlockFieldUsingDom.docx"); + //ExEnd:InsertAddressBlockFieldUsingDom } [Test] public void InsertFieldIncludeTextWithoutDocumentBuilder() { //ExStart:InsertFieldIncludeTextWithoutDocumentBuilder + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); Paragraph para = new Paragraph(doc); @@ -272,6 +277,7 @@ public void InsertFieldIncludeTextWithoutDocumentBuilder() public void InsertFieldNone() { //ExStart:InsertFieldNone + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -285,6 +291,7 @@ public void InsertFieldNone() public void InsertField() { //ExStart:InsertField + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -297,6 +304,8 @@ public void InsertField() [Test] public void InsertFieldUsingFieldBuilder() { + //ExStart:InsertFieldUsingFieldBuilder + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); // Prepare IF field with two nested MERGEFIELD fields: { IF "left expression" = "right expression" "Firstname: { MERGEFIELD firstname }" "Lastname: { MERGEFIELD lastname }"} @@ -313,17 +322,19 @@ public void InsertFieldUsingFieldBuilder() .AddText("Lastname: ") .AddField(new FieldBuilder(FieldType.FieldMergeField).AddArgument("lastname"))); - // Insert IF field in exact location + // Insert IF field in exact location Field field = fieldBuilder.BuildAndInsert(doc.FirstSection.Body.FirstParagraph); field.Update(); doc.Save(ArtifactsDir + "Field.InsertFieldUsingFieldBuilder.docx"); + //ExEnd:InsertFieldUsingFieldBuilder } [Test] public void InsertAuthorField() { //ExStart:InsertAuthorField + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); Paragraph para = (Paragraph) doc.GetChild(NodeType.Paragraph, 0, true); @@ -340,9 +351,10 @@ public void InsertAuthorField() } [Test] - public void InsertASKFieldWithOutDocumentBuilder() + public void InsertAskFieldWithoutDocumentBuilder() { - //ExStart:InsertASKFieldWithOutDocumentBuilder + //ExStart:InsertAskFieldWithoutDocumentBuilder + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); Paragraph para = (Paragraph) doc.GetChild(NodeType.Paragraph, 0, true); @@ -360,14 +372,15 @@ public void InsertASKFieldWithOutDocumentBuilder() field.Update(); - doc.Save(ArtifactsDir + "WorkingWithFields.InsertASKFieldWithOutDocumentBuilder.docx"); - //ExEnd:InsertASKFieldWithOutDocumentBuilder + doc.Save(ArtifactsDir + "WorkingWithFields.InsertAskFieldWithoutDocumentBuilder.docx"); + //ExEnd:InsertAskFieldWithoutDocumentBuilder } [Test] - public void InsertAdvanceFieldWithOutDocumentBuilder() + public void InsertAdvanceFieldWithoutDocumentBuilder() { - //ExStart:InsertAdvanceFieldWithOutDocumentBuilder + //ExStart:InsertAdvanceFieldWithoutDocumentBuilder + //GistId:1cf07762df56f15067d6aef90b14b3db Document doc = new Document(); Paragraph para = (Paragraph) doc.GetChild(NodeType.Paragraph, 0, true); @@ -389,8 +402,8 @@ public void InsertAdvanceFieldWithOutDocumentBuilder() field.Update(); - doc.Save(ArtifactsDir + "WorkingWithFields.InsertAdvanceFieldWithOutDocumentBuilder.docx"); - //ExEnd:InsertAdvanceFieldWithOutDocumentBuilder + doc.Save(ArtifactsDir + "WorkingWithFields.InsertAdvanceFieldWithoutDocumentBuilder.docx"); + //ExEnd:InsertAdvanceFieldWithoutDocumentBuilder } [Test] diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with OfficeMath.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with OfficeMath.cs index 5360491ad..6c90484f1 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with OfficeMath.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Graphic Elements/Working with OfficeMath.cs @@ -10,6 +10,7 @@ internal class WorkingWithOfficeMath : DocsExamplesBase public void MathEquations() { //ExStart:MathEquations + //GistId:e19d5874b376b07466fd7a397d554648 Document doc = new Document(MyDir + "Office math.docx"); OfficeMath officeMath = (OfficeMath) doc.GetChild(NodeType.OfficeMath, 0, true); From 9bb9ae8f794958417b4161987a60107e4e37eb04 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 28 Jan 2025 16:16:41 +0300 Subject: [PATCH 38/61] Updated "Field Properties" --- .../Programming with Documents/Working with Fields.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index fb34937c7..3f8142800 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -13,6 +13,8 @@ internal class WorkingWithFields : DocsExamplesBase [Test] public void FieldCode() { + //ExStart:FieldCode + //GistId:7c2b7b650a88375b1d438746f78f0d64 Document doc = new Document(MyDir + "Hyperlinks.docx"); foreach (Field field in doc.Range.Fields) @@ -20,6 +22,7 @@ public void FieldCode() string fieldCode = field.GetFieldCode(); string fieldResult = field.Result; } + //ExEnd:FieldCode } [Test] From acdb0ab2cacb4325762c9062ab68bf64cea6ea22 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 28 Jan 2025 16:53:05 +0300 Subject: [PATCH 39/61] Updated "Customize Field Properties" --- .../Programming with Documents/Working with Fields.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index 3f8142800..29d3794bf 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -93,6 +93,7 @@ public void ReplaceHyperlinks() public void RenameMergeFields() { //ExStart:RenameMergeFields + //GistId:bf0f8a6b40b69a5274ab3553315e147f Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -515,6 +516,7 @@ public CultureInfo GetCulture(string name, Field field) public void FieldDisplayResults() { //ExStart:FieldDisplayResults + //GistId:bf0f8a6b40b69a5274ab3553315e147f //ExStart:UpdateDocFields Document document = new Document(MyDir + "Various fields.docx"); From 7aa12071244b8a80565b57d67fdb6e42a4125f63 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 28 Jan 2025 16:59:56 +0300 Subject: [PATCH 40/61] Updated "Update Fields" --- .../Load Options/Working with LoadOptions.cs | 1 + .../Programming with Documents/Working with Fields.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs index 902b08bdd..6f93bcfb2 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs @@ -15,6 +15,7 @@ public class WorkingWithLoadOptions : DocsExamplesBase public void UpdateDirtyFields() { //ExStart:UpdateDirtyFields + //GistId:08db64c4d86842c4afd1ecb925ed07c4 LoadOptions loadOptions = new LoadOptions { UpdateDirtyFields = true }; Document doc = new Document(MyDir + "Dirty field.docx", loadOptions); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index 29d3794bf..ada138059 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -518,6 +518,7 @@ public void FieldDisplayResults() //ExStart:FieldDisplayResults //GistId:bf0f8a6b40b69a5274ab3553315e147f //ExStart:UpdateDocFields + //GistId:08db64c4d86842c4afd1ecb925ed07c4 Document document = new Document(MyDir + "Various fields.docx"); document.UpdateFields(); From 609f2d399e2349e365cfde13634e58ca21f5ea50 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 29 Jan 2025 10:19:25 +0300 Subject: [PATCH 41/61] Updated "Remove Fields" --- .../Load Options/Working with LoadOptions.cs | 1 - .../Programming with Documents/Working with Fields.cs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs index 6f93bcfb2..881bd59b9 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs @@ -1,5 +1,4 @@ using System; -using System.Drawing; using System.Text; using Aspose.Words; using Aspose.Words.Loading; diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index ada138059..080d436fb 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -118,6 +118,7 @@ public void RenameMergeFields() public void RemoveField() { //ExStart:RemoveField + //GistId:8c604665c1b97795df7a1e665f6b44ce Document doc = new Document(MyDir + "Various fields.docx"); Field field = doc.Range.Fields[0]; From 79e0a4640784e622ea8e9b0924d7f688973b6a23 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 29 Jan 2025 13:46:48 +0300 Subject: [PATCH 42/61] Updated "Replace Fields" --- .../Working with Fields.cs | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index 080d436fb..511c9b4d0 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -130,6 +130,7 @@ public void RemoveField() public void UnlinkFields() { //ExStart:UnlinkFields + //GistId:f3592014d179ecb43905e37b2a68bc92 Document doc = new Document(MyDir + "Various fields.docx"); doc.UnlinkFields(); //ExEnd:UnlinkFields @@ -544,9 +545,10 @@ public void EvaluateIFCondition() } [Test] - public void ConvertFieldsInParagraph() + public void UnlinkFieldsInParagraph() { - //ExStart:ConvertFieldsInParagraph + //ExStart:UnlinkFieldsInParagraph + //GistId:f3592014d179ecb43905e37b2a68bc92 Document doc = new Document(MyDir + "Linked fields.docx"); // Pass the appropriate parameters to convert all IF fields to text that are encountered only in the last @@ -554,35 +556,37 @@ public void ConvertFieldsInParagraph() doc.FirstSection.Body.LastParagraph.Range.Fields.Where(f => f.Type == FieldType.FieldIf).ToList() .ForEach(f => f.Unlink()); - doc.Save(ArtifactsDir + "WorkingWithFields.TestFile.docx"); - //ExEnd:ConvertFieldsInParagraph + doc.Save(ArtifactsDir + "WorkingWithFields.UnlinkFieldsInParagraph.docx"); + //ExEnd:UnlinkFieldsInParagraph } [Test] - public void ConvertFieldsInDocument() + public void UnlinkFieldsInDocument() { - //ExStart:ConvertFieldsInDocument + //ExStart:UnlinkFieldsInDocument + //GistId:f3592014d179ecb43905e37b2a68bc92 Document doc = new Document(MyDir + "Linked fields.docx"); // Pass the appropriate parameters to convert all IF fields encountered in the document (including headers and footers) to text. doc.Range.Fields.Where(f => f.Type == FieldType.FieldIf).ToList().ForEach(f => f.Unlink()); // Save the document with fields transformed to disk - doc.Save(ArtifactsDir + "WorkingWithFields.ConvertFieldsInDocument.docx"); - //ExEnd:ConvertFieldsInDocument + doc.Save(ArtifactsDir + "WorkingWithFields.UnlinkFieldsInDocument.docx"); + //ExEnd:UnlinkFieldsInDocument } [Test] - public void ConvertFieldsInBody() + public void UnlinkFieldsInBody() { - //ExStart:ConvertFieldsInBody + //ExStart:UnlinkFieldsInBody + //GistId:f3592014d179ecb43905e37b2a68bc92 Document doc = new Document(MyDir + "Linked fields.docx"); // Pass the appropriate parameters to convert PAGE fields encountered to text only in the body of the first section. doc.FirstSection.Body.Range.Fields.Where(f => f.Type == FieldType.FieldPage).ToList().ForEach(f => f.Unlink()); - doc.Save(ArtifactsDir + "WorkingWithFields.ConvertFieldsInBody.docx"); - //ExEnd:ConvertFieldsInBody + doc.Save(ArtifactsDir + "WorkingWithFields.UnlinkFieldsInBody.docx"); + //ExEnd:UnlinkFieldsInBody } [Test] @@ -606,6 +610,19 @@ public void ChangeLocale() doc.Save(ArtifactsDir + "WorkingWithFields.ChangeLocale.docx"); //ExEnd:ChangeLocale + } + + //ExStart:ConvertFieldsToStaticText + //GistId:f3592014d179ecb43905e37b2a68bc92 + /// + /// Converts any fields of the specified type found in the descendants of the node into static text. + /// + /// The node in which all descendants of the specified FieldType will be converted to static text. + /// The FieldType of the field to convert to static text. + private void ConvertFieldsToStaticText(CompositeNode compositeNode, FieldType targetFieldType) + { + compositeNode.Range.Fields.Cast().Where(f => f.Type == targetFieldType).ToList().ForEach(f => f.Unlink()); } + //ExEnd:ConvertFieldsToStaticText } } \ No newline at end of file From d448110da25e5e66f363fca1c5adaf82f150e1eb Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 29 Jan 2025 17:56:45 +0300 Subject: [PATCH 43/61] Updated "Apply Custom Formatting" --- .../Working with Fields.cs | 152 +++++++++++++++++- 1 file changed, 145 insertions(+), 7 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index 511c9b4d0..2c14b93b9 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading; @@ -449,7 +450,8 @@ public void DeleteFields() [Test] public void FieldUpdateCulture() { - //ExStart:FieldUpdateCultureProvider + //ExStart:FieldUpdateCulture + //GistId:79b46682fbfd7f02f64783b163ed95fc Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -459,10 +461,11 @@ public void FieldUpdateCulture() doc.FieldOptions.FieldUpdateCultureProvider = new FieldUpdateCultureProvider(); doc.Save(ArtifactsDir + "WorkingWithFields.FieldUpdateCulture.pdf"); - //ExEnd:FieldUpdateCultureProvider + //ExEnd:FieldUpdateCulture } - //ExStart:FieldUpdateCultureProviderGetCulture + //ExStart:FieldUpdateCultureProvider + //GistId:79b46682fbfd7f02f64783b163ed95fc class FieldUpdateCultureProvider : IFieldUpdateCultureProvider { public CultureInfo GetCulture(string name, Field field) @@ -512,7 +515,7 @@ public CultureInfo GetCulture(string name, Field field) } } } - //ExEnd:FieldUpdateCultureProviderGetCulture + //ExEnd:FieldUpdateCultureProvider [Test] public void FieldDisplayResults() @@ -532,16 +535,17 @@ public void FieldDisplayResults() } [Test] - public void EvaluateIFCondition() + public void EvaluateIfCondition() { - //ExStart:EvaluateIFCondition + //ExStart:EvaluateIfCondition + //GistId:79b46682fbfd7f02f64783b163ed95fc DocumentBuilder builder = new DocumentBuilder(); FieldIf field = (FieldIf) builder.InsertField("IF 1 = 1", null); FieldIfComparisonResult actualResult = field.EvaluateCondition(); Console.WriteLine(actualResult); - //ExEnd:EvaluateIFCondition + //ExEnd:EvaluateIfCondition } [Test] @@ -624,5 +628,139 @@ private void ConvertFieldsToStaticText(CompositeNode compositeNode, FieldType ta compositeNode.Range.Fields.Cast().Where(f => f.Type == targetFieldType).ToList().ForEach(f => f.Unlink()); } //ExEnd:ConvertFieldsToStaticText + + [Test] + public void FieldResultFormatting() + { + //ExStart:FieldResultFormatting + //GistId:79b46682fbfd7f02f64783b163ed95fc + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + FieldResultFormatter formatter = new FieldResultFormatter("${0}", "Date: {0}", "Item # {0}:"); + doc.FieldOptions.ResultFormatter = formatter; + + // Our field result formatter applies a custom format to newly created fields of three types of formats. + // Field result formatters apply new formatting to fields as they are updated, + // which happens as soon as we create them using this InsertField method overload. + // 1 - Numeric: + builder.InsertField(" = 2 + 3 \\# $###"); + + Assert.AreEqual("$5", doc.Range.Fields[0].Result); + Assert.AreEqual(1, formatter.CountFormatInvocations(FieldResultFormatter.FormatInvocationType.Numeric)); + + // 2 - Date/time: + builder.InsertField("DATE \\@ \"d MMMM yyyy\""); + + Assert.IsTrue(doc.Range.Fields[1].Result.StartsWith("Date: ")); + Assert.AreEqual(1, formatter.CountFormatInvocations(FieldResultFormatter.FormatInvocationType.DateTime)); + + // 3 - General: + builder.InsertField("QUOTE \"2\" \\* Ordinal"); + + Assert.AreEqual("Item # 2:", doc.Range.Fields[2].Result); + Assert.AreEqual(1, formatter.CountFormatInvocations(FieldResultFormatter.FormatInvocationType.General)); + + formatter.PrintFormatInvocations(); + //ExEnd:FieldResultFormatting + } + + //ExStart:FieldResultFormatter + //GistId:79b46682fbfd7f02f64783b163ed95fc + /// + /// When fields with formatting are updated, this formatter will override their formatting + /// with a custom format, while tracking every invocation. + /// + private class FieldResultFormatter : IFieldResultFormatter + { + public FieldResultFormatter(string numberFormat, string dateFormat, string generalFormat) + { + mNumberFormat = numberFormat; + mDateFormat = dateFormat; + mGeneralFormat = generalFormat; + } + + public string FormatNumeric(double value, string format) + { + if (string.IsNullOrEmpty(mNumberFormat)) + return null; + + string newValue = String.Format(mNumberFormat, value); + FormatInvocations.Add(new FormatInvocation(FormatInvocationType.Numeric, value, format, newValue)); + return newValue; + } + + public string FormatDateTime(DateTime value, string format, CalendarType calendarType) + { + if (string.IsNullOrEmpty(mDateFormat)) + return null; + + string newValue = String.Format(mDateFormat, value); + FormatInvocations.Add(new FormatInvocation(FormatInvocationType.DateTime, $"{value} ({calendarType})", format, newValue)); + return newValue; + } + + public string Format(string value, GeneralFormat format) + { + return Format((object)value, format); + } + + public string Format(double value, GeneralFormat format) + { + return Format((object)value, format); + } + + private string Format(object value, GeneralFormat format) + { + if (string.IsNullOrEmpty(mGeneralFormat)) + return null; + + string newValue = String.Format(mGeneralFormat, value); + FormatInvocations.Add(new FormatInvocation(FormatInvocationType.General, value, format.ToString(), newValue)); + return newValue; + } + + public int CountFormatInvocations(FormatInvocationType formatInvocationType) + { + if (formatInvocationType == FormatInvocationType.All) + return FormatInvocations.Count; + return FormatInvocations.Count(f => f.FormatInvocationType == formatInvocationType); + } + + public void PrintFormatInvocations() + { + foreach (FormatInvocation f in FormatInvocations) + Console.WriteLine($"Invocation type:\t{f.FormatInvocationType}\n" + + $"\tOriginal value:\t\t{f.Value}\n" + + $"\tOriginal format:\t{f.OriginalFormat}\n" + + $"\tNew value:\t\t\t{f.NewValue}\n"); + } + + private readonly string mNumberFormat; + private readonly string mDateFormat; + private readonly string mGeneralFormat; + private List FormatInvocations { get; } = new List(); + + private class FormatInvocation + { + public FormatInvocationType FormatInvocationType { get; } + public object Value { get; } + public string OriginalFormat { get; } + public string NewValue { get; } + + public FormatInvocation(FormatInvocationType formatInvocationType, object value, string originalFormat, string newValue) + { + Value = value; + FormatInvocationType = formatInvocationType; + OriginalFormat = originalFormat; + NewValue = newValue; + } + } + + public enum FormatInvocationType + { + Numeric, DateTime, General, All + } + } + //ExEnd:FieldResultFormatter } } \ No newline at end of file From a241a959dc6d7a72ec508bbb7193d73025acd121 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Wed, 29 Jan 2025 17:59:51 +0300 Subject: [PATCH 44/61] Updated "Working with Hyperlinks" --- .../Working with Document/Add content using DocumentBuilder.cs | 1 + .../Programming with Documents/Working with Fields.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs index 25a707ca0..203534e88 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs @@ -197,6 +197,7 @@ public void InsertHtml() public void InsertHyperlink() { //ExStart:InsertHyperlink + //GistId:0213851d47551e83af42233f4d075cf6 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs index 2c14b93b9..ea2d9ab5f 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Fields.cs @@ -69,6 +69,7 @@ public void SpecifyLocaleAtFieldLevel() public void ReplaceHyperlinks() { //ExStart:ReplaceHyperlinks + //GistId:0213851d47551e83af42233f4d075cf6 Document doc = new Document(MyDir + "Hyperlinks.docx"); foreach (Field field in doc.Range.Fields) From 7a40448e9c1b9900927660535383dd5d6f76c577 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Thu, 30 Jan 2025 12:49:16 +0300 Subject: [PATCH 45/61] Updated "Working with Form Fields" --- .../Add content using DocumentBuilder.cs | 3 +++ .../Programming with Documents/Working with FormFields.cs | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs index 203534e88..531e3f7a8 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Add content using DocumentBuilder.cs @@ -139,6 +139,7 @@ public void InsertBreak() public void InsertTextInputFormField() { //ExStart:InsertTextInputFormField + //GistId:b09907fef4643433271e4e0e912921b0 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -152,6 +153,7 @@ public void InsertTextInputFormField() public void InsertCheckBoxFormField() { //ExStart:InsertCheckBoxFormField + //GistId:b09907fef4643433271e4e0e912921b0 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -165,6 +167,7 @@ public void InsertCheckBoxFormField() public void InsertComboBoxFormField() { //ExStart:InsertComboBoxFormField + //GistId:b09907fef4643433271e4e0e912921b0 string[] items = { "One", "Two", "Three" }; Document doc = new Document(); diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with FormFields.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with FormFields.cs index 3a188f894..3e0608689 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with FormFields.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with FormFields.cs @@ -11,6 +11,7 @@ internal class WorkingWithFormFields : DocsExamplesBase public void InsertFormFields() { //ExStart:InsertFormFields + //GistId:b09907fef4643433271e4e0e912921b0 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -23,18 +24,20 @@ public void InsertFormFields() public void FormFieldsWorkWithProperties() { //ExStart:FormFieldsWorkWithProperties + //GistId:b09907fef4643433271e4e0e912921b0 Document doc = new Document(MyDir + "Form fields.docx"); FormField formField = doc.Range.FormFields[3]; if (formField.Type == FieldType.FieldFormTextInput) formField.Result = "My name is " + formField.Name; - //ExEnd:FormFieldsWorkWithProperties + //ExEnd:FormFieldsWorkWithProperties } [Test] public void FormFieldsGetFormFieldsCollection() { //ExStart:FormFieldsGetFormFieldsCollection + //GistId:b09907fef4643433271e4e0e912921b0 Document doc = new Document(MyDir + "Form fields.docx"); FormFieldCollection formFields = doc.Range.FormFields; @@ -45,7 +48,9 @@ public void FormFieldsGetFormFieldsCollection() public void FormFieldsGetByName() { //ExStart:FormFieldsFontFormatting + //GistId:b09907fef4643433271e4e0e912921b0 //ExStart:FormFieldsGetByName + //GistId:b09907fef4643433271e4e0e912921b0 Document doc = new Document(MyDir + "Form fields.docx"); FormFieldCollection documentFormFields = doc.Range.FormFields; From cbf3f9368a90eb8adbb889b1727ea31feb61a942 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Thu, 30 Jan 2025 13:18:15 +0300 Subject: [PATCH 46/61] Updated "Working with Sdt" --- .../Contents Management/Working with SDT.cs | 95 +++++++++++-------- 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with SDT.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with SDT.cs index a650d0f3b..3021996d6 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with SDT.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Working with SDT.cs @@ -12,23 +12,25 @@ namespace DocsExamples.Programming_with_Documents.Contents_Management internal class WorkingWithSdt : DocsExamplesBase { [Test] - public void CheckBoxTypeContentControl() + public void SdtCheckBox() { - //ExStart:CheckBoxTypeContentControl + //ExStart:SdtCheckBox + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); StructuredDocumentTag sdtCheckBox = new StructuredDocumentTag(doc, SdtType.Checkbox, MarkupLevel.Inline); builder.InsertNode(sdtCheckBox); - doc.Save(ArtifactsDir + "WorkingWithSdt.CheckBoxTypeContentControl.docx", SaveFormat.Docx); - //ExEnd:CheckBoxTypeContentControl + doc.Save(ArtifactsDir + "WorkingWithSdt.SdtCheckBox.docx", SaveFormat.Docx); + //ExEnd:SdtCheckBox } [Test] public void CurrentStateOfCheckBox() { - //ExStart:SetCurrentStateOfCheckBox + //ExStart:CurrentStateOfCheckBox + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(MyDir + "Structured document tags.docx"); // Get the first content control from the document. @@ -39,13 +41,14 @@ public void CurrentStateOfCheckBox() sdtCheckBox.Checked = true; doc.Save(ArtifactsDir + "WorkingWithSdt.CurrentStateOfCheckBox.docx"); - //ExEnd:SetCurrentStateOfCheckBox + //ExEnd:CurrentStateOfCheckBox } [Test] - public void ModifyContentControls() + public void ModifySdt() { - //ExStart:ModifyContentControls + //ExStart:ModifySdt + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(MyDir + "Structured document tags.docx"); foreach (StructuredDocumentTag sdt in doc.GetChildNodes(NodeType.StructuredDocumentTag, true)) @@ -79,14 +82,15 @@ public void ModifyContentControls() } } - doc.Save(ArtifactsDir + "WorkingWithSdt.ModifyContentControls.docx"); - //ExEnd:ModifyContentControls + doc.Save(ArtifactsDir + "WorkingWithSdt.ModifySdt.docx"); + //ExEnd:ModifySdt } [Test] - public void ComboBoxContentControl() + public void SdtComboBox() { - //ExStart:ComboBoxContentControl + //ExStart:SdtComboBox + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(); StructuredDocumentTag sdt = new StructuredDocumentTag(doc, SdtType.ComboBox, MarkupLevel.Block); @@ -95,14 +99,15 @@ public void ComboBoxContentControl() sdt.ListItems.Add(new SdtListItem("Item 2", "2")); doc.FirstSection.Body.AppendChild(sdt); - doc.Save(ArtifactsDir + "WorkingWithSdt.ComboBoxContentControl.docx"); - //ExEnd:ComboBoxContentControl + doc.Save(ArtifactsDir + "WorkingWithSdt.SdtComboBox.docx"); + //ExEnd:SdtComboBox } [Test] - public void RichTextBoxContentControl() + public void SdtRichTextBox() { - //ExStart:RichTextBoxContentControl + //ExStart:SdtRichTextBox + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(); StructuredDocumentTag sdtRichText = new StructuredDocumentTag(doc, SdtType.RichText, MarkupLevel.Block); @@ -115,40 +120,43 @@ public void RichTextBoxContentControl() sdtRichText.GetChildNodes(NodeType.Any, false).Add(para); doc.FirstSection.Body.AppendChild(sdtRichText); - doc.Save(ArtifactsDir + "WorkingWithSdt.RichTextBoxContentControl.docx"); - //ExEnd:RichTextBoxContentControl + doc.Save(ArtifactsDir + "WorkingWithSdt.SdtRichTextBox.docx"); + //ExEnd:SdtRichTextBox } [Test] - public void SetContentControlColor() + public void SdtColor() { - //ExStart:SetContentControlColor + //ExStart:SdtColor + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(MyDir + "Structured document tags.docx"); StructuredDocumentTag sdt = (StructuredDocumentTag) doc.GetChild(NodeType.StructuredDocumentTag, 0, true); sdt.Color = Color.Red; - doc.Save(ArtifactsDir + "WorkingWithSdt.SetContentControlColor.docx"); - //ExEnd:SetContentControlColor + doc.Save(ArtifactsDir + "WorkingWithSdt.SdtColor.docx"); + //ExEnd:SdtColor } [Test] - public void ClearContentsControl() + public void ClearSdt() { - //ExStart:ClearContentsControl + //ExStart:ClearSdt + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(MyDir + "Structured document tags.docx"); StructuredDocumentTag sdt = (StructuredDocumentTag) doc.GetChild(NodeType.StructuredDocumentTag, 0, true); sdt.Clear(); - doc.Save(ArtifactsDir + "WorkingWithSdt.ClearContentsControl.doc"); - //ExEnd:ClearContentsControl + doc.Save(ArtifactsDir + "WorkingWithSdt.ClearSdt.doc"); + //ExEnd:ClearSdt } [Test] - public void BindSdTtoCustomXmlPart() + public void BindSdtToCustomXmlPart() { - //ExStart:BindSDTtoCustomXmlPart + //ExStart:BindSdtToCustomXmlPart + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(); CustomXmlPart xmlPart = doc.CustomXmlParts.Add(Guid.NewGuid().ToString("B"), "Hello, World!"); @@ -158,28 +166,30 @@ public void BindSdTtoCustomXmlPart() sdt.XmlMapping.SetMapping(xmlPart, "/root[1]/text[1]", ""); - doc.Save(ArtifactsDir + "WorkingWithSdt.BindSDTtoCustomXmlPart.doc"); - //ExEnd:BindSDTtoCustomXmlPart + doc.Save(ArtifactsDir + "WorkingWithSdt.BindSdtToCustomXmlPart.doc"); + //ExEnd:BindSdtToCustomXmlPart } [Test] - public void SetContentControlStyle() + public void SdtStyle() { - //ExStart:SetContentControlStyle + //ExStart:SdtStyle + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(MyDir + "Structured document tags.docx"); StructuredDocumentTag sdt = (StructuredDocumentTag) doc.GetChild(NodeType.StructuredDocumentTag, 0, true); Style style = doc.Styles[StyleIdentifier.Quote]; sdt.Style = style; - doc.Save(ArtifactsDir + "WorkingWithSdt.SetContentControlStyle.docx"); - //ExEnd:SetContentControlStyle + doc.Save(ArtifactsDir + "WorkingWithSdt.SdtStyle.docx"); + //ExEnd:SdtStyle } [Test] - public void CreatingTableRepeatingSectionMappedToCustomXmlPart() + public void RepeatingSectionMappedToCustomXmlPart() { - //ExStart:CreatingTableRepeatingSectionMappedToCustomXmlPart + //ExStart:RepeatingSectionMappedToCustomXmlPart + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -221,8 +231,8 @@ public void CreatingTableRepeatingSectionMappedToCustomXmlPart() authorSdt.XmlMapping.SetMapping(xmlPart, "/books[1]/book[1]/author[1]", ""); row.AppendChild(authorSdt); - doc.Save(ArtifactsDir + "WorkingWithSdt.CreatingTableRepeatingSectionMappedToCustomXmlPart.docx"); - //ExEnd:CreatingTableRepeatingSectionMappedToCustomXmlPart + doc.Save(ArtifactsDir + "WorkingWithSdt.RepeatingSectionMappedToCustomXmlPart.docx"); + //ExEnd:RepeatingSectionMappedToCustomXmlPart } [Test] @@ -239,9 +249,10 @@ public void MultiSection() } [Test] - public void StructuredDocumentTagRangeStartXmlMapping() + public void SdtRangeStartXmlMapping() { - //ExStart:StructuredDocumentTagRangeStartXmlMapping + //ExStart:SdtRangeStartXmlMapping + //GistId:089defec1b191de967e6099effeabda7 Document doc = new Document(MyDir + "Multi-section structured document tags.docx"); // Construct an XML part that contains data and add it to the document's CustomXmlPart collection. @@ -258,8 +269,8 @@ public void StructuredDocumentTagRangeStartXmlMapping() // This XPath will point to the contents second "" element of the first "" element of our CustomXmlPart. sdtRangeStart.XmlMapping.SetMapping(xmlPart, "/root[1]/text[2]", null); - doc.Save(ArtifactsDir + "WorkingWithSdt.StructuredDocumentTagRangeStartXmlMapping.docx"); - //ExEnd:StructuredDocumentTagRangeStartXmlMapping + doc.Save(ArtifactsDir + "WorkingWithSdt.SdtRangeStartXmlMapping.docx"); + //ExEnd:SdtRangeStartXmlMapping } } } \ No newline at end of file From a919d4e728e8d4ac76f09b30f89369874d8736e0 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Thu, 30 Jan 2025 13:21:03 +0300 Subject: [PATCH 47/61] Updated "Working With Control Characters" --- .../Working with Document/Working with document properties.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs index 6c31a7d4e..e3ff7a72c 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs @@ -142,6 +142,7 @@ public void ConvertBetweenMeasurementUnits() public void UseControlCharacters() { //ExStart:UseControlCharacters + //GistId:6269ddb6427f9ad20623d975774a615e const string text = "test\r"; // Replace "\r" control character with "\r\n". string replace = text.Replace(ControlChar.Cr, ControlChar.CrLf); From dcf840b2f94bdbf6f0be6fa7225172d59695412d Mon Sep 17 00:00:00 2001 From: vderyushev Date: Thu, 30 Jan 2025 13:26:10 +0300 Subject: [PATCH 48/61] Updated "Working with VBA" --- .../Working with VBA Macros.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with VBA Macros.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with VBA Macros.cs index 421455a46..a9492a7f7 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with VBA Macros.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with VBA Macros.cs @@ -12,6 +12,7 @@ internal class WorkingWithVba : DocsExamplesBase public void CreateVbaProject() { //ExStart:CreateVbaProject + //GistId:d9bac4ed890f81ea3de392ecfeedbc55 Document doc = new Document(); VbaProject project = new VbaProject(); @@ -35,6 +36,7 @@ public void CreateVbaProject() public void ReadVbaMacros() { //ExStart:ReadVbaMacros + //GistId:d9bac4ed890f81ea3de392ecfeedbc55 Document doc = new Document(MyDir + "VBA project.docm"); if (doc.VbaProject != null) @@ -51,6 +53,7 @@ public void ReadVbaMacros() public void ModifyVbaMacros() { //ExStart:ModifyVbaMacros + //GistId:d9bac4ed890f81ea3de392ecfeedbc55 Document doc = new Document(MyDir + "VBA project.docm"); VbaProject project = doc.VbaProject; @@ -67,6 +70,7 @@ public void ModifyVbaMacros() public void CloneVbaProject() { //ExStart:CloneVbaProject + //GistId:d9bac4ed890f81ea3de392ecfeedbc55 Document doc = new Document(MyDir + "VBA project.docm"); Document destDoc = new Document { VbaProject = doc.VbaProject.Clone() }; @@ -78,6 +82,7 @@ public void CloneVbaProject() public void CloneVbaModule() { //ExStart:CloneVbaModule + //GistId:d9bac4ed890f81ea3de392ecfeedbc55 Document doc = new Document(MyDir + "VBA project.docm"); Document destDoc = new Document { VbaProject = new VbaProject() }; @@ -89,9 +94,10 @@ public void CloneVbaModule() } [Test] - public void RemoveBrokenRef() + public void RemoveVbaReferences() { - //ExStart:RemoveReferenceFromCollectionOfReferences + //ExStart:RemoveVbaReferences + //GistId:d9bac4ed890f81ea3de392ecfeedbc55 Document doc = new Document(MyDir + "VBA project.docm"); // Find and remove the reference with some LibId path. @@ -106,10 +112,11 @@ public void RemoveBrokenRef() references.RemoveAt(i); } - doc.Save(ArtifactsDir + "WorkingWithVba.RemoveBrokenRef.docm"); - //ExEnd:RemoveReferenceFromCollectionOfReferences + doc.Save(ArtifactsDir + "WorkingWithVba.RemoveVbaReferences.docm"); + //ExEnd:RemoveVbaReferences } //ExStart:GetLibIdAndReferencePath + //GistId:d9bac4ed890f81ea3de392ecfeedbc55 /// /// Returns string representing LibId path of a specified reference. /// From 02746da39e9729158c9ed10c9cee77c96907936d Mon Sep 17 00:00:00 2001 From: vderyushev Date: Thu, 30 Jan 2025 15:24:16 +0300 Subject: [PATCH 49/61] Updated "Working with Markdown" --- .../Load Options/Working with LoadOptions.cs | 1 + .../Working with MarkdownSaveOptions.cs | 7 ++-- .../Working with Markdown.cs | 34 ++++++++++++++++--- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs index 881bd59b9..6f93bcfb2 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with LoadOptions.cs @@ -1,4 +1,5 @@ using System; +using System.Drawing; using System.Text; using Aspose.Words; using Aspose.Words.Loading; diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with MarkdownSaveOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with MarkdownSaveOptions.cs index 85cec8dd4..88aed2e28 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with MarkdownSaveOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with MarkdownSaveOptions.cs @@ -8,9 +8,10 @@ namespace DocsExamples.File_Formats_and_Conversions.Save_Options public class WorkingWithMarkdownSaveOptions : DocsExamplesBase { [Test] - public void ExportIntoMarkdownWithTableContentAlignment() + public void MarkdownTableContentAlignment() { - //ExStart:ExportIntoMarkdownWithTableContentAlignment + //ExStart:MarkdownTableContentAlignment + //GistId:19de942ef8827201c1dca99f76c59133 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -37,7 +38,7 @@ public void ExportIntoMarkdownWithTableContentAlignment() // The alignment in this case will be taken from the first paragraph in corresponding table column. saveOptions.TableContentAlignment = TableContentAlignment.Auto; doc.Save(ArtifactsDir + "WorkingWithMarkdownSaveOptions.AutoTableContentAlignment.md", saveOptions); - //ExEnd:ExportIntoMarkdownWithTableContentAlignment + //ExEnd:MarkdownTableContentAlignment } [Test] diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs index 7394a9353..96279cda8 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Markdown.cs @@ -129,15 +129,34 @@ public void Heading() //ExStart:Heading //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. - DocumentBuilder builder = new DocumentBuilder(); + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); // By default Heading styles in Word may have Bold and Italic formatting. //If we do not want to be emphasized, set these properties explicitly to false. builder.Font.Bold = false; builder.Font.Italic = false; - builder.ParagraphFormat.StyleName = "Heading 1"; - builder.Writeln("This is an H1 tag"); + builder.Writeln("The following produces headings:"); + builder.ParagraphFormat.Style = doc.Styles["Heading 1"]; + builder.Writeln("Heading1"); + builder.ParagraphFormat.Style = doc.Styles["Heading 2"]; + builder.Writeln("Heading2"); + builder.ParagraphFormat.Style = doc.Styles["Heading 3"]; + builder.Writeln("Heading3"); + builder.ParagraphFormat.Style = doc.Styles["Heading 4"]; + builder.Writeln("Heading4"); + builder.ParagraphFormat.Style = doc.Styles["Heading 5"]; + builder.Writeln("Heading5"); + builder.ParagraphFormat.Style = doc.Styles["Heading 6"]; + builder.Writeln("Heading6"); + + // Note, emphases are also allowed inside Headings: + builder.Font.Bold = true; + builder.ParagraphFormat.Style = doc.Styles["Heading 1"]; + builder.Writeln("Bold Heading1"); + + doc.Save(ArtifactsDir + "WorkingWithMarkdown.Heading.md"); //ExEnd:Heading } @@ -176,7 +195,7 @@ public void SetextHeading() builder.Writeln("Setext Heading level 2"); //ExEnd:SetextHeading - builder.Document.Save(ArtifactsDir + "Test.md"); + builder.Document.Save(ArtifactsDir + "WorkingWithMarkdown.SetextHeading.md"); } [Test] @@ -217,7 +236,8 @@ public void Quote() //ExStart:Quote //GistId:0697355b7f872839932388d269ed6a63 // Use a document builder to add content to the document. - DocumentBuilder builder = new DocumentBuilder(); + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); // By default a document stores blockquote style for the first level. builder.ParagraphFormat.StyleName = "Quote"; @@ -228,6 +248,8 @@ public void Quote() builder.ParagraphFormat.Style = quoteLevel2; builder.Document.Styles["Quote1"].BaseStyleName = "Quote"; builder.Writeln("1. Nested blockquote"); + + doc.Save(ArtifactsDir + "WorkingWithMarkdown.Quote.md"); //ExEnd:Quote } @@ -300,6 +322,7 @@ public void Table() public void ReadMarkdownDocument() { //ExStart:ReadMarkdownDocument + //GistId:19de942ef8827201c1dca99f76c59133 Document doc = new Document(MyDir + "Quotes.md"); // Let's remove Heading formatting from a Quote in the very last paragraph. @@ -314,6 +337,7 @@ public void ReadMarkdownDocument() public void Emphases() { //ExStart:Emphases + //GistId:19de942ef8827201c1dca99f76c59133 Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); From e7253afbba2f7b11d249f2ec9e6f1ad55dfa40d9 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Thu, 30 Jan 2025 15:36:25 +0300 Subject: [PATCH 50/61] Updated "Working with Text" --- .../Working with TxtLoadOptions.cs | 48 +++++++++++++++++++ .../Working with TxtSaveOptions.cs | 19 ++++---- 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with TxtLoadOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with TxtLoadOptions.cs index d04261cd4..45f9a7445 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with TxtLoadOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Load Options/Working with TxtLoadOptions.cs @@ -1,8 +1,10 @@ using System; using System.IO; +using System.Runtime.InteropServices.ComTypes; using System.Text; using Aspose.Words; using Aspose.Words.Loading; +using Aspose.Words.Saving; using NUnit.Framework; namespace DocsExamples.File_Formats_and_Conversions.Load_Options @@ -13,6 +15,7 @@ public class WorkingWithTxtLoadOptions : DocsExamplesBase public void DetectNumberingWithWhitespaces() { //ExStart:DetectNumberingWithWhitespaces + //GistId:ddafc3430967fb4f4f70085fa577d01a // Create a plaintext document in the form of a string with parts that may be interpreted as lists. // Upon loading, the first three lists will always be detected by Aspose.Words, // and List objects will be created for them after loading. @@ -49,6 +52,7 @@ public void DetectNumberingWithWhitespaces() public void HandleSpacesOptions() { //ExStart:HandleSpacesOptions + //GistId:ddafc3430967fb4f4f70085fa577d01a const string textDoc = " Line 1 \n" + " Line 2 \n" + " Line 3 "; @@ -69,6 +73,7 @@ public void HandleSpacesOptions() public void DocumentTextDirection() { //ExStart:DocumentTextDirection + //GistId:ddafc3430967fb4f4f70085fa577d01a TxtLoadOptions loadOptions = new TxtLoadOptions { DocumentDirection = DocumentDirection.Auto }; Document doc = new Document(MyDir + "Hebrew text.txt", loadOptions); @@ -79,5 +84,48 @@ public void DocumentTextDirection() doc.Save(ArtifactsDir + "WorkingWithTxtLoadOptions.DocumentTextDirection.docx"); //ExEnd:DocumentTextDirection } + + [Test] + public void ExportHeadersFootersMode() + { + //ExStart:ExportHeadersFootersMode + //GistId:ddafc3430967fb4f4f70085fa577d01a + Document doc = new Document(); + + // Insert even and primary headers/footers into the document. + // The primary header/footers will override the even headers/footers. + doc.FirstSection.HeadersFooters.Add(new HeaderFooter(doc, HeaderFooterType.HeaderEven)); + doc.FirstSection.HeadersFooters[HeaderFooterType.HeaderEven].AppendParagraph("Even header"); + doc.FirstSection.HeadersFooters.Add(new HeaderFooter(doc, HeaderFooterType.FooterEven)); + doc.FirstSection.HeadersFooters[HeaderFooterType.FooterEven].AppendParagraph("Even footer"); + doc.FirstSection.HeadersFooters.Add(new HeaderFooter(doc, HeaderFooterType.HeaderPrimary)); + doc.FirstSection.HeadersFooters[HeaderFooterType.HeaderPrimary].AppendParagraph("Primary header"); + doc.FirstSection.HeadersFooters.Add(new HeaderFooter(doc, HeaderFooterType.FooterPrimary)); + doc.FirstSection.HeadersFooters[HeaderFooterType.FooterPrimary].AppendParagraph("Primary footer"); + + // Insert pages to display these headers and footers. + DocumentBuilder builder = new DocumentBuilder(doc); + builder.Writeln("Page 1"); + builder.InsertBreak(BreakType.PageBreak); + builder.Writeln("Page 2"); + builder.InsertBreak(BreakType.PageBreak); + builder.Write("Page 3"); + + TxtSaveOptions options = new TxtSaveOptions(); + options.SaveFormat = SaveFormat.Text; + + // All headers and footers are placed at the very end of the output document. + options.ExportHeadersFootersMode = TxtExportHeadersFootersMode.AllAtEnd; + doc.Save(ArtifactsDir + "WorkingWithTxtLoadOptions.HeadersFootersMode.AllAtEnd.txt", options); + + // Only primary headers and footers are exported at the beginning and end of each section. + options.ExportHeadersFootersMode = TxtExportHeadersFootersMode.PrimaryOnly; + doc.Save(ArtifactsDir + "WorkingWithTxtLoadOptions.HeadersFootersMode.PrimaryOnly.txt", options); + + // No headers and footers are exported. + options.ExportHeadersFootersMode = TxtExportHeadersFootersMode.None; + doc.Save(ArtifactsDir + "WorkingWithTxtLoadOptions.HeadersFootersMode.None.txt", options); + //ExEnd:ExportHeadersFootersMode + } } } diff --git a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with TxtSaveOptions.cs b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with TxtSaveOptions.cs index 8b252fc15..3c6f1ce84 100644 --- a/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with TxtSaveOptions.cs +++ b/Examples/DocsExamples/DocsExamples/File Formats and Conversions/Save Options/Working with TxtSaveOptions.cs @@ -10,6 +10,7 @@ public class WorkingWithTxtSaveOptions : DocsExamplesBase public void AddBidiMarks() { //ExStart:AddBidiMarks + //GistId:ddafc3430967fb4f4f70085fa577d01a Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -25,9 +26,10 @@ public void AddBidiMarks() } [Test] - public void UseTabCharacterPerLevelForListIndentation() + public void UseTabForListIndentation() { - //ExStart:UseTabCharacterPerLevelForListIndentation + //ExStart:UseTabForListIndentation + //GistId:ddafc3430967fb4f4f70085fa577d01a Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -43,14 +45,15 @@ public void UseTabCharacterPerLevelForListIndentation() saveOptions.ListIndentation.Count = 1; saveOptions.ListIndentation.Character = '\t'; - doc.Save(ArtifactsDir + "WorkingWithTxtSaveOptions.UseTabCharacterPerLevelForListIndentation.txt", saveOptions); - //ExEnd:UseTabCharacterPerLevelForListIndentation + doc.Save(ArtifactsDir + "WorkingWithTxtSaveOptions.UseTabForListIndentation.txt", saveOptions); + //ExEnd:UseTabForListIndentation } [Test] - public void UseSpaceCharacterPerLevelForListIndentation() + public void UseSpaceForListIndentation() { - //ExStart:UseSpaceCharacterPerLevelForListIndentation + //ExStart:UseSpaceForListIndentation + //GistId:ddafc3430967fb4f4f70085fa577d01a Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -66,8 +69,8 @@ public void UseSpaceCharacterPerLevelForListIndentation() saveOptions.ListIndentation.Count = 3; saveOptions.ListIndentation.Character = ' '; - doc.Save(ArtifactsDir + "WorkingWithTxtSaveOptions.UseSpaceCharacterPerLevelForListIndentation.txt", saveOptions); - //ExEnd:UseSpaceCharacterPerLevelForListIndentation + doc.Save(ArtifactsDir + "WorkingWithTxtSaveOptions.UseSpaceForListIndentation.txt", saveOptions); + //ExEnd:UseSpaceForListIndentation } } } \ No newline at end of file From ff1b8d7ff1681a6d2357fbd4058f2922bafa4adb Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 3 Feb 2025 12:23:44 +0300 Subject: [PATCH 51/61] Fixes --- .../Contents Management/Find and replace.cs | 4 ++-- .../Programming with Documents/Working with Comments.cs | 1 - .../Working with document properties.cs | 6 ------ .../Programming with Documents/Working with Textboxes.cs | 6 ------ 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs index 60e911750..7c9234762 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Contents Management/Find and replace.cs @@ -599,9 +599,9 @@ public void ReplaceWithString() Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); - builder.Writeln("sad mad bad"); + builder.Writeln("Hello _CustomerName_,"); - doc.Range.Replace("sad", "bad", new FindReplaceOptions(FindReplaceDirection.Forward)); + doc.Range.Replace("_CustomerName_", "James Bond", new FindReplaceOptions(FindReplaceDirection.Forward)); doc.Save(ArtifactsDir + "FindAndReplace.ReplaceWithString.docx"); //ExEnd:ReplaceWithString diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs index 9fd67385f..21cc1c61b 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs @@ -150,7 +150,6 @@ List ExtractComments(Document doc, string authorName) void RemoveComments(Document doc) { NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true); - comments.Clear(); } //ExEnd:RemoveComments diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs index e3ff7a72c..da02fcbab 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Document/Working with document properties.cs @@ -21,13 +21,9 @@ public void GetVariables() string name = entry.Key; string value = entry.Value; if (variables == "") - { variables = "Name: " + name + "," + "Value: {1}" + value; - } else - { variables = variables + "Name: " + name + "," + "Value: {1}" + value; - } } Console.WriteLine("\nDocument have following variables " + variables); @@ -113,9 +109,7 @@ public void ConfiguringLinkToContent() customProperty = customProperties["Bookmark"]; bool isLinkedToContent = customProperty.IsLinkToContent; - string linkSource = customProperty.LinkSource; - string customPropertyValue = customProperty.Value.ToString(); //ExEnd:ConfiguringLinkToContent } diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs index 93850a14b..643cdc155 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Textboxes.cs @@ -36,19 +36,13 @@ public void CheckSequence() TextBox textBox = shape.TextBox; if (textBox.Next != null && textBox.Previous == null) - { Console.WriteLine("The head of the sequence"); - } if (textBox.Next != null && textBox.Previous != null) - { Console.WriteLine("The Middle of the sequence."); - } if (textBox.Next == null && textBox.Previous != null) - { Console.WriteLine("The Tail of the sequence."); - } //ExEnd:CheckSequence } From 4edd7a8e27dd0ce5ec9bc96c199fa0ea5c8f2d92 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 3 Feb 2025 12:47:30 +0300 Subject: [PATCH 52/61] Added AI class --- .../AI-powered Features/Working with AI.cs | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs diff --git a/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs b/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs new file mode 100644 index 000000000..6283e879b --- /dev/null +++ b/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs @@ -0,0 +1,71 @@ +using Aspose.Words.AI; +using Aspose.Words; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DocsExamples.AI_powered_Features +{ + public class Working_with_AI : DocsExamplesBase + { + [Test, Explicit("This test should be run manually to manage API requests amount")] + public void AiSummarize() + { + //ExStart:AiSummarize + //GistId:1e379bedb2b759c1be24c64aad54d13d + Document firstDoc = new Document(MyDir + "Big document.docx"); + Document secondDoc = new Document(MyDir + "Document.docx"); + + string apiKey = Environment.GetEnvironmentVariable("API_KEY"); + // Use OpenAI or Google generative language models. + IAiModelText model = ((OpenAiModel)AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey)).WithOrganization("Organization").WithProject("Project"); + + SummarizeOptions options = new SummarizeOptions(); + + options.SummaryLength = SummaryLength.Short; + Document oneDocumentSummary = model.Summarize(firstDoc, options); + oneDocumentSummary.Save(ArtifactsDir + "AI.AiSummarize.One.docx"); + + options.SummaryLength = SummaryLength.Long; + Document multiDocumentSummary = model.Summarize(new Document[] { firstDoc, secondDoc }, options); + multiDocumentSummary.Save(ArtifactsDir + "AI.AiSummarize.Multi.docx"); + //ExEnd:AiSummarize + } + + [Test, Ignore("This test should be run manually to manage API requests amount")] + public void AiTranslate() + { + //ExStart:AiTranslate + Document doc = new Document(MyDir + "Document.docx"); + + string apiKey = Environment.GetEnvironmentVariable("API_KEY"); + // Use Google generative language models. + IAiModelText model = (GoogleAiModel)AiModel.Create(AiModelType.Gemini15Flash).WithApiKey(apiKey); + + Document translatedDoc = model.Translate(doc, Language.Arabic); + translatedDoc.Save(ArtifactsDir + "AI.AiTranslate.docx"); + //ExEnd:AiTranslate + } + + [Test, Ignore("This test should be run manually to manage API requests amount")] + public void AiGrammar() + { + //ExStart:AiGrammar + Document doc = new Document(MyDir + "Big document.docx"); + + string apiKey = Environment.GetEnvironmentVariable("API_KEY"); + // Use OpenAI generative language models. + IAiModelText model = (IAiModelText)AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey); + + CheckGrammarOptions grammarOptions = new CheckGrammarOptions(); + grammarOptions.ImproveStylistics = true; + + Document proofedDoc = model.CheckGrammar(doc, grammarOptions); + proofedDoc.Save("AI.AiGrammar.docx"); + //ExEnd:AiGrammar + } + } +} From 5bd23692c4874959790031b0f05b02d4a8d243a3 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 3 Feb 2025 12:51:13 +0300 Subject: [PATCH 53/61] Updated "Translate a Document" --- .../DocsExamples/AI-powered Features/Working with AI.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs b/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs index 6283e879b..ecbab46e4 100644 --- a/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs +++ b/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs @@ -39,6 +39,7 @@ public void AiSummarize() public void AiTranslate() { //ExStart:AiTranslate + //GistId:ea14b3e44c0233eecd663f783a21c4f6 Document doc = new Document(MyDir + "Document.docx"); string apiKey = Environment.GetEnvironmentVariable("API_KEY"); From b27a8c1b3162e736460872cfac1fd494b585aa3d Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 3 Feb 2025 12:56:01 +0300 Subject: [PATCH 54/61] Updated "AI Grammar Checking" --- Examples/ApiExamples/ApiExamples/ExAI.cs | 2 +- .../DocsExamples/AI-powered Features/Working with AI.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ExAI.cs b/Examples/ApiExamples/ApiExamples/ExAI.cs index 5a18525f8..4bfa936b1 100644 --- a/Examples/ApiExamples/ApiExamples/ExAI.cs +++ b/Examples/ApiExamples/ApiExamples/ExAI.cs @@ -92,7 +92,7 @@ public void AiGrammar() grammarOptions.ImproveStylistics = true; Document proofedDoc = model.CheckGrammar(doc, grammarOptions); - proofedDoc.Save("AI.AiGrammar.docx"); + proofedDoc.Save(ArtifactsDir + "AI.AiGrammar.docx"); //ExEnd:AiGrammar } } diff --git a/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs b/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs index ecbab46e4..873b74e1e 100644 --- a/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs +++ b/Examples/DocsExamples/DocsExamples/AI-powered Features/Working with AI.cs @@ -55,6 +55,7 @@ public void AiTranslate() public void AiGrammar() { //ExStart:AiGrammar + //GistId:98a646d19cd7708ed0cd3d97b993a053 Document doc = new Document(MyDir + "Big document.docx"); string apiKey = Environment.GetEnvironmentVariable("API_KEY"); @@ -65,7 +66,7 @@ public void AiGrammar() grammarOptions.ImproveStylistics = true; Document proofedDoc = model.CheckGrammar(doc, grammarOptions); - proofedDoc.Save("AI.AiGrammar.docx"); + proofedDoc.Save(ArtifactsDir + "AI.AiGrammar.docx"); //ExEnd:AiGrammar } } From b203f5fba508ea510e194d402fbe9233117d58bc Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 3 Feb 2025 17:35:36 +0300 Subject: [PATCH 55/61] Updated API examples --- Examples/ApiExamples/ApiExamples/ApiExampleBase.cs | 2 +- .../ApiExamples/ApiExamples/CustomBarcodeGenerator.cs | 2 +- Examples/ApiExamples/ApiExamples/DocumentHelper.cs | 2 +- Examples/ApiExamples/ApiExamples/ExAI.cs | 6 +++--- .../ApiExamples/ApiExamples/ExAbsolutePositionTab.cs | 2 +- Examples/ApiExamples/ApiExamples/ExBookmarks.cs | 2 +- .../ApiExamples/ExBookmarksOutlineLevelCollection.cs | 2 +- Examples/ApiExamples/ApiExamples/ExBorder.cs | 2 +- Examples/ApiExamples/ApiExamples/ExBorderCollection.cs | 2 +- Examples/ApiExamples/ApiExamples/ExBuildVersion.cs | 2 +- Examples/ApiExamples/ApiExamples/ExBuildingBlocks.cs | 2 +- Examples/ApiExamples/ApiExamples/ExCellFormat.cs | 2 +- .../ApiExamples/ApiExamples/ExCertificateHolder.cs | 2 +- Examples/ApiExamples/ApiExamples/ExCharts.cs | 2 +- Examples/ApiExamples/ApiExamples/ExChmLoadOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExCleanupOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExComHelper.cs | 2 +- Examples/ApiExamples/ApiExamples/ExComment.cs | 2 +- .../ApiExamples/ApiExamples/ExCompatibilityOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExControlChar.cs | 2 +- .../ApiExamples/ExDigitalSignatureCollection.cs | 2 +- .../ApiExamples/ApiExamples/ExDigitalSignatureUtil.cs | 2 +- Examples/ApiExamples/ApiExamples/ExDocSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExDocument.cs | 2 +- Examples/ApiExamples/ApiExamples/ExDocumentBase.cs | 2 +- Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs | 2 +- .../ApiExamples/ApiExamples/ExDocumentBuilderImages.cs | 2 +- .../ApiExamples/ApiExamples/ExDocumentProperties.cs | 2 +- Examples/ApiExamples/ApiExamples/ExDocumentVisitor.cs | 2 +- Examples/ApiExamples/ApiExamples/ExDrawing.cs | 2 +- Examples/ApiExamples/ApiExamples/ExEditableRange.cs | 2 +- Examples/ApiExamples/ApiExamples/ExField.cs | 2 +- Examples/ApiExamples/ApiExamples/ExFieldOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExFile.cs | 2 +- Examples/ApiExamples/ApiExamples/ExFont.cs | 2 +- Examples/ApiExamples/ApiExamples/ExFontSettings.cs | 2 +- Examples/ApiExamples/ApiExamples/ExFormFields.cs | 2 +- Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs | 2 +- .../ApiExamples/ApiExamples/ExHtmlFixedSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExHtmlLoadOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExHyphenation.cs | 2 +- Examples/ApiExamples/ApiExamples/ExImage.cs | 2 +- Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExInline.cs | 2 +- Examples/ApiExamples/ApiExamples/ExInlineStory.cs | 2 +- Examples/ApiExamples/ApiExamples/ExLayout.cs | 2 +- Examples/ApiExamples/ApiExamples/ExLicense.cs | 2 +- Examples/ApiExamples/ApiExamples/ExLists.cs | 2 +- Examples/ApiExamples/ApiExamples/ExLoadOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExLowCode.cs | 2 +- Examples/ApiExamples/ApiExamples/ExMailMerge.cs | 2 +- Examples/ApiExamples/ApiExamples/ExMailMergeCustom.cs | 2 +- .../ApiExamples/ApiExamples/ExMailMergeCustomNested.cs | 2 +- Examples/ApiExamples/ApiExamples/ExMailMergeEvent.cs | 2 +- .../ApiExamples/ApiExamples/ExMarkdownLoadOptions.cs | 9 ++++++++- .../ApiExamples/ApiExamples/ExMarkdownSaveOptions.cs | 8 +++++++- Examples/ApiExamples/ApiExamples/ExMetered.cs | 2 +- Examples/ApiExamples/ApiExamples/ExMossDoc2Pdf.cs | 2 +- Examples/ApiExamples/ApiExamples/ExMossRtf2Docx.cs | 2 +- Examples/ApiExamples/ApiExamples/ExNode.cs | 2 +- Examples/ApiExamples/ApiExamples/ExNodeImporter.cs | 2 +- Examples/ApiExamples/ApiExamples/ExOdtSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExOoxmlSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExPageSetup.cs | 2 +- Examples/ApiExamples/ApiExamples/ExParagraph.cs | 2 +- Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs | 2 +- Examples/ApiExamples/ApiExamples/ExPclSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExPdf2Word.cs | 2 +- Examples/ApiExamples/ApiExamples/ExPdfLoadOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs | 2 +- .../ApiExamples/ApiExamples/ExPlainTextDocument.cs | 2 +- Examples/ApiExamples/ApiExamples/ExPrinting.cs | 2 +- Examples/ApiExamples/ApiExamples/ExPsSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExRange.cs | 2 +- .../ApiExamples/ApiExamples/ExRenameMergeFields.cs | 2 +- Examples/ApiExamples/ApiExamples/ExRendering.cs | 2 +- .../ApiExamples/ApiExamples/ExReplaceHyperlinks.cs | 2 +- Examples/ApiExamples/ApiExamples/ExReportingEngine.cs | 2 +- Examples/ApiExamples/ApiExamples/ExRevision.cs | 10 +++++----- Examples/ApiExamples/ApiExamples/ExRtfLoadOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExRtfSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExSavingCallback.cs | 2 +- Examples/ApiExamples/ApiExamples/ExSection.cs | 2 +- Examples/ApiExamples/ApiExamples/ExShape.cs | 2 +- .../ApiExamples/ApiExamples/ExSignDocumentCustom.cs | 2 +- Examples/ApiExamples/ApiExamples/ExSmartTag.cs | 2 +- .../ApiExamples/ApiExamples/ExStructuredDocumentTag.cs | 2 +- Examples/ApiExamples/ApiExamples/ExStyles.cs | 2 +- Examples/ApiExamples/ApiExamples/ExSvgSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExTabStop.cs | 2 +- Examples/ApiExamples/ApiExamples/ExTable.cs | 2 +- Examples/ApiExamples/ApiExamples/ExTableColumn.cs | 2 +- Examples/ApiExamples/ApiExamples/ExThemes.cs | 2 +- Examples/ApiExamples/ApiExamples/ExTxtLoadOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExUtilityClasses.cs | 2 +- .../ApiExamples/ApiExamples/ExVariableCollection.cs | 2 +- Examples/ApiExamples/ApiExamples/ExVbaProject.cs | 2 +- Examples/ApiExamples/ApiExamples/ExViewOptions.cs | 2 +- .../ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs | 2 +- .../ApiExamples/ApiExamples/ExXamlFixedSaveOptions.cs | 2 +- .../ApiExamples/ApiExamples/ExXamlFlowSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExXlsxSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/ExXpsSaveOptions.cs | 2 +- Examples/ApiExamples/ApiExamples/TestUtil.cs | 2 +- 106 files changed, 125 insertions(+), 112 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ApiExampleBase.cs b/Examples/ApiExamples/ApiExamples/ApiExampleBase.cs index e94be9c65..f03390d9d 100644 --- a/Examples/ApiExamples/ApiExamples/ApiExampleBase.cs +++ b/Examples/ApiExamples/ApiExamples/ApiExampleBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2023 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/CustomBarcodeGenerator.cs b/Examples/ApiExamples/ApiExamples/CustomBarcodeGenerator.cs index fe96e9898..b89a92d6e 100644 --- a/Examples/ApiExamples/ApiExamples/CustomBarcodeGenerator.cs +++ b/Examples/ApiExamples/ApiExamples/CustomBarcodeGenerator.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/DocumentHelper.cs b/Examples/ApiExamples/ApiExamples/DocumentHelper.cs index 67bd8688c..2aa78638c 100644 --- a/Examples/ApiExamples/ApiExamples/DocumentHelper.cs +++ b/Examples/ApiExamples/ApiExamples/DocumentHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExAI.cs b/Examples/ApiExamples/ApiExamples/ExAI.cs index 781f85abc..45abee56a 100644 --- a/Examples/ApiExamples/ApiExamples/ExAI.cs +++ b/Examples/ApiExamples/ApiExamples/ExAI.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided @@ -55,7 +55,7 @@ public void AiSummarize() //ExEnd:AiSummarize } - [Test, Ignore("This test should be run manually to manage API requests amount")] + [Test, Explicit("This test should be run manually to manage API requests amount")] public void AiTranslate() { //ExStart:AiTranslate @@ -74,7 +74,7 @@ public void AiTranslate() //ExEnd:AiTranslate } - [Test, Ignore("This test should be run manually to manage API requests amount")] + [Test, Explicit("This test should be run manually to manage API requests amount")] public void AiGrammar() { //ExStart:AiGrammar diff --git a/Examples/ApiExamples/ApiExamples/ExAbsolutePositionTab.cs b/Examples/ApiExamples/ApiExamples/ExAbsolutePositionTab.cs index 35f85b693..5150cd4f3 100644 --- a/Examples/ApiExamples/ApiExamples/ExAbsolutePositionTab.cs +++ b/Examples/ApiExamples/ApiExamples/ExAbsolutePositionTab.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExBookmarks.cs b/Examples/ApiExamples/ApiExamples/ExBookmarks.cs index 517564780..d3144ae14 100644 --- a/Examples/ApiExamples/ApiExamples/ExBookmarks.cs +++ b/Examples/ApiExamples/ApiExamples/ExBookmarks.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs b/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs index d198f46a7..9dd199455 100644 --- a/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs +++ b/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExBorder.cs b/Examples/ApiExamples/ApiExamples/ExBorder.cs index 6fffd65e6..658d75693 100644 --- a/Examples/ApiExamples/ApiExamples/ExBorder.cs +++ b/Examples/ApiExamples/ApiExamples/ExBorder.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExBorderCollection.cs b/Examples/ApiExamples/ApiExamples/ExBorderCollection.cs index 7aac9def6..5b206a5cb 100644 --- a/Examples/ApiExamples/ApiExamples/ExBorderCollection.cs +++ b/Examples/ApiExamples/ApiExamples/ExBorderCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExBuildVersion.cs b/Examples/ApiExamples/ApiExamples/ExBuildVersion.cs index a76d4850f..2833678ed 100644 --- a/Examples/ApiExamples/ApiExamples/ExBuildVersion.cs +++ b/Examples/ApiExamples/ApiExamples/ExBuildVersion.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExBuildingBlocks.cs b/Examples/ApiExamples/ApiExamples/ExBuildingBlocks.cs index 2776854b7..fb3c1d799 100644 --- a/Examples/ApiExamples/ApiExamples/ExBuildingBlocks.cs +++ b/Examples/ApiExamples/ApiExamples/ExBuildingBlocks.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExCellFormat.cs b/Examples/ApiExamples/ApiExamples/ExCellFormat.cs index 72ec33030..bc95d19a0 100644 --- a/Examples/ApiExamples/ApiExamples/ExCellFormat.cs +++ b/Examples/ApiExamples/ApiExamples/ExCellFormat.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExCertificateHolder.cs b/Examples/ApiExamples/ApiExamples/ExCertificateHolder.cs index 26916d8cd..c83e0f4b7 100644 --- a/Examples/ApiExamples/ApiExamples/ExCertificateHolder.cs +++ b/Examples/ApiExamples/ApiExamples/ExCertificateHolder.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExCharts.cs b/Examples/ApiExamples/ApiExamples/ExCharts.cs index d3e7f2355..fdfbeb726 100644 --- a/Examples/ApiExamples/ApiExamples/ExCharts.cs +++ b/Examples/ApiExamples/ApiExamples/ExCharts.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExChmLoadOptions.cs b/Examples/ApiExamples/ApiExamples/ExChmLoadOptions.cs index 01221e474..1e2ae89ac 100644 --- a/Examples/ApiExamples/ApiExamples/ExChmLoadOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExChmLoadOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExCleanupOptions.cs b/Examples/ApiExamples/ApiExamples/ExCleanupOptions.cs index dd878a6d0..7cd677d9a 100644 --- a/Examples/ApiExamples/ApiExamples/ExCleanupOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExCleanupOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExComHelper.cs b/Examples/ApiExamples/ApiExamples/ExComHelper.cs index 870cf7f67..78eb72da8 100644 --- a/Examples/ApiExamples/ApiExamples/ExComHelper.cs +++ b/Examples/ApiExamples/ApiExamples/ExComHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExComment.cs b/Examples/ApiExamples/ApiExamples/ExComment.cs index cb4164a63..70ebe4f5c 100644 --- a/Examples/ApiExamples/ApiExamples/ExComment.cs +++ b/Examples/ApiExamples/ApiExamples/ExComment.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExCompatibilityOptions.cs b/Examples/ApiExamples/ApiExamples/ExCompatibilityOptions.cs index e02f43caf..62aa0d863 100644 --- a/Examples/ApiExamples/ApiExamples/ExCompatibilityOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExCompatibilityOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExControlChar.cs b/Examples/ApiExamples/ApiExamples/ExControlChar.cs index ed393aa0a..4ebfd0005 100644 --- a/Examples/ApiExamples/ApiExamples/ExControlChar.cs +++ b/Examples/ApiExamples/ApiExamples/ExControlChar.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDigitalSignatureCollection.cs b/Examples/ApiExamples/ApiExamples/ExDigitalSignatureCollection.cs index 244e6b383..2bc42f0f9 100644 --- a/Examples/ApiExamples/ApiExamples/ExDigitalSignatureCollection.cs +++ b/Examples/ApiExamples/ApiExamples/ExDigitalSignatureCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDigitalSignatureUtil.cs b/Examples/ApiExamples/ApiExamples/ExDigitalSignatureUtil.cs index af3ce75a7..fe5f9e3bb 100644 --- a/Examples/ApiExamples/ApiExamples/ExDigitalSignatureUtil.cs +++ b/Examples/ApiExamples/ApiExamples/ExDigitalSignatureUtil.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDocSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExDocSaveOptions.cs index a5650fbb4..aeded6358 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDocument.cs b/Examples/ApiExamples/ApiExamples/ExDocument.cs index 1fc16e457..557d9b3fb 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocument.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocument.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs b/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs index 1d62a0f80..a5bb69bc5 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs b/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs index 0a7f257d5..93ac8d6e6 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentBuilderImages.cs b/Examples/ApiExamples/ApiExamples/ExDocumentBuilderImages.cs index 4afcda490..2eb5c363a 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentBuilderImages.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentBuilderImages.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentProperties.cs b/Examples/ApiExamples/ApiExamples/ExDocumentProperties.cs index 0668a7ebe..4065d69ca 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentProperties.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentProperties.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentVisitor.cs b/Examples/ApiExamples/ApiExamples/ExDocumentVisitor.cs index 9f91ccb63..eff29c04a 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentVisitor.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentVisitor.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExDrawing.cs b/Examples/ApiExamples/ApiExamples/ExDrawing.cs index 754d826c4..0a2a1ed6d 100644 --- a/Examples/ApiExamples/ApiExamples/ExDrawing.cs +++ b/Examples/ApiExamples/ApiExamples/ExDrawing.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExEditableRange.cs b/Examples/ApiExamples/ApiExamples/ExEditableRange.cs index 21e1a9698..19c2bc604 100644 --- a/Examples/ApiExamples/ApiExamples/ExEditableRange.cs +++ b/Examples/ApiExamples/ApiExamples/ExEditableRange.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExField.cs b/Examples/ApiExamples/ApiExamples/ExField.cs index a1448efd2..cb7dbdcdf 100644 --- a/Examples/ApiExamples/ApiExamples/ExField.cs +++ b/Examples/ApiExamples/ApiExamples/ExField.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExFieldOptions.cs b/Examples/ApiExamples/ApiExamples/ExFieldOptions.cs index 9070acde7..fe827ff86 100644 --- a/Examples/ApiExamples/ApiExamples/ExFieldOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExFieldOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExFile.cs b/Examples/ApiExamples/ApiExamples/ExFile.cs index 549bd2a26..670f0c075 100644 --- a/Examples/ApiExamples/ApiExamples/ExFile.cs +++ b/Examples/ApiExamples/ApiExamples/ExFile.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExFont.cs b/Examples/ApiExamples/ApiExamples/ExFont.cs index 8c469cffb..6358caffb 100644 --- a/Examples/ApiExamples/ApiExamples/ExFont.cs +++ b/Examples/ApiExamples/ApiExamples/ExFont.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExFontSettings.cs b/Examples/ApiExamples/ApiExamples/ExFontSettings.cs index c8cb39f82..8678be221 100644 --- a/Examples/ApiExamples/ApiExamples/ExFontSettings.cs +++ b/Examples/ApiExamples/ApiExamples/ExFontSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExFormFields.cs b/Examples/ApiExamples/ApiExamples/ExFormFields.cs index 949b52a5e..8cba33316 100644 --- a/Examples/ApiExamples/ApiExamples/ExFormFields.cs +++ b/Examples/ApiExamples/ApiExamples/ExFormFields.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs b/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs index e570d7b2a..5790553b9 100644 --- a/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs +++ b/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExHtmlFixedSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExHtmlFixedSaveOptions.cs index c588bcd6b..0ae214f32 100644 --- a/Examples/ApiExamples/ApiExamples/ExHtmlFixedSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExHtmlFixedSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExHtmlLoadOptions.cs b/Examples/ApiExamples/ApiExamples/ExHtmlLoadOptions.cs index 767f862f7..183206649 100644 --- a/Examples/ApiExamples/ApiExamples/ExHtmlLoadOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExHtmlLoadOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs index f92fca428..be82872be 100644 --- a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExHyphenation.cs b/Examples/ApiExamples/ApiExamples/ExHyphenation.cs index 8c4043c32..88846dfe9 100644 --- a/Examples/ApiExamples/ApiExamples/ExHyphenation.cs +++ b/Examples/ApiExamples/ApiExamples/ExHyphenation.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExImage.cs b/Examples/ApiExamples/ApiExamples/ExImage.cs index c0459588e..b2f1c101e 100644 --- a/Examples/ApiExamples/ApiExamples/ExImage.cs +++ b/Examples/ApiExamples/ApiExamples/ExImage.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs index 0f4dbd279..b3751badf 100644 --- a/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExInline.cs b/Examples/ApiExamples/ApiExamples/ExInline.cs index defe5aeca..ac8ba8ea2 100644 --- a/Examples/ApiExamples/ApiExamples/ExInline.cs +++ b/Examples/ApiExamples/ApiExamples/ExInline.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExInlineStory.cs b/Examples/ApiExamples/ApiExamples/ExInlineStory.cs index 91c59608b..efff4ef95 100644 --- a/Examples/ApiExamples/ApiExamples/ExInlineStory.cs +++ b/Examples/ApiExamples/ApiExamples/ExInlineStory.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExLayout.cs b/Examples/ApiExamples/ApiExamples/ExLayout.cs index 024cf0357..3ef103b6e 100644 --- a/Examples/ApiExamples/ApiExamples/ExLayout.cs +++ b/Examples/ApiExamples/ApiExamples/ExLayout.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExLicense.cs b/Examples/ApiExamples/ApiExamples/ExLicense.cs index 12b07679f..4c1ee14bd 100644 --- a/Examples/ApiExamples/ApiExamples/ExLicense.cs +++ b/Examples/ApiExamples/ApiExamples/ExLicense.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExLists.cs b/Examples/ApiExamples/ApiExamples/ExLists.cs index 404da51af..ee32d501c 100644 --- a/Examples/ApiExamples/ApiExamples/ExLists.cs +++ b/Examples/ApiExamples/ApiExamples/ExLists.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExLoadOptions.cs b/Examples/ApiExamples/ApiExamples/ExLoadOptions.cs index da5950f19..ae8f13568 100644 --- a/Examples/ApiExamples/ApiExamples/ExLoadOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExLoadOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExLowCode.cs b/Examples/ApiExamples/ApiExamples/ExLowCode.cs index 941095b24..c533dbda0 100644 --- a/Examples/ApiExamples/ApiExamples/ExLowCode.cs +++ b/Examples/ApiExamples/ApiExamples/ExLowCode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExMailMerge.cs b/Examples/ApiExamples/ApiExamples/ExMailMerge.cs index 4f9c7b7c3..138f7c707 100644 --- a/Examples/ApiExamples/ApiExamples/ExMailMerge.cs +++ b/Examples/ApiExamples/ApiExamples/ExMailMerge.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExMailMergeCustom.cs b/Examples/ApiExamples/ApiExamples/ExMailMergeCustom.cs index 95f2807bb..3971d5ea3 100644 --- a/Examples/ApiExamples/ApiExamples/ExMailMergeCustom.cs +++ b/Examples/ApiExamples/ApiExamples/ExMailMergeCustom.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExMailMergeCustomNested.cs b/Examples/ApiExamples/ApiExamples/ExMailMergeCustomNested.cs index 32a77c58b..c5c2f6755 100644 --- a/Examples/ApiExamples/ApiExamples/ExMailMergeCustomNested.cs +++ b/Examples/ApiExamples/ApiExamples/ExMailMergeCustomNested.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExMailMergeEvent.cs b/Examples/ApiExamples/ApiExamples/ExMailMergeEvent.cs index 140fe9c84..586c3a838 100644 --- a/Examples/ApiExamples/ApiExamples/ExMailMergeEvent.cs +++ b/Examples/ApiExamples/ApiExamples/ExMailMergeEvent.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExMarkdownLoadOptions.cs b/Examples/ApiExamples/ApiExamples/ExMarkdownLoadOptions.cs index f67f2d7e7..314ee6282 100644 --- a/Examples/ApiExamples/ApiExamples/ExMarkdownLoadOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExMarkdownLoadOptions.cs @@ -1,4 +1,11 @@ -using System; +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// + +using System; using System.IO; using System.Text; using Aspose.Words; diff --git a/Examples/ApiExamples/ApiExamples/ExMarkdownSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExMarkdownSaveOptions.cs index cfba8575d..2611a2527 100644 --- a/Examples/ApiExamples/ApiExamples/ExMarkdownSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExMarkdownSaveOptions.cs @@ -1,4 +1,10 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// + using System; using System.Drawing; using System.IO; diff --git a/Examples/ApiExamples/ApiExamples/ExMetered.cs b/Examples/ApiExamples/ApiExamples/ExMetered.cs index ba00916be..e4f94602f 100644 --- a/Examples/ApiExamples/ApiExamples/ExMetered.cs +++ b/Examples/ApiExamples/ApiExamples/ExMetered.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExMossDoc2Pdf.cs b/Examples/ApiExamples/ApiExamples/ExMossDoc2Pdf.cs index cece6a3d8..c2863c1dc 100644 --- a/Examples/ApiExamples/ApiExamples/ExMossDoc2Pdf.cs +++ b/Examples/ApiExamples/ApiExamples/ExMossDoc2Pdf.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExMossRtf2Docx.cs b/Examples/ApiExamples/ApiExamples/ExMossRtf2Docx.cs index e642ccb0d..91a5d6115 100644 --- a/Examples/ApiExamples/ApiExamples/ExMossRtf2Docx.cs +++ b/Examples/ApiExamples/ApiExamples/ExMossRtf2Docx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExNode.cs b/Examples/ApiExamples/ApiExamples/ExNode.cs index 0a626feee..f6ab341e2 100644 --- a/Examples/ApiExamples/ApiExamples/ExNode.cs +++ b/Examples/ApiExamples/ApiExamples/ExNode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExNodeImporter.cs b/Examples/ApiExamples/ApiExamples/ExNodeImporter.cs index 901b4f561..37bace797 100644 --- a/Examples/ApiExamples/ApiExamples/ExNodeImporter.cs +++ b/Examples/ApiExamples/ApiExamples/ExNodeImporter.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExOdtSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExOdtSaveOptions.cs index 1fa2a991f..60ab55fc1 100644 --- a/Examples/ApiExamples/ApiExamples/ExOdtSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExOdtSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExOoxmlSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExOoxmlSaveOptions.cs index cc13cb3a2..dd94e2147 100644 --- a/Examples/ApiExamples/ApiExamples/ExOoxmlSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExOoxmlSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPageSetup.cs b/Examples/ApiExamples/ApiExamples/ExPageSetup.cs index c948776bd..699d49198 100644 --- a/Examples/ApiExamples/ApiExamples/ExPageSetup.cs +++ b/Examples/ApiExamples/ApiExamples/ExPageSetup.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExParagraph.cs b/Examples/ApiExamples/ApiExamples/ExParagraph.cs index d29d92377..0957ff452 100644 --- a/Examples/ApiExamples/ApiExamples/ExParagraph.cs +++ b/Examples/ApiExamples/ApiExamples/ExParagraph.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs b/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs index c91e4fe6c..5382cf7bc 100644 --- a/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs +++ b/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPclSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExPclSaveOptions.cs index ce89fbc9b..c8416ae3d 100644 --- a/Examples/ApiExamples/ApiExamples/ExPclSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExPclSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPdf2Word.cs b/Examples/ApiExamples/ApiExamples/ExPdf2Word.cs index ea35782f8..85895262d 100644 --- a/Examples/ApiExamples/ApiExamples/ExPdf2Word.cs +++ b/Examples/ApiExamples/ApiExamples/ExPdf2Word.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPdfLoadOptions.cs b/Examples/ApiExamples/ApiExamples/ExPdfLoadOptions.cs index 886ab962a..4477002bb 100644 --- a/Examples/ApiExamples/ApiExamples/ExPdfLoadOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExPdfLoadOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs index 5b56f4221..79b4d0180 100644 --- a/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPlainTextDocument.cs b/Examples/ApiExamples/ApiExamples/ExPlainTextDocument.cs index 6a3a89064..e5c388cb2 100644 --- a/Examples/ApiExamples/ApiExamples/ExPlainTextDocument.cs +++ b/Examples/ApiExamples/ApiExamples/ExPlainTextDocument.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPrinting.cs b/Examples/ApiExamples/ApiExamples/ExPrinting.cs index 0701eaaad..b75a1d459 100644 --- a/Examples/ApiExamples/ApiExamples/ExPrinting.cs +++ b/Examples/ApiExamples/ApiExamples/ExPrinting.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExPsSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExPsSaveOptions.cs index 630d95a57..eb16296ea 100644 --- a/Examples/ApiExamples/ApiExamples/ExPsSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExPsSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExRange.cs b/Examples/ApiExamples/ApiExamples/ExRange.cs index 3b2f34221..bb0eb976d 100644 --- a/Examples/ApiExamples/ApiExamples/ExRange.cs +++ b/Examples/ApiExamples/ApiExamples/ExRange.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExRenameMergeFields.cs b/Examples/ApiExamples/ApiExamples/ExRenameMergeFields.cs index b0ae429f5..9e6075639 100644 --- a/Examples/ApiExamples/ApiExamples/ExRenameMergeFields.cs +++ b/Examples/ApiExamples/ApiExamples/ExRenameMergeFields.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExRendering.cs b/Examples/ApiExamples/ApiExamples/ExRendering.cs index 43eea114d..b3e322d26 100644 --- a/Examples/ApiExamples/ApiExamples/ExRendering.cs +++ b/Examples/ApiExamples/ApiExamples/ExRendering.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExReplaceHyperlinks.cs b/Examples/ApiExamples/ApiExamples/ExReplaceHyperlinks.cs index ef7a54eee..448fed35e 100644 --- a/Examples/ApiExamples/ApiExamples/ExReplaceHyperlinks.cs +++ b/Examples/ApiExamples/ApiExamples/ExReplaceHyperlinks.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExReportingEngine.cs b/Examples/ApiExamples/ApiExamples/ExReportingEngine.cs index 430caea0b..dc7719650 100644 --- a/Examples/ApiExamples/ApiExamples/ExReportingEngine.cs +++ b/Examples/ApiExamples/ApiExamples/ExReportingEngine.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExRevision.cs b/Examples/ApiExamples/ApiExamples/ExRevision.cs index 8f3a42e3d..0c816bfba 100644 --- a/Examples/ApiExamples/ApiExamples/ExRevision.cs +++ b/Examples/ApiExamples/ApiExamples/ExRevision.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided @@ -400,7 +400,7 @@ public void TrackRevisions() // We can accept/reject these revisions programmatically // by calling methods such as Document.AcceptAllRevisions, or each revision's Accept method. // In Microsoft Word, we can process them manually via "Review" -> "Changes". - doc.Save(ArtifactsDir + "Document.StartTrackRevisions.docx"); + doc.Save(ArtifactsDir + "Revision.StartTrackRevisions.docx"); //ExEnd } @@ -600,10 +600,10 @@ public void CompareOptions() }; docOriginal.Compare(docEdited, "John Doe", DateTime.Now, compareOptions); - docOriginal.Save(ArtifactsDir + "Document.CompareOptions.docx"); + docOriginal.Save(ArtifactsDir + "Revision.CompareOptions.docx"); //ExEnd - docOriginal = new Document(ArtifactsDir + "Document.CompareOptions.docx"); + docOriginal = new Document(ArtifactsDir + "Revision.CompareOptions.docx"); TestUtil.VerifyFootnote(FootnoteType.Endnote, true, string.Empty, "OriginalEdited endnote text.", (Footnote)docOriginal.GetChild(NodeType.Footnote, 0, true)); @@ -662,7 +662,7 @@ public void LayoutOptionsRevisions() doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false; doc.LayoutOptions.RevisionOptions.RevisionBarsPosition = HorizontalAlignment.Right; - doc.Save(ArtifactsDir + "Document.LayoutOptionsRevisions.pdf"); + doc.Save(ArtifactsDir + "Revision.LayoutOptionsRevisions.pdf"); //ExEnd } diff --git a/Examples/ApiExamples/ApiExamples/ExRtfLoadOptions.cs b/Examples/ApiExamples/ApiExamples/ExRtfLoadOptions.cs index 25341080e..139110341 100644 --- a/Examples/ApiExamples/ApiExamples/ExRtfLoadOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExRtfLoadOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExRtfSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExRtfSaveOptions.cs index 707e8e31a..98eec61dd 100644 --- a/Examples/ApiExamples/ApiExamples/ExRtfSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExRtfSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExSavingCallback.cs b/Examples/ApiExamples/ApiExamples/ExSavingCallback.cs index d06fcdca6..6755f9cde 100644 --- a/Examples/ApiExamples/ApiExamples/ExSavingCallback.cs +++ b/Examples/ApiExamples/ApiExamples/ExSavingCallback.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExSection.cs b/Examples/ApiExamples/ApiExamples/ExSection.cs index ba951d56e..3b4e36cc1 100644 --- a/Examples/ApiExamples/ApiExamples/ExSection.cs +++ b/Examples/ApiExamples/ApiExamples/ExSection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExShape.cs b/Examples/ApiExamples/ApiExamples/ExShape.cs index 6392c0b78..e6552152b 100644 --- a/Examples/ApiExamples/ApiExamples/ExShape.cs +++ b/Examples/ApiExamples/ApiExamples/ExShape.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExSignDocumentCustom.cs b/Examples/ApiExamples/ApiExamples/ExSignDocumentCustom.cs index 65198a97f..ebc04e617 100644 --- a/Examples/ApiExamples/ApiExamples/ExSignDocumentCustom.cs +++ b/Examples/ApiExamples/ApiExamples/ExSignDocumentCustom.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExSmartTag.cs b/Examples/ApiExamples/ApiExamples/ExSmartTag.cs index 934d6470b..49e010a35 100644 --- a/Examples/ApiExamples/ApiExamples/ExSmartTag.cs +++ b/Examples/ApiExamples/ApiExamples/ExSmartTag.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExStructuredDocumentTag.cs b/Examples/ApiExamples/ApiExamples/ExStructuredDocumentTag.cs index 069ffc6fd..b0a654e2d 100644 --- a/Examples/ApiExamples/ApiExamples/ExStructuredDocumentTag.cs +++ b/Examples/ApiExamples/ApiExamples/ExStructuredDocumentTag.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExStyles.cs b/Examples/ApiExamples/ApiExamples/ExStyles.cs index f8aafe729..c1b9f89ee 100644 --- a/Examples/ApiExamples/ApiExamples/ExStyles.cs +++ b/Examples/ApiExamples/ApiExamples/ExStyles.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExSvgSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExSvgSaveOptions.cs index 0a7108cb4..a120bcd93 100644 --- a/Examples/ApiExamples/ApiExamples/ExSvgSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExSvgSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExTabStop.cs b/Examples/ApiExamples/ApiExamples/ExTabStop.cs index d245a90b6..2c04d5e05 100644 --- a/Examples/ApiExamples/ApiExamples/ExTabStop.cs +++ b/Examples/ApiExamples/ApiExamples/ExTabStop.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExTable.cs b/Examples/ApiExamples/ApiExamples/ExTable.cs index 170b0a4a3..3a58e830c 100644 --- a/Examples/ApiExamples/ApiExamples/ExTable.cs +++ b/Examples/ApiExamples/ApiExamples/ExTable.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExTableColumn.cs b/Examples/ApiExamples/ApiExamples/ExTableColumn.cs index ec3b63a1d..862b49fe8 100644 --- a/Examples/ApiExamples/ApiExamples/ExTableColumn.cs +++ b/Examples/ApiExamples/ApiExamples/ExTableColumn.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExThemes.cs b/Examples/ApiExamples/ApiExamples/ExThemes.cs index 7514ebbd9..92d5de987 100644 --- a/Examples/ApiExamples/ApiExamples/ExThemes.cs +++ b/Examples/ApiExamples/ApiExamples/ExThemes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExTxtLoadOptions.cs b/Examples/ApiExamples/ApiExamples/ExTxtLoadOptions.cs index defd93cf5..71cf817d6 100644 --- a/Examples/ApiExamples/ApiExamples/ExTxtLoadOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExTxtLoadOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs index 3c3b26b03..836d09ce6 100644 --- a/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExUtilityClasses.cs b/Examples/ApiExamples/ApiExamples/ExUtilityClasses.cs index ed00ac13f..80cf49d53 100644 --- a/Examples/ApiExamples/ApiExamples/ExUtilityClasses.cs +++ b/Examples/ApiExamples/ApiExamples/ExUtilityClasses.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExVariableCollection.cs b/Examples/ApiExamples/ApiExamples/ExVariableCollection.cs index 752921929..658d5e5f0 100644 --- a/Examples/ApiExamples/ApiExamples/ExVariableCollection.cs +++ b/Examples/ApiExamples/ApiExamples/ExVariableCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExVbaProject.cs b/Examples/ApiExamples/ApiExamples/ExVbaProject.cs index 985783545..18fbc0691 100644 --- a/Examples/ApiExamples/ApiExamples/ExVbaProject.cs +++ b/Examples/ApiExamples/ApiExamples/ExVbaProject.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExViewOptions.cs b/Examples/ApiExamples/ApiExamples/ExViewOptions.cs index e2540d327..774cc3976 100644 --- a/Examples/ApiExamples/ApiExamples/ExViewOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExViewOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs index b62648e7c..2599e781a 100644 --- a/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExXamlFixedSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExXamlFixedSaveOptions.cs index ef089f85d..2a3817d67 100644 --- a/Examples/ApiExamples/ApiExamples/ExXamlFixedSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExXamlFixedSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExXamlFlowSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExXamlFlowSaveOptions.cs index 6816c55db..565835760 100644 --- a/Examples/ApiExamples/ApiExamples/ExXamlFlowSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExXamlFlowSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExXlsxSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExXlsxSaveOptions.cs index 7c54a1842..ee1ffbd9d 100644 --- a/Examples/ApiExamples/ApiExamples/ExXlsxSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExXlsxSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/ExXpsSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExXpsSaveOptions.cs index 17cd32dcd..a1d26a07f 100644 --- a/Examples/ApiExamples/ApiExamples/ExXpsSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExXpsSaveOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided diff --git a/Examples/ApiExamples/ApiExamples/TestUtil.cs b/Examples/ApiExamples/ApiExamples/TestUtil.cs index f435228ad..3d55aee0a 100644 --- a/Examples/ApiExamples/ApiExamples/TestUtil.cs +++ b/Examples/ApiExamples/ApiExamples/TestUtil.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. // // This file is part of Aspose.Words. The source code in this file // is only intended as a supplement to the documentation, and is provided From 32c78f5d752e4a2b2a903be69e074a13f54519ea Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 4 Feb 2025 11:56:58 +0300 Subject: [PATCH 56/61] Added examples for API 25.2 --- Examples/ApiExamples/ApiExamples/ExFont.cs | 31 +++++++++++++++++++ Examples/ApiExamples/ApiExamples/ExLists.cs | 34 +++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/Examples/ApiExamples/ApiExamples/ExFont.cs b/Examples/ApiExamples/ApiExamples/ExFont.cs index 6358caffb..aa637c4f7 100644 --- a/Examples/ApiExamples/ApiExamples/ExFont.cs +++ b/Examples/ApiExamples/ApiExamples/ExFont.cs @@ -16,6 +16,7 @@ using Aspose.Words.Fields; using Aspose.Words.Fonts; using Aspose.Words.Notes; +using Aspose.Words.Settings; using Aspose.Words.Tables; using Aspose.Words.Themes; using NUnit.Framework; @@ -1700,5 +1701,35 @@ public void PhysicalFontInfoEmbeddingLicensingRights() } //ExEnd:PhysicalFontInfoEmbeddingLicensingRights } + + [Test] + public void NumberSpacing() + { + //ExStart:NumberSpacing + //ReleaseVersion:25.2 + //ExFor:Font.NumberSpacing + //ExFor:NumSpacing + //ExSummary:Shows how to set the spacing type of the numeral. + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + + // This effect is only supported in newer versions of MS Word. + doc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2019); + + builder.Write("1 "); + builder.Write("This is an example"); + + Run run = doc.FirstSection.Body.FirstParagraph.Runs[0]; + if (run.Font.NumberSpacing == NumSpacing.Default) + run.Font.NumberSpacing = NumSpacing.Proportional; + + doc.Save(ArtifactsDir + "Fonts.NumberSpacing.docx"); + //ExEnd:NumberSpacing + + doc = new Document(ArtifactsDir + "Fonts.NumberSpacing.docx"); + + run = doc.FirstSection.Body.FirstParagraph.Runs[0]; + Assert.AreEqual(NumSpacing.Proportional, run.Font.NumberSpacing); + } } } \ No newline at end of file diff --git a/Examples/ApiExamples/ApiExamples/ExLists.cs b/Examples/ApiExamples/ApiExamples/ExLists.cs index ee32d501c..e6817a8af 100644 --- a/Examples/ApiExamples/ApiExamples/ExLists.cs +++ b/Examples/ApiExamples/ApiExamples/ExLists.cs @@ -1030,5 +1030,39 @@ public void SetCustomNumberStyleFormat() Assert.AreEqual("002.", paras[2].ListLabel.LabelString); //ExEnd:SetCustomNumberStyleFormat } + + [Test] + public void AddSingleLevelList() + { + //ExStart:AddSingleLevelList + //ReleaseVersion:25.2 + //ExFor:ListCollection.AddSingleLevelList(ListTemplate) + //ExSummary:Shows how to create a new single level list based on the predefined template. + Document doc = new Document(); + DocumentBuilder builder = new DocumentBuilder(doc); + ListCollection listCollection = doc.Lists; + + // Creates the bulleted list from BulletCircle template. + List bulletedList = listCollection.AddSingleLevelList(ListTemplate.BulletCircle); + + // Writes the bulleted list to the resulting document. + builder.Writeln("Bulleted list starts below:"); + builder.ListFormat.List = bulletedList; + builder.Writeln("Item 1"); + builder.Writeln("Item 2"); + builder.ListFormat.RemoveNumbers(); + + // Creates the numbered list from NumberUppercaseLetterDot template. + List numberedList = listCollection.AddSingleLevelList(ListTemplate.NumberUppercaseLetterDot); + + // Writes the numbered list to the resulting document. + builder.Writeln("Numbered list starts below:"); + builder.ListFormat.List = numberedList; + builder.Writeln("Item 1"); + builder.Writeln("Item 2"); + + doc.Save(ArtifactsDir + "Lists.AddSingleLevelList.docx"); + //ExEnd:AddSingleLevelList + } } } \ No newline at end of file From c7129a12590d2926c0cdd8cd2fd07437a3fd011f Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 4 Feb 2025 12:03:56 +0300 Subject: [PATCH 57/61] Added gist --- Examples/ApiExamples/ApiExamples/ExFont.cs | 2 +- Examples/ApiExamples/ApiExamples/ExLists.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ExFont.cs b/Examples/ApiExamples/ApiExamples/ExFont.cs index aa637c4f7..4c972d04e 100644 --- a/Examples/ApiExamples/ApiExamples/ExFont.cs +++ b/Examples/ApiExamples/ApiExamples/ExFont.cs @@ -1706,7 +1706,7 @@ public void PhysicalFontInfoEmbeddingLicensingRights() public void NumberSpacing() { //ExStart:NumberSpacing - //ReleaseVersion:25.2 + //GistId:95fdae949cefbf2ce485acc95cccc495 //ExFor:Font.NumberSpacing //ExFor:NumSpacing //ExSummary:Shows how to set the spacing type of the numeral. diff --git a/Examples/ApiExamples/ApiExamples/ExLists.cs b/Examples/ApiExamples/ApiExamples/ExLists.cs index e6817a8af..64a55c938 100644 --- a/Examples/ApiExamples/ApiExamples/ExLists.cs +++ b/Examples/ApiExamples/ApiExamples/ExLists.cs @@ -1035,7 +1035,7 @@ public void SetCustomNumberStyleFormat() public void AddSingleLevelList() { //ExStart:AddSingleLevelList - //ReleaseVersion:25.2 + //GistId:95fdae949cefbf2ce485acc95cccc495 //ExFor:ListCollection.AddSingleLevelList(ListTemplate) //ExSummary:Shows how to create a new single level list based on the predefined template. Document doc = new Document(); From b9b88ea620310bca23f30216014280f4f23ad3bd Mon Sep 17 00:00:00 2001 From: vderyushev Date: Tue, 4 Feb 2025 15:10:15 +0300 Subject: [PATCH 58/61] Fixed examples --- Examples/ApiExamples/ApiExamples/ExField.cs | 18 +++++++++--------- .../ApiExamples/ExHtmlSaveOptions.cs | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ExField.cs b/Examples/ApiExamples/ApiExamples/ExField.cs index cb7dbdcdf..b81c11a68 100644 --- a/Examples/ApiExamples/ApiExamples/ExField.cs +++ b/Examples/ApiExamples/ApiExamples/ExField.cs @@ -4671,25 +4671,25 @@ public void FieldStyleRefParagraphNumbers() field = (FieldStyleRef)doc.Range.Fields[2]; - TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\n", "b )", field); + TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\n", "‎b )", field); Assert.AreEqual("Quote", field.StyleName); Assert.True(field.InsertParagraphNumber); field = (FieldStyleRef)doc.Range.Fields[3]; - TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\r", "b )", field); + TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\r", "‎b )", field); Assert.AreEqual("Quote", field.StyleName); Assert.True(field.InsertParagraphNumberInRelativeContext); field = (FieldStyleRef)doc.Range.Fields[4]; - TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\w", "1.b )", field); + TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\w", "‎1.b )", field); Assert.AreEqual("Quote", field.StyleName); Assert.True(field.InsertParagraphNumberInFullContext); field = (FieldStyleRef)doc.Range.Fields[5]; - TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\w \\t", "1.b)", field); + TestUtil.VerifyField(FieldType.FieldStyleRef, " STYLEREF Quote \\w \\t", "‎1.b)", field); Assert.AreEqual("Quote", field.StyleName); Assert.True(field.InsertParagraphNumberInFullContext); Assert.True(field.SuppressNonDelimiters); @@ -6181,28 +6181,28 @@ private void TestFieldRef(Document doc) field = (FieldRef)doc.Range.Fields[2]; - TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\n", ">>> i", field); + TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\n", "‎>>> i", field); Assert.AreEqual("MyBookmark", field.BookmarkName); Assert.True(field.InsertParagraphNumber); Assert.AreEqual(" REF MyBookmark \\n", field.GetFieldCode()); - Assert.AreEqual(">>> i", field.Result); + Assert.AreEqual("‎>>> i", field.Result); field = (FieldRef)doc.Range.Fields[3]; - TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\n \\t", "i", field); + TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\n \\t", "‎i", field); Assert.AreEqual("MyBookmark", field.BookmarkName); Assert.True(field.InsertParagraphNumber); Assert.True(field.SuppressNonDelimiters); field = (FieldRef)doc.Range.Fields[4]; - TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\w", "> 4>> c>>> i", field); + TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\w", "‎> 4>> c>>> i", field); Assert.AreEqual("MyBookmark", field.BookmarkName); Assert.True(field.InsertParagraphNumberInFullContext); field = (FieldRef)doc.Range.Fields[5]; - TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\r", ">> c>>> i", field); + TestUtil.VerifyField(FieldType.FieldRef, " REF MyBookmark \\r", "‎>> c>>> i", field); Assert.AreEqual("MyBookmark", field.BookmarkName); Assert.True(field.InsertParagraphNumberInRelativeContext); } diff --git a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs index be82872be..2bca80b0f 100644 --- a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs @@ -1747,7 +1747,7 @@ public void ScaleImageToShapeSize(bool scaleImageToShapeSize) #if NET461_OR_GREATER || JAVA Assert.IsTrue(testedImageLength < 3000); #elif NET5_0_OR_GREATER - Assert.IsTrue(testedImageLength < 6000); + Assert.IsTrue(testedImageLength < 6200); #endif else Assert.IsTrue(testedImageLength < 16000); From 4336345f9bd1bfed3ecbfeac476124040a7d8e77 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Fri, 14 Feb 2025 12:42:58 +0300 Subject: [PATCH 59/61] Updated to API 25.2 --- .../ApiExamples/ApiExamples/ApiExamples.csproj | 18 +++++++++--------- .../ApiExamples/Runner.MAUI/Runner.MAUI.csproj | 14 +++++++------- Examples/DocsExamples/Docker/Docker.csproj | 2 +- .../DocsExamples/DocsExamples.csproj | 10 +++++----- .../Working with Comments.cs | 3 +-- .../DocumentExplorer/DocumentExplorer.csproj | 2 +- .../PluginsExamples/PluginsExamples.csproj | 6 +++--- 7 files changed, 27 insertions(+), 28 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ApiExamples.csproj b/Examples/ApiExamples/ApiExamples/ApiExamples.csproj index 063f8f7e4..d44debd3d 100644 --- a/Examples/ApiExamples/ApiExamples/ApiExamples.csproj +++ b/Examples/ApiExamples/ApiExamples/ApiExamples.csproj @@ -126,16 +126,16 @@ - - - - - - - - + + + + + + + + - + all runtime; build; native; contentfiles; analyzers diff --git a/Examples/ApiExamples/Runner.MAUI/Runner.MAUI.csproj b/Examples/ApiExamples/Runner.MAUI/Runner.MAUI.csproj index c102ef579..abeef24c6 100644 --- a/Examples/ApiExamples/Runner.MAUI/Runner.MAUI.csproj +++ b/Examples/ApiExamples/Runner.MAUI/Runner.MAUI.csproj @@ -49,20 +49,20 @@ - - - - + + + + - + - + - + diff --git a/Examples/DocsExamples/Docker/Docker.csproj b/Examples/DocsExamples/Docker/Docker.csproj index ac853cf01..c14ebad1f 100644 --- a/Examples/DocsExamples/Docker/Docker.csproj +++ b/Examples/DocsExamples/Docker/Docker.csproj @@ -6,7 +6,7 @@ - + diff --git a/Examples/DocsExamples/DocsExamples/DocsExamples.csproj b/Examples/DocsExamples/DocsExamples/DocsExamples.csproj index 62829d479..782f1efaa 100644 --- a/Examples/DocsExamples/DocsExamples/DocsExamples.csproj +++ b/Examples/DocsExamples/DocsExamples/DocsExamples.csproj @@ -117,12 +117,12 @@ - - - - + + + + - + diff --git a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs index 21cc1c61b..c4ec9d5bb 100644 --- a/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs +++ b/Examples/DocsExamples/DocsExamples/Programming with Documents/Working with Comments.cs @@ -197,9 +197,8 @@ public void RemoveRangeText() Document doc = new Document(MyDir + "Comments.docx"); CommentRangeStart commentStart = (CommentRangeStart)doc.GetChild(NodeType.CommentRangeStart, 0, true); - CommentRangeEnd commentEnd = (CommentRangeEnd)doc.GetChild(NodeType.CommentRangeEnd, 0, true); - Node currentNode = commentStart; + bool isRemoving = true; while (currentNode != null && isRemoving) { diff --git a/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj b/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj index 299db9e17..cade5bc86 100644 --- a/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj +++ b/Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj @@ -141,7 +141,7 @@ - 25.1.0 + 25.2.0 diff --git a/Examples/DocsExamples/PluginsExamples/PluginsExamples.csproj b/Examples/DocsExamples/PluginsExamples/PluginsExamples.csproj index 3916c8dde..8d1e2ed70 100644 --- a/Examples/DocsExamples/PluginsExamples/PluginsExamples.csproj +++ b/Examples/DocsExamples/PluginsExamples/PluginsExamples.csproj @@ -11,10 +11,10 @@ - - + + - + From 0c6f05bd0e1a8d9d71c884a725984d43b40c0309 Mon Sep 17 00:00:00 2001 From: vderyushev Date: Mon, 24 Feb 2025 12:45:20 +0300 Subject: [PATCH 60/61] Updated examples and documents --- .../Rendering and Printing/Print documents.cs | 4 +- .../AsposeWords features/Add table.cs | 12 +- .../Change or replace header and footer.cs | 11 +- .../Change text in a table.cs | 13 +- .../Convert from docm to docx.cs | 13 +- .../AsposeWords features/Create a document.cs | 11 +- .../Create and add a paragraph style.cs | 15 +- .../Extract image from word document.cs | 34 +-- .../All field update.cs | 7 +- .../Convert document to EPUB.cs | 7 +- .../Convert to Mhtml email.cs | 7 +- .../Convert to Rtf.cs | 8 +- .../Convert to byte array.cs | 7 +- .../Converting document to Pdf.cs | 10 +- .../Execute simple mail merge.cs | 11 +- .../Find and replace.cs | 7 +- .../Insert table of content.cs | 7 +- .../Inserting form fields.cs | 7 +- .../Joining multiple documents.cs | 7 +- .../Joining tables.cs | 7 +- .../Keeping the content from split.cs | 9 +- .../Mail merge from xml using DataSet.cs | 7 +- .../Nested mail merge regions.cs | 7 +- .../Obtaining form fields.cs | 7 +- .../Print document via Xps Api.cs | 7 +- .../Render shapes.cs | 243 ++++++++---------- .../Save as multipage tiff.cs | 28 +- .../Save doc as png.cs | 9 +- .../Splitting tables.cs | 12 +- .../Xps print helper.cs | 135 +++++----- .../Get and set bookmark text.cs | 14 +- .../AsposeWords features/Insert a comment.cs | 53 ++-- .../Insert picture in word document.cs | 9 +- .../Open and add text to word document.cs | 23 +- .../Open document from stream.cs | 18 +- .../Open read only access.cs | 15 +- .../AsposeWords features/Remove comments.cs | 29 +-- .../Remove header footer.cs | 18 +- .../Remove hidden text.cs | 13 +- .../Remove page breaks.cs | 24 +- .../Remove section breaks.cs | 7 +- .../AsposeWords features/Retrieve comments.cs | 7 +- .../Search and replace text.cs | 11 +- .../AsposeWords/AsposeWordsVSOpenXML.csproj | 128 ++------- .../AsposeWords/OpenXML features/Add table.cs | 128 ++++----- .../Change or replace header and footer.cs | 178 ++++++------- .../Change text in a table.cs | 67 +++-- .../Convert from docm to docx.cs | 48 ++-- .../OpenXML features/Create a document.cs | 32 ++- .../Create and add a paragraph style.cs | 176 ++++--------- .../Extract image from word document.cs | 57 +++- .../Get and set bookmark text.cs | 50 +++- .../OpenXML features/Insert a comment.cs | 91 ++++--- .../Insert picture in word document.cs | 183 +++++++------ .../Open and add text to word document.cs | 45 +++- .../Open document from stream.cs | 46 +++- .../OpenXML features/Open read only access.cs | 4 +- .../OpenXML features/Remove comments.cs | 97 ++++--- .../OpenXML features/Remove header footer.cs | 19 +- .../OpenXML features/Remove hidden text.cs | 51 ++-- .../OpenXML features/Remove page breaks.cs | 29 ++- .../OpenXML features/Remove section breaks.cs | 39 ++- .../OpenXML features/Retrieve comments.cs | 11 +- .../Search and replace text.cs | 26 +- .../AsposeWords/Properties/AssemblyInfo.cs | 23 -- .../AsposeWords/TestUtil.cs | 70 +++-- .../Data/Bookmark.docx | Bin 0 -> 14336 bytes .../Data/Comments.docx | Bin 13833 -> 25134 bytes ...docx.docm => Docm to Docx conversion.docm} | Bin .../Data/Document.docx | Bin 13718 -> 18105 bytes .../Data/Get and set bookmark text.docx | Bin 13633 -> 0 bytes .../Data/Remove page breaks.docx | Bin 12321 -> 12322 bytes .../Data/Remove section breaks.docx | Bin 12322 -> 13046 bytes ...text in a table.docx => Replace text.docx} | Bin 12056 -> 12044 bytes 74 files changed, 1308 insertions(+), 1200 deletions(-) create mode 100644 Plugins/Aspose.Words Vs OpenXML Words/Data/Bookmark.docx rename Plugins/Aspose.Words Vs OpenXML Words/Data/{Convert from docm to docx.docm => Docm to Docx conversion.docm} (100%) delete mode 100644 Plugins/Aspose.Words Vs OpenXML Words/Data/Get and set bookmark text.docx rename Plugins/Aspose.Words Vs OpenXML Words/Data/{Change text in a table.docx => Replace text.docx} (74%) diff --git a/Examples/DocsExamples/DocsExamples/Rendering and Printing/Print documents.cs b/Examples/DocsExamples/DocsExamples/Rendering and Printing/Print documents.cs index 8cb53077c..a0e77668c 100644 --- a/Examples/DocsExamples/DocsExamples/Rendering and Printing/Print documents.cs +++ b/Examples/DocsExamples/DocsExamples/Rendering and Printing/Print documents.cs @@ -319,7 +319,7 @@ private XpsPrintHelper() { } - //ExStart:XpsPrint_PrintDocument + //ExStart:XpsPrint_PrintDocument /// /// Sends an Aspose.Words document to a printer using the XpsPrint API. /// @@ -345,7 +345,7 @@ public static void Print(Document document, string printerName, string jobName, } //ExEnd:XpsPrint_PrintDocument - //ExStart:XpsPrint_PrintStream + //ExStart:XpsPrint_PrintStream /// /// Sends a stream that contains a document in the XPS format to a printer using the XpsPrint API. /// Has no dependency on Aspose.Words, can be used in any project. diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Add table.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Add table.cs index 6d370d2ad..971172618 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Add table.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Add table.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -9,12 +14,11 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class AddTable : TestUtil { [Test] - public void AddTableFeature() + public void CreateTable() { Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); - // Build a 2x2 table. builder.StartTable(); builder.InsertCell(); builder.Write("Row 1, Cell 1 Content."); @@ -29,7 +33,7 @@ public void AddTableFeature() builder.EndRow(); builder.EndTable(); - doc.Save(ArtifactsDir + "Add table - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "CreateTable - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change or replace header and footer.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change or replace header and footer.cs index e4ff0b36c..2472f5ee7 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change or replace header and footer.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change or replace header and footer.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -9,7 +14,7 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class ChangeOrReplaceHeaderAndFooter : TestUtil { [Test] - public void ChangeOrReplaceHeaderAndFooterFeature() + public void CreateHeaderFooter() { Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -19,7 +24,7 @@ public void ChangeOrReplaceHeaderAndFooterFeature() builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary); builder.Write("Aspose.Words Footer"); - doc.Save(ArtifactsDir + "Change or replace header and footer - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Create header footer - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change text in a table.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change text in a table.cs index ac1f4c9f0..169893ca8 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change text in a table.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Change text in a table.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Replacing; @@ -11,23 +16,21 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features class ChangeTextInATable : TestUtil { [Test] - public void ChangeTextInATableFeature() + public void ReplaceText() { Document doc = new Document(MyDir + "Change text in a table.docx"); // Get the first table in the document. Table table = (Table)doc.GetChild(NodeType.Table, 0, true); - // Replace any instances of our string in the last cell of the table only. FindReplaceOptions options = new FindReplaceOptions { MatchCase = true, FindWholeWordsOnly = true }; - table.Rows[1].Cells[2].Range.Replace("Mr", "test", options); - doc.Save(ArtifactsDir + "Change text in a table - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Replace text - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Convert from docm to docx.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Convert from docm to docx.cs index 95001c136..a3a4d514c 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Convert from docm to docx.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Convert from docm to docx.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -9,10 +14,10 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class ConvertFromDocmToDocx : TestUtil { [Test] - public void ConvertFromDocmToDocxFeature() + public void DocmToDocxConversion() { - Document doc = new Document(MyDir + "Convert from docm to docx.docm"); - doc.Save(ArtifactsDir + "Convert from docm to docx - Aspose.Words.docx", SaveFormat.Docx); + Document doc = new Document(MyDir + "Docm to Docx conversion.docm"); + doc.Save(ArtifactsDir + "Docm to Docx conversion - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create a document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create a document.cs index 023146e63..58bba8b00 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create a document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create a document.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -9,14 +14,14 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class CreateADocument : TestUtil { [Test] - public void CreateADocumentFeature() + public void CreateNewDocument() { Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.Writeln("Hello World!"); - doc.Save(ArtifactsDir + "Create a document - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Create new document - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create and add a paragraph style.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create and add a paragraph style.cs index fefba59e3..1dafb3e00 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create and add a paragraph style.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Create and add a paragraph style.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -9,7 +14,7 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class CreateAndAddAParagraphStyle : TestUtil { [Test] - public void CreateAndAddAParagraphStyleFeature() + public void ParagraphCustomStyle() { Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); @@ -24,12 +29,12 @@ public void CreateAndAddAParagraphStyleFeature() font.Spacing = 5; font.Underline = Underline.Double; - builder.ParagraphFormat.Style = doc.Styles["MyStyle"]; - builder.MoveToDocumentEnd(); + + builder.ParagraphFormat.Style = doc.Styles["MyStyle"]; builder.Writeln("This string is formatted using the new style."); - doc.Save(ArtifactsDir + "Create and add a paragraph style - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Paragraph custom style - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Extract image from word document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Extract image from word document.cs index b160293a2..549e3ec41 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Extract image from word document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Extract image from word document.cs @@ -1,7 +1,10 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// -using System.Collections.Generic; -using System.IO; using System.Linq; using Aspose.Words; using Aspose.Words.Drawing; @@ -13,26 +16,23 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class ExtractImageFromWordDocument : TestUtil { [Test] - public void ExtractImageFromWordDocumentFeature() + public void ExtractImage() { Document doc = new Document(MyDir + "Extract image.docx"); - // Save the document to memory and reload it. - using (MemoryStream stream = new MemoryStream()) - { - doc.Save(stream, SaveFormat.Doc); - Document doc2 = new Document(stream); - - // "Shape" nodes that have the "HasImage" flag set contain and display images. - IEnumerable shapes = doc2.GetChildNodes(NodeType.Shape, true) - .OfType().Where(s => s.HasImage); + // Get the collection of shapes from the document, + // and save the image data of every shape with an image as a file to the local file system. + NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true); - int imageIndex = 0; - foreach (Shape shape in shapes) + int imageIndex = 0; + foreach (Shape shape in shapes.OfType()) + { + if (shape.HasImage) { + // The image data of shapes may contain images of many possible image formats. + // We can determine a file extension for each image automatically, based on its format. string imageFileName = - $"Image.ExportImages.{imageIndex}_Aspose.Words_{FileFormatUtil.ImageTypeToExtension(shape.ImageData.ImageType)}"; - + $"ExtractImage.{imageIndex}.Aspose.Words{FileFormatUtil.ImageTypeToExtension(shape.ImageData.ImageType)}"; shape.ImageData.Save(ArtifactsDir + imageFileName); imageIndex++; } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/All field update.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/All field update.cs index 2a256027f..9e3bf863b 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/All field update.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/All field update.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert document to EPUB.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert document to EPUB.cs index a5ae724b8..32ada353e 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert document to EPUB.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert document to EPUB.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Saving; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Mhtml email.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Mhtml email.cs index 9a99476c3..281033164 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Mhtml email.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Mhtml email.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; using Aspose.Email; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Rtf.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Rtf.cs index 4f3738ad5..b1ac7a947 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Rtf.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to Rtf.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -12,7 +17,6 @@ public class ConvertToRtf : TestUtil public static void ConvertToRtfFeature() { Document doc = new Document(MyDir + "Document.docx"); - doc.Save(ArtifactsDir + "Convert to Rtf - Aspose.Words.rtf"); } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to byte array.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to byte array.cs index 709373255..63815b523 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to byte array.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Convert to byte array.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; using Aspose.Words; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Converting document to Pdf.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Converting document to Pdf.cs index ce4b793bd..3b9cefa1f 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Converting document to Pdf.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Converting document to Pdf.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -12,8 +17,7 @@ public class ConvertingDocumentToPdf : TestUtil public static void ConvertingDocumentToPdfFeature() { Document doc = new Document(MyDir + "Document.docx"); - - doc.Save(ArtifactsDir + "Converting document to Pdf - Aspose.Words.pdf", SaveFormat.Pdf); + doc.Save(ArtifactsDir + "Converting document to Pdf - Aspose.Words.pdf"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Execute simple mail merge.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Execute simple mail merge.cs index 2a6736ff7..b2d664d14 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Execute simple mail merge.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Execute simple mail merge.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -15,8 +20,8 @@ public static void ExecuteSimpleMailMergeFeature() // Fill the fields in the document with user data. doc.MailMerge.Execute( - new string[] { "Name", "City" }, - new object[] { "Zeeshan", "Islamabad" }); + ["Name", "City"], + ["Zeeshan", "Islamabad"]); // Send the document in Word format to the client browser with an option to save to disk or open inside the current browser. doc.Save(ArtifactsDir + "Execute simple mail merge - Aspose.Words.docx"); diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Find and replace.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Find and replace.cs index d8e927b63..6b8ca9dcc 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Find and replace.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Find and replace.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.Text.RegularExpressions; using Aspose.Words; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Insert table of content.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Insert table of content.cs index 6cbafe367..2e086f609 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Insert table of content.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Insert table of content.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Inserting form fields.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Inserting form fields.cs index 1320afd0f..f78f7ef90 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Inserting form fields.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Inserting form fields.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining multiple documents.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining multiple documents.cs index f00d63835..de9543884 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining multiple documents.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining multiple documents.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining tables.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining tables.cs index c2ceadae8..71f682385 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining tables.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Joining tables.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Tables; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Keeping the content from split.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Keeping the content from split.cs index a595ac0f0..63f360fb6 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Keeping the content from split.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Keeping the content from split.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -19,9 +24,7 @@ public static void KeepingTheContentFromSplitFeature() // Iterate through all sections in the source document. foreach (Paragraph para in srcDoc.GetChildNodes(NodeType.Paragraph, true)) - { para.ParagraphFormat.KeepWithNext = true; - } dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting); dstDoc.Save(ArtifactsDir + "Keeping the content from split - Aspose.Words.docx"); diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Mail merge from xml using DataSet.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Mail merge from xml using DataSet.cs index 26c5967b3..b022f908f 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Mail merge from xml using DataSet.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Mail merge from xml using DataSet.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.Data; using Aspose.Words; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Nested mail merge regions.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Nested mail merge regions.cs index 9c2a31a14..3cad43175 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Nested mail merge regions.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Nested mail merge regions.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.Data; using Aspose.Words; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Obtaining form fields.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Obtaining form fields.cs index cf882e90b..493df09bc 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Obtaining form fields.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Obtaining form fields.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Fields; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Print document via Xps Api.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Print document via Xps Api.cs index 29e684e4a..4051e8795 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Print document via Xps Api.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Print document via Xps Api.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System; using Aspose.Words; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Render shapes.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Render shapes.cs index 224031efc..6f99f59f3 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Render shapes.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Render shapes.cs @@ -1,10 +1,15 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.Drawing; -using System.Drawing.Imaging; using System.IO; using Aspose.Words; using Aspose.Words.Drawing; +using Aspose.Words.Layout; using Aspose.Words.Rendering; using Aspose.Words.Saving; using Aspose.Words.Tables; @@ -19,19 +24,18 @@ public class RenderShapes : TestUtil public void RenderShapeAsEmf() { Document doc = new Document(MyDir + "Rendering.docx"); - // Retrieve the target shape from the document. Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true); //ExStart:RenderShapeAsEmf + //GistId:7fc867ac8ef1b729b6f70580fbc5b3f9 ShapeRenderer render = shape.GetShapeRenderer(); - ImageSaveOptions imageOptions = new ImageSaveOptions(SaveFormat.Emf) { Scale = 1.5f }; - render.Save(ArtifactsDir + "RenderShape.RenderShapeAsEmf - Aspose.Words.emf", imageOptions); + render.Save(ArtifactsDir + "RenderShape.RenderShapeAsEmf.emf", imageOptions); //ExEnd:RenderShapeAsEmf } @@ -43,42 +47,40 @@ public void RenderShapeAsJpeg() Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true); //ExStart:RenderShapeAsJpeg + //GistId:7fc867ac8ef1b729b6f70580fbc5b3f9 ShapeRenderer render = new ShapeRenderer(shape); - ImageSaveOptions imageOptions = new ImageSaveOptions(SaveFormat.Jpeg) { // Output the image in gray scale ImageColorMode = ImageColorMode.Grayscale, - // Reduce the brightness a bit (default is 0.5f) ImageBrightness = 0.45f }; - using (FileStream stream = new FileStream(ArtifactsDir + "RenderShape.RenderShapeAsJpeg - Aspose.Words.jpg", FileMode.Create)) + using (FileStream stream = new FileStream(ArtifactsDir + "RenderShape.RenderShapeAsJpeg.jpg", FileMode.Create)) { render.Save(stream, imageOptions); } //ExEnd:RenderShapeAsJpeg } - +#if NET48 || JAVA [Test] //ExStart:RenderShapeToGraphics + //GistId:7fc867ac8ef1b729b6f70580fbc5b3f9 public void RenderShapeToGraphics() { Document doc = new Document(MyDir + "Rendering.docx"); - - Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true); - + + Shape shape = (Shape) doc.GetChild(NodeType.Shape, 0, true); ShapeRenderer render = shape.GetShapeRenderer(); // Find the size that the shape will be rendered to at the specified scale and resolution. Size shapeSizeInPixels = render.GetSizeInPixels(1.0f, 96.0f); - // Rotating the shape may result in clipping as the image canvas is too small. Find the longest side // and make sure that the graphics canvas is large enough to compensate for this. int maxSide = System.Math.Max(shapeSizeInPixels.Width, shapeSizeInPixels.Height); - using (Bitmap image = new Bitmap((int)(maxSide * 1.25), (int)(maxSide * 1.25))) + using (Bitmap image = new Bitmap((int) (maxSide * 1.25), (int) (maxSide * 1.25))) { // Rendering to a graphics object means we can specify settings and transformations to be applied to the rendered shape. // In our case we will rotate the rendered shape. @@ -87,21 +89,44 @@ public void RenderShapeToGraphics() // Clear the shape with the background color of the document. graphics.Clear(shape.Document.PageColor); // Center the rotation using the translation method below. - graphics.TranslateTransform((float)image.Width / 8, (float)image.Height / 2); + graphics.TranslateTransform((float) image.Width / 8, (float) image.Height / 2); // Rotate the image by 45 degrees. graphics.RotateTransform(45); // Undo the translation. - graphics.TranslateTransform(-(float)image.Width / 8, -(float)image.Height / 2); + graphics.TranslateTransform(-(float) image.Width / 8, -(float) image.Height / 2); // Render the shape onto the graphics object. render.RenderToSize(graphics, 0, 0, shapeSizeInPixels.Width, shapeSizeInPixels.Height); } - image.Save(ArtifactsDir + "RenderShape.RenderShapeToGraphics - Aspose.Words.png", ImageFormat.Png); + image.Save(ArtifactsDir + "RenderShape.RenderShapeToGraphics.png", ImageFormat.Png); } } //ExEnd:RenderShapeToGraphics + [Test] + public void FindShapeSizes() + { + Document doc = new Document(MyDir + "Rendering.docx"); + + Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true); + + //ExStart:FindShapeSizes + //GistId:7fc867ac8ef1b729b6f70580fbc5b3f9 + Size shapeRenderedSize = shape.GetShapeRenderer().GetSizeInPixels(1.0f, 96.0f); + + using (Bitmap image = new Bitmap(shapeRenderedSize.Width, shapeRenderedSize.Height)) + { + using (Graphics graphics = Graphics.FromImage(image)) + { + // Render shape onto the graphics object using the RenderToScale + // or RenderToSize methods of ShapeRenderer class. + } + } + //ExEnd:FindShapeSizes + } +#endif + [Test] public void RenderCellToImage() { @@ -109,7 +134,8 @@ public void RenderCellToImage() //ExStart:RenderCellToImage Cell cell = (Cell)doc.GetChild(NodeType.Cell, 2, true); - RenderNode(cell, ArtifactsDir + "RenderShape.RenderCellToImage - Aspose.Words.png", null); + Document tmp = ConvertToImage(doc, cell); + tmp.Save(ArtifactsDir + "RenderShape.RenderCellToImage.png"); //ExEnd:RenderCellToImage } @@ -120,7 +146,8 @@ public void RenderRowToImage() //ExStart:RenderRowToImage Row row = (Row)doc.GetChild(NodeType.Row, 0, true); - RenderNode(row, ArtifactsDir + "RenderShape.RenderRowToImage - Aspose.Words.png", null); + Document tmp = ConvertToImage(doc, row); + tmp.Save(ArtifactsDir + "RenderShape.RenderRowToImage.png"); //ExEnd:RenderRowToImage } @@ -141,150 +168,108 @@ public void RenderParagraphToImage() PaperColor = Color.LightPink }; - RenderNode(textBoxShape.LastParagraph, ArtifactsDir + "RenderShape.RenderParagraphToImage - Aspose.Words.png", options); + Document tmp = ConvertToImage(doc, textBoxShape.LastParagraph); + tmp.Save(ArtifactsDir + "RenderShape.RenderParagraphToImage.png"); //ExEnd:RenderParagraphToImage } - [Test] - public void FindShapeSizes() - { - Document doc = new Document(MyDir + "Rendering.docx"); - - Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true); - - //ExStart:FindShapeSizes - Size shapeRenderedSize = shape.GetShapeRenderer().GetSizeInPixels(1.0f, 96.0f); - - using (Bitmap image = new Bitmap(shapeRenderedSize.Width, shapeRenderedSize.Height)) - { - using (Graphics graphics = Graphics.FromImage(image)) - { - // Render shape onto the graphics object using the RenderToScale or RenderToSize methods of ShapeRenderer class. - } - } - //ExEnd:FindShapeSizes - } - [Test] public void RenderShapeImage() { Document doc = new Document(MyDir + "Rendering.docx"); Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true); - //ExStart:RenderShapeImage - shape.GetShapeRenderer().Save(ArtifactsDir + "RenderShape.RenderShapeImage - Aspose.Words.jpg", null); + //GistId:7fc867ac8ef1b729b6f70580fbc5b3f9 + shape.GetShapeRenderer().Save(ArtifactsDir + "RenderShape.RenderShapeImage.jpg", new ImageSaveOptions(SaveFormat.Jpeg)); //ExEnd:RenderShapeImage } /// - /// Renders any node in a document to the path specified using the image save options. + /// Renders any node in a document into an image. /// + /// The current document. /// The node to render. - /// The path to save the rendered image to. - /// The image options to use during rendering. This can be null. - public void RenderNode(Node node, string filePath, ImageSaveOptions imageOptions) + private static Document ConvertToImage(Document doc, CompositeNode node) { - if (imageOptions == null) - imageOptions = new ImageSaveOptions(FileFormatUtil.ExtensionToSaveFormat(Path.GetExtension(filePath))); - - // Store the paper color to be used on the final image and change to transparent. - // This will cause any content around the rendered node to be removed later on. - Color savePaperColor = imageOptions.PaperColor; - imageOptions.PaperColor = Color.Transparent; - - // There a bug which affects the cache of a cloned node. - // To avoid this, we clone the entire document, including all nodes, - // finding the matching node in the cloned document and rendering that instead. - Document doc = (Document)node.Document.Clone(true); - node = doc.GetChild(NodeType.Any, node.Document.GetChildNodes(NodeType.Any, true).IndexOf(node), true); - - // Create a temporary shape to store the target node in. This shape will be rendered to retrieve - // the rendered content of the node. - Shape shape = new Shape(doc, ShapeType.TextBox); - Section parentSection = (Section)node.GetAncestor(NodeType.Section); - - // Assume that the node cannot be larger than the page in size. - shape.Width = parentSection.PageSetup.PageWidth; - shape.Height = parentSection.PageSetup.PageHeight; - shape.FillColor = Color.Transparent; - - // Don't draw a surronding line on the shape. - shape.Stroked = false; - - // Move up through the DOM until we find a suitable node to insert into a Shape - // (a node with a parent can contain paragraphs, tables the same as a shape). Each parent node is cloned - // on the way up so even a descendant node passed to this method can be rendered. Since we are working - // with the actual nodes of the document we need to clone the target node into the temporary shape. - Node currentNode = node; - while (!(currentNode.ParentNode is InlineStory || currentNode.ParentNode is Story || - currentNode.ParentNode is ShapeBase)) - { - CompositeNode parent = (CompositeNode)currentNode.ParentNode.Clone(false); - currentNode = currentNode.ParentNode; - parent.AppendChild(node.Clone(true)); - node = parent; // Store this new node to be inserted into the shape. - } + Document tmp = CreateTemporaryDocument(doc, node); + AppendNodeContent(tmp, node); + AdjustDocumentLayout(tmp); + return tmp; + } - // We must add the shape to the document tree to have it rendered. - shape.AppendChild(node.Clone(true)); - parentSection.Body.FirstParagraph.AppendChild(shape); + /// + /// Creates a temporary document for further rendering. + /// + private static Document CreateTemporaryDocument(Document doc, CompositeNode node) + { + Document tmp = (Document)doc.Clone(false); + tmp.Sections.Add(tmp.ImportNode(node.GetAncestor(NodeType.Section), false, ImportFormatMode.UseDestinationStyles)); + tmp.FirstSection.AppendChild(new Body(tmp)); + tmp.FirstSection.PageSetup.TopMargin = 0; + tmp.FirstSection.PageSetup.BottomMargin = 0; - // Render the shape to stream so we can take advantage of the effects of the ImageSaveOptions class. - // Retrieve the rendered image and remove the shape from the document. - MemoryStream stream = new MemoryStream(); - ShapeRenderer renderer = shape.GetShapeRenderer(); - renderer.Save(stream, imageOptions); - shape.Remove(); + return tmp; + } - Rectangle crop = renderer.GetOpaqueBoundsInPixels(imageOptions.Scale, imageOptions.HorizontalResolution, - imageOptions.VerticalResolution); + /// + /// Adds a node to a temporary document. + /// + private static void AppendNodeContent(Document tmp, CompositeNode node) + { + if (node is HeaderFooter headerFooter) + foreach (Node hfNode in headerFooter.GetChildNodes(NodeType.Any, false)) + tmp.FirstSection.Body.AppendChild(tmp.ImportNode(hfNode, true, ImportFormatMode.UseDestinationStyles)); + else + AppendNonHeaderFooterContent(tmp, node); + } - using (Bitmap renderedImage = new Bitmap(stream)) + private static void AppendNonHeaderFooterContent(Document tmp, CompositeNode node) + { + Node parentNode = node.ParentNode; + while (!(parentNode is InlineStory || parentNode is Story || parentNode is ShapeBase)) { - Bitmap croppedImage = new Bitmap(crop.Width, crop.Height); - croppedImage.SetResolution(imageOptions.HorizontalResolution, imageOptions.VerticalResolution); - - // Create the final image with the proper background color. - using (Graphics g = Graphics.FromImage(croppedImage)) - { - g.Clear(savePaperColor); - g.DrawImage(renderedImage, new Rectangle(0, 0, croppedImage.Width, croppedImage.Height), crop.X, - crop.Y, crop.Width, crop.Height, GraphicsUnit.Pixel); + CompositeNode parent = (CompositeNode)parentNode.Clone(false); + parent.AppendChild(node.Clone(true)); + node = parent; - croppedImage.Save(filePath); - } + parentNode = parentNode.ParentNode; } + + tmp.FirstSection.Body.AppendChild(tmp.ImportNode(node, true, ImportFormatMode.UseDestinationStyles)); } /// - /// Finds the minimum bounding box around non-transparent pixels in a Bitmap. + /// Adjusts the layout of the document to fit the content area. /// - public Rectangle FindBoundingBoxAroundNode(Bitmap originalBitmap) + private static void AdjustDocumentLayout(Document tmp) { - Point min = new Point(int.MaxValue, int.MaxValue); - Point max = new Point(int.MinValue, int.MinValue); + LayoutEnumerator enumerator = new LayoutEnumerator(tmp); + RectangleF rect = RectangleF.Empty; + rect = CalculateVisibleRect(enumerator, rect); + + tmp.FirstSection.PageSetup.PageHeight = rect.Height; + tmp.UpdatePageLayout(); + } - for (int x = 0; x < originalBitmap.Width; ++x) + /// + /// Calculates the visible area of the content. + /// + private static RectangleF CalculateVisibleRect(LayoutEnumerator enumerator, RectangleF rect) + { + RectangleF result = rect; + do { - for (int y = 0; y < originalBitmap.Height; ++y) + if (enumerator.MoveFirstChild()) { - // Note that you can speed up this part of the algorithm using LockBits and unsafe code instead of GetPixel. - Color pixelColor = originalBitmap.GetPixel(x, y); - - // For each pixel that is not transparent, calculate the bounding box around it. - if (pixelColor.ToArgb() != Color.Empty.ToArgb()) - { - min.X = System.Math.Min(x, min.X); - min.Y = System.Math.Min(y, min.Y); - max.X = System.Math.Max(x, max.X); - max.Y = System.Math.Max(y, max.Y); - } + if (enumerator.Type == LayoutEntityType.Line || enumerator.Type == LayoutEntityType.Span) + result = result.IsEmpty ? enumerator.Rectangle : RectangleF.Union(result, enumerator.Rectangle); + result = CalculateVisibleRect(enumerator, result); + enumerator.MoveParent(); } - } + } while (enumerator.MoveNext()); - // Add one pixel to the width and height to avoid clipping. - return new Rectangle(min.X, min.Y, max.X - min.X + 1, max.Y - min.Y + 1); + return result; } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save as multipage tiff.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save as multipage tiff.cs index fd4b7ab97..577fba6ff 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save as multipage tiff.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save as multipage tiff.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Saving; @@ -8,19 +13,18 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features.Features_missing_in_OpenXML { [TestFixture] public class SaveAsMultiPageTiff : TestUtil - - { - [Test] - public static void SaveAsMultiPageTiffFeature() { - Document doc = new Document(MyDir + "Rendering.docx"); + [Test] + public static void SaveAsMultiPageTiffFeature() + { + Document doc = new Document(MyDir + "Rendering.docx"); - ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Tiff); - options.PageSet = new PageSet(new PageRange(0, doc.PageCount)); - options.TiffCompression = TiffCompression.Ccitt4; - options.Resolution = 160; + ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Tiff); + options.PageSet = new PageSet(new PageRange(0, doc.PageCount)); + options.TiffCompression = TiffCompression.Ccitt4; + options.Resolution = 160; - doc.Save(ArtifactsDir + "Save as multipage tiff - Aspose.Words.tiff", options); - } + doc.Save(ArtifactsDir + "Save as multipage tiff - Aspose.Words.tiff", options); + } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save doc as png.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save doc as png.cs index 867196a55..3421cc6d8 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save doc as png.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Save doc as png.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Saving; @@ -21,7 +26,7 @@ public static void SaveDocAsPngFeature() for (int i = 0; i < doc.PageCount; i++) { options.PageSet = new PageSet(i); - doc.Save(string.Format(ArtifactsDir + i + " Save doc as png - Aspose.Words.png", i), options); + doc.Save(ArtifactsDir + $"Save doc as png ({i}) - Aspose.Words.png", options); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Splitting tables.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Splitting tables.cs index 73cb73198..2a2f11352 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Splitting tables.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Splitting tables.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Tables; @@ -16,21 +21,16 @@ public static void SplittingTablesFeature() // Get the first table in the document. Table firstTable = (Table)doc.GetChild(NodeType.Table, 0, true); - // We will split the table at the third row (inclusive). Row row = firstTable.Rows[2]; - // Create a new container for the split table. Table table = (Table)firstTable.Clone(false); - // Insert the container after the original. firstTable.ParentNode.InsertAfter(table, firstTable); - // Add a buffer paragraph to ensure the tables stay apart. firstTable.ParentNode.InsertAfter(new Paragraph(doc), firstTable); Row currentRow; - do { currentRow = firstTable.LastRow; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Xps print helper.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Xps print helper.cs index 25cc46a51..bf33369f5 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Xps print helper.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Features missing in OpenXML/Xps print helper.cs @@ -5,6 +5,7 @@ // "as is", without warranty of any kind, either expressed or implied. ////////////////////////////////////////////////////////////////////////// +using Aspose.Words; using System; using System.ComponentModel; using System.IO; @@ -32,17 +33,20 @@ private XpsPrintHelper() /// Job name. Can be null. /// True to wait for the job to complete. False to return immediately after submitting the job. /// Thrown if any error occurs. - public static void Print(Aspose.Words.Document document, string printerName, string jobName, bool isWait) + public static void Print(Document document, string printerName, string jobName, bool isWait) { + Console.WriteLine("Print"); if (document == null) - throw new ArgumentNullException("document"); + throw new ArgumentNullException(nameof(document)); - // Use Aspose.Words to convert the document to XPS and store in a memory stream. + // Use Aspose.Words to convert the document to XPS and store it in a memory stream. MemoryStream stream = new MemoryStream(); - document.Save(stream, Aspose.Words.SaveFormat.Xps); - stream.Position = 0; + document.Save(stream, SaveFormat.Xps); + stream.Position = 0; + Console.WriteLine("Saved as Xps"); Print(stream, printerName, jobName, isWait); + Console.WriteLine("After Print"); } /// @@ -57,37 +61,38 @@ public static void Print(Aspose.Words.Document document, string printerName, str public static void Print(Stream stream, string printerName, string jobName, bool isWait) { if (stream == null) - throw new ArgumentNullException("stream"); + throw new ArgumentNullException(nameof(stream)); if (printerName == null) - throw new ArgumentNullException("printerName"); + throw new ArgumentNullException(nameof(printerName)); // Create an event that we will wait on until the job is complete. IntPtr completionEvent = CreateEvent(IntPtr.Zero, true, false, null); if (completionEvent == IntPtr.Zero) throw new Win32Exception(); - try - { - IXpsPrintJob job; - IXpsPrintJobStream jobStream; - StartJob(printerName, jobName, completionEvent, out job, out jobStream); + Console.WriteLine("StartJob"); + StartJob(printerName, jobName, completionEvent, out IXpsPrintJob job, out IXpsPrintJobStream jobStream); + Console.WriteLine("Done StartJob"); - CopyJob(stream, job, jobStream); + Console.WriteLine("Start CopyJob"); + CopyJob(stream, jobStream); + Console.WriteLine("End CopyJob"); - if (isWait) - { - WaitForJob(completionEvent); - CheckJobStatus(job); - } - } - finally + Console.WriteLine("Start Wait"); + if (isWait) { - if (completionEvent != IntPtr.Zero) - CloseHandle(completionEvent); + WaitForJob(completionEvent); + CheckJobStatus(job); } + Console.WriteLine("End Wait"); + + if (completionEvent != IntPtr.Zero) + CloseHandle(completionEvent); + Console.WriteLine("Close Handle"); } - private static void StartJob(string printerName, string jobName, IntPtr completionEvent, out IXpsPrintJob job, out IXpsPrintJobStream jobStream) + private static void StartJob(string printerName, string jobName, IntPtr completionEvent, out IXpsPrintJob job, + out IXpsPrintJobStream jobStream) { int result = StartXpsPrintJob(printerName, jobName, null, IntPtr.Zero, completionEvent, null, 0, out job, out jobStream, IntPtr.Zero); @@ -95,39 +100,29 @@ private static void StartJob(string printerName, string jobName, IntPtr completi throw new Win32Exception(result); } - private static void CopyJob(Stream stream, IXpsPrintJob job, IXpsPrintJobStream jobStream) + private static void CopyJob(Stream stream, IXpsPrintJobStream jobStream) { - try - { - byte[] buff = new byte[4096]; - while (true) - { - uint read = (uint)stream.Read(buff, 0, buff.Length); - if (read == 0) - break; - - uint written; - jobStream.Write(buff, read, out written); - - if (read != written) - throw new Exception("Failed to copy data to the print job stream."); - } - - // Indicate that the entire document has been copied. - jobStream.Close(); - } - catch (Exception) + byte[] buff = new byte[4096]; + while (true) { - // Cancel the job if we had any trouble submitting it. - job.Cancel(); - throw; + uint read = (uint)stream.Read(buff, 0, buff.Length); + if (read == 0) + break; + + jobStream.Write(buff, read, out uint written); + + if (read != written) + throw new Exception("Failed to copy data to the print job stream."); } + + // Indicate that the entire document has been copied. + jobStream.Close(); } private static void WaitForJob(IntPtr completionEvent) { - const int INFINITE = -1; - switch (WaitForSingleObject(completionEvent, INFINITE)) + const int infinite = -1; + switch (WaitForSingleObject(completionEvent, infinite)) { case WAIT_RESULT.WAIT_OBJECT_0: // Expected result, do nothing. @@ -141,8 +136,7 @@ private static void WaitForJob(IntPtr completionEvent) private static void CheckJobStatus(IXpsPrintJob job) { - XPS_JOB_STATUS jobStatus; - job.GetJobStatus(out jobStatus); + job.GetJobStatus(out XPS_JOB_STATUS jobStatus); switch (jobStatus.completion) { case XPS_JOB_COMPLETION.XPS_JOB_COMPLETED: @@ -157,22 +151,23 @@ private static void CheckJobStatus(IXpsPrintJob job) [DllImport("XpsPrint.dll", EntryPoint = "StartXpsPrintJob")] private static extern int StartXpsPrintJob( - [MarshalAs(UnmanagedType.LPWStr)] String printerName, - [MarshalAs(UnmanagedType.LPWStr)] String jobName, - [MarshalAs(UnmanagedType.LPWStr)] String outputFileName, - IntPtr progressEvent, // HANDLE - IntPtr completionEvent, // HANDLE + [MarshalAs(UnmanagedType.LPWStr)] string printerName, + [MarshalAs(UnmanagedType.LPWStr)] string jobName, + [MarshalAs(UnmanagedType.LPWStr)] string outputFileName, + IntPtr progressEvent, + IntPtr completionEvent, [MarshalAs(UnmanagedType.LPArray)] byte[] printablePagesOn, - UInt32 printablePagesOnCount, + uint printablePagesOnCount, out IXpsPrintJob xpsPrintJob, out IXpsPrintJobStream documentStream, - IntPtr printTicketStream); // This is actually "out IXpsPrintJobStream", but we don't use it and just want to pass null, hence IntPtr. + IntPtr printTicketStream); // "out IXpsPrintJobStream", we don't use it and just want to pass null, hence IntPtr. [DllImport("Kernel32.dll", SetLastError = true)] - private static extern IntPtr CreateEvent(IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, string lpName); + private static extern IntPtr CreateEvent(IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, + string lpName); [DllImport("Kernel32.dll", SetLastError = true, ExactSpelling = true)] - private static extern WAIT_RESULT WaitForSingleObject(IntPtr handle, Int32 milliseconds); + private static extern WAIT_RESULT WaitForSingleObject(IntPtr handle, int milliseconds); [DllImport("Kernel32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] @@ -189,20 +184,22 @@ private static extern int StartXpsPrintJob( /// So the hack is that we obtain the ISequentialStream interface but work with it as /// with the IXpsPrintJobStream interface. /// - [Guid("0C733A30-2A1C-11CE-ADE5-00AA0044773D")] // This is IID of ISequenatialSteam. + [Guid("0C733A30-2A1C-11CE-ADE5-00AA0044773D")] // This is IID of ISequenatialSteam. [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IXpsPrintJobStream + internal interface IXpsPrintJobStream { // ISequentualStream methods. void Read([MarshalAs(UnmanagedType.LPArray)] byte[] pv, uint cb, out uint pcbRead); + void Write([MarshalAs(UnmanagedType.LPArray)] byte[] pv, uint cb, out uint pcbWritten); + // IXpsPrintJobStream methods. void Close(); } [Guid("5ab89b06-8194-425f-ab3b-d7a96e350161")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IXpsPrintJob + internal interface IXpsPrintJob { void Cancel(); void GetJobStatus(out XPS_JOB_STATUS jobStatus); @@ -211,12 +208,12 @@ interface IXpsPrintJob [StructLayout(LayoutKind.Sequential)] struct XPS_JOB_STATUS { - public UInt32 jobId; - public Int32 currentDocument; - public Int32 currentPage; - public Int32 currentPageTotal; + public uint jobId; + public int currentDocument; + public int currentPage; + public int currentPageTotal; public XPS_JOB_COMPLETION completion; - public Int32 jobStatus; // UInt32 + public int jobStatus; }; enum XPS_JOB_COMPLETION @@ -232,6 +229,6 @@ enum WAIT_RESULT WAIT_OBJECT_0 = 0, WAIT_ABANDONED = 0x80, WAIT_TIMEOUT = 0x102, - WAIT_FAILED = -1 // 0xFFFFFFFF + WAIT_FAILED = -1 } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Get and set bookmark text.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Get and set bookmark text.cs index 7b9fc1432..d97e86758 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Get and set bookmark text.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Get and set bookmark text.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -9,16 +14,15 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class GetAndSetBookmarkText : TestUtil { [Test] - public void GetAndSetBookmarkTextFeature() + public void BookmarkText() { - Document doc = new Document(MyDir + "Get and set bookmark text.docx"); + Document doc = new Document(MyDir + "Bookmark.docx"); // Rename a bookmark and edit its text. Bookmark bookmark = doc.Range.Bookmarks["MyBookmark"]; - bookmark.Name = "RenamedBookmark"; bookmark.Text = "This is a new bookmarked text."; - doc.Save(ArtifactsDir + "Get and set bookmark text - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Bookmark text - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert a comment.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert a comment.cs index 444195f8d..55a9952fc 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert a comment.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert a comment.cs @@ -1,7 +1,13 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; +using System; namespace AsposeWordsVSOpenXML.AsposeWords_features { @@ -9,38 +15,27 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class InsertAComment : TestUtil { [Test] - public void InsertACommentFeature() + public void InsertComment() { Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); - Comment comment = new Comment(doc); - - // Insert some text into the comment. - Paragraph commentParagraph = new Paragraph(doc); - commentParagraph.AppendChild(new Run(doc, "This is comment!!!")); - comment.AppendChild(commentParagraph); - - // Create a "CommentRangeStart" and "CommentRangeEnd". - int commentId = 0; - CommentRangeStart start = new CommentRangeStart(doc, commentId); - CommentRangeEnd end = new CommentRangeEnd(doc, commentId); - - builder.Write("This text is before the comment. "); - - // Insert comment and comment range start. - builder.InsertNode(comment); - builder.InsertNode(start); - - // Insert some more text. - builder.Write("This text is commented. "); - - // Insert end of comment range. - builder.InsertNode(end); - - builder.Write("This text is after the comment."); - - doc.Save(ArtifactsDir + "Insert a comment - Aspose.Words.docx"); + Comment newComment = new Comment(doc) + { + Author = "Aspose.Words", + Initial = "AW", + DateTime = DateTime.Now + }; + newComment.SetText("Comment regarding text."); + + // Add text to the document, warp it in a comment range, and then add your comment. + Paragraph para = doc.FirstSection.Body.FirstParagraph; + para.AppendChild(new CommentRangeStart(doc, newComment.Id)); + para.AppendChild(new Run(doc, "Commented text.")); + para.AppendChild(new CommentRangeEnd(doc, newComment.Id)); + para.AppendChild(newComment); + + doc.Save(ArtifactsDir + "Insert comment - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert picture in word document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert picture in word document.cs index d050c75b5..5e03b4292 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert picture in word document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Insert picture in word document.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using Aspose.Words.Drawing; @@ -10,7 +15,7 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class InsertPictureInWordDocument : TestUtil { [Test] - public void InsertPictureInWordDocumentFeature() + public void InsertPicture() { Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open and add text to word document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open and add text to word document.cs index ae5668d7a..755df049e 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open and add text to word document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open and add text to word document.cs @@ -1,6 +1,10 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// -using System.Drawing; using Aspose.Words; using NUnit.Framework; @@ -10,21 +14,16 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class OpenAndAddTextToWordDocument : TestUtil { [Test] - public void OpenAndAddTextToWordDocumentFeature() + public void AddText() { Document doc = new Document(MyDir + "Document.docx"); DocumentBuilder builder = new DocumentBuilder(doc); - global::Aspose.Words.Font font = builder.Font; - font.Size = 16; - font.Bold = true; - font.Color = Color.Blue; - font.Name = "Arial"; - font.Underline = Underline.Dash; + builder.MoveToDocumentEnd(); + builder.Writeln(); + builder.Write("This is the text added to the end of the document."); - builder.Write("Formatted text."); - - doc.Save(ArtifactsDir + "Open and add text - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Add text - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open document from stream.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open document from stream.cs index 1ca30af7a..75edb71ce 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open document from stream.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open document from stream.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; using Aspose.Words; @@ -10,18 +15,17 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class OpenDocumentFromStream : TestUtil { [Test] - public void OpenDocumentFromStreamFeature() + public void AddTextStream() { - Stream stream = File.Open(MyDir + "Document.docx", FileMode.Open); - - using (stream) + using (Stream stream = File.Open(MyDir + "Document.docx", FileMode.Open)) { Document doc = new Document(stream); DocumentBuilder builder = new DocumentBuilder(doc); - builder.Writeln("Append text in body - Open and add to wordprocessing stream"); + builder.Writeln(); + builder.Write("This is the text added to the end of the document."); - doc.Save(ArtifactsDir + "Open document from stream - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Add text stream - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open read only access.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open read only access.cs index b520410b0..5f231f253 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open read only access.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Open read only access.cs @@ -1,6 +1,12 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; +using Aspose.Words.Loading; using NUnit.Framework; namespace AsposeWordsVSOpenXML.AsposeWords_features @@ -9,14 +15,15 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features class OpenReadOnlyAccess : TestUtil { [Test] - public void OpenReadOnlyAccessFeature() + public void OpenReadOnly() { Document doc = new Document(MyDir + "Open ReadOnly access.docx", new LoadOptions("1234")); DocumentBuilder builder = new DocumentBuilder(doc); - builder.Writeln("Append text in body - Open ReadOnly access"); + builder.Writeln(); + builder.Write("This is the text added to the end of the document."); - doc.Save(ArtifactsDir + "Open ReadOnly access - Aspose.Words.docx"); + doc.Save(ArtifactsDir + "Open encrypted - Aspose.Words.docx"); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove comments.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove comments.cs index 09da6bc96..e1fda023f 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove comments.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove comments.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -9,31 +14,23 @@ namespace AsposeWordsVSOpenXML.AsposeWords_features public class DeleteCommentsByAllOrASpecificAuthor : TestUtil { [Test] - public void DeleteCommentsByAllOrASpecificAuthorFeature() - { - RemoveComments(""); - } - - private void RemoveComments(string authorName) + private void RemoveComments() { Document doc = new Document(MyDir + "Comments.docx"); // Collect all comments in the document. NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true); - if (authorName == "") - { + + string authorName = string.Empty; + if (authorName.Equals(string.Empty)) // Remove all comments. comments.Clear(); - } else { - // Look through all comments and remove those written by the authorName author. - for (int i = comments.Count - 1; i >= 0; i--) - { - Comment comment = (Comment)comments[i]; - if (comment.Author == authorName) + // Remove comments by author name. + foreach (Comment comment in comments) + if (comment.Author.Equals(authorName)) comment.Remove(); - } } doc.Save(ArtifactsDir + "Remove comments - Aspose.Words.docx"); diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove header footer.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove header footer.cs index e39cde971..67cedea93 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove header footer.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove header footer.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -12,15 +17,8 @@ public class RemoveHeaderFooter : TestUtil public void RemoveHeaderFooterFeature() { Document doc = new Document(MyDir + "Document.docx"); - foreach (Section section in doc) - { - section.HeadersFooters.RemoveAt(0); - - // Odd pages use the primary footer. - HeaderFooter footer = section.HeadersFooters[HeaderFooterType.FooterPrimary]; - - footer?.Remove(); - } + foreach (HeaderFooter headerFooter in doc.GetChildNodes(NodeType.HeaderFooter, true)) + headerFooter.Remove(); doc.Save(ArtifactsDir + "Remove header and footer - Aspose.Words.docx"); } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove hidden text.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove hidden text.cs index 02dea5453..918ce31fa 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove hidden text.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove hidden text.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -13,10 +18,10 @@ public void RemoveHiddenTextFeature() { Document doc = new Document(MyDir + "Remove hidden text.docx"); - foreach (Paragraph par in doc.GetChildNodes(NodeType.Paragraph, true)) + foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true)) { - par.ParagraphBreakFont.Hidden = false; - foreach (Run run in par.GetChildNodes(NodeType.Run, true)) + para.ParagraphBreakFont.Hidden = false; + foreach (Run run in para.GetChildNodes(NodeType.Run, true)) { if (run.Font.Hidden) run.Font.Hidden = false; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove page breaks.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove page breaks.cs index 4cd7f47d4..051cc0b2d 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove page breaks.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove page breaks.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; @@ -13,19 +18,14 @@ public void RemovePageBreaksFeature() { Document doc = new Document(MyDir + "Remove page breaks.docx"); - // Retrieve all paragraphs in the document. - NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true); - - foreach (Paragraph para in paragraphs) + // Remove all page breaks. + foreach (Paragraph paragraph in doc.GetChildNodes(NodeType.Paragraph, true)) { - // If the paragraph has a page break set before, then clear it. - if (para.ParagraphFormat.PageBreakBefore) - para.ParagraphFormat.PageBreakBefore = false; - - // Check all runs in the paragraph for page breaks and remove them. - foreach (Run run in para.Runs) + foreach (Run run in paragraph.Runs) + { if (run.Text.Contains(ControlChar.PageBreak)) - run.Text = run.Text.Replace(ControlChar.PageBreak, string.Empty); + run.Text = run.Text.Replace(ControlChar.PageBreak.ToString(), string.Empty); + } } doc.Save(ArtifactsDir + "Remove page breaks - Aspose.Words.docx"); diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove section breaks.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove section breaks.cs index 14f3129ee..897089060 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove section breaks.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Remove section breaks.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using Aspose.Words; using NUnit.Framework; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Retrieve comments.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Retrieve comments.cs index e5dae3b30..219032d85 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Retrieve comments.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Retrieve comments.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System; using System.Collections; diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Search and replace text.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Search and replace text.cs index 9de4b0009..2fbc2e1b9 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Search and replace text.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWords features/Search and replace text.cs @@ -1,6 +1,10 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// -using System.Text.RegularExpressions; using Aspose.Words; using NUnit.Framework; @@ -14,8 +18,7 @@ public static void SearchAndReplaceTextFeature() { Document doc = new Document(MyDir + "Search and replace text.docx"); - Regex regex = new Regex("Hello World!", RegexOptions.IgnoreCase); - doc.Range.Replace(regex, "Hi Everyone!"); + doc.Range.Replace("Hello World!", "Hi Everyone!"); doc.Save(ArtifactsDir + "Search and replace text - Aspose.Words.docx"); } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWordsVSOpenXML.csproj b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWordsVSOpenXML.csproj index 3357e5d57..5246734e0 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWordsVSOpenXML.csproj +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/AsposeWordsVSOpenXML.csproj @@ -1,128 +1,32 @@ - - - + - Debug - AnyCPU - {5181D152-E178-4066-B8FC-A5E42B67C35A} + net8.0 Library - Properties - AsposeWordsVSOpenXML - AsposeWordsVSOpenXML - v4.6.2 - 512 - true - - + false + Aspose Words + Aspose Words + Copyright © 2021 + 1.0.0.0 + 1.0.0.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - 21.1.1 + 25.1.0 - 21.2.0 + 25.2.0 - 2.12.3 + 3.2.0 - 3.13.1 + 3.14.0 - \ No newline at end of file diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Add table.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Add table.cs index 5c2f1eaf7..4d1bec83e 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Add table.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Add table.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; @@ -11,81 +16,80 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class AddTable : TestUtil { [Test] - public void AddTableFeature() + public void CreateTable() { - string[,] data = {{"Mike", "Amy"}, {"Mary", "Albert"}}; + string[,] data = { { "Mike", "Amy" }, { "Mary", "Albert" } }; - using (WordprocessingDocument wordDocument = - WordprocessingDocument.Create(ArtifactsDir + "Add Table - OpenXML.docx", - WordprocessingDocumentType.Document)) - { - MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); - mainPart.Document = new Document(); - - Body body = mainPart.Document.AppendChild(new Body()); - Paragraph para = body.AppendChild(new Paragraph()); + using WordprocessingDocument wordDocument = WordprocessingDocument.Create( + ArtifactsDir + "CreateTable - OpenXML.docx", + WordprocessingDocumentType.Document); - Run run = para.AppendChild(new Run()); - run.AppendChild(new Text("Create text in body - Create wordprocessing document")); + MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); + mainPart.Document = new Document(); - Table table = new Table(); + Body body = mainPart.Document.AppendChild(new Body()); + Paragraph para = body.AppendChild(new Paragraph()); - TableProperties props = new TableProperties( - new TableBorders( - new TopBorder - { - Val = new EnumValue(BorderValues.Single), - Size = 12 - }, - new BottomBorder - { - Val = new EnumValue(BorderValues.Single), - Size = 12 - }, - new LeftBorder - { - Val = new EnumValue(BorderValues.Single), - Size = 12 - }, - new RightBorder - { - Val = new EnumValue(BorderValues.Single), - Size = 12 - }, - new InsideHorizontalBorder - { - Val = new EnumValue(BorderValues.Single), - Size = 12 - }, - new InsideVerticalBorder - { - Val = new EnumValue(BorderValues.Single), - Size = 12 - })); + Run run = para.AppendChild(new Run()); + run.AppendChild(new Text("Create text in body - Create wordprocessing document")); - table.AppendChild(props); + Table table = new Table(); - for (var i = 0; i <= data.GetUpperBound(0); i++) - { - var tr = new TableRow(); - for (var j = 0; j <= data.GetUpperBound(1); j++) + TableProperties props = new TableProperties( + new TableBorders( + new TopBorder + { + Val = new EnumValue(BorderValues.Single), + Size = 12 + }, + new BottomBorder + { + Val = new EnumValue(BorderValues.Single), + Size = 12 + }, + new LeftBorder + { + Val = new EnumValue(BorderValues.Single), + Size = 12 + }, + new RightBorder { - var tc = new TableCell(); - tc.Append(new Paragraph(new Run(new Text(data[i, j])))); + Val = new EnumValue(BorderValues.Single), + Size = 12 + }, + new InsideHorizontalBorder + { + Val = new EnumValue(BorderValues.Single), + Size = 12 + }, + new InsideVerticalBorder + { + Val = new EnumValue(BorderValues.Single), + Size = 12 + })); + + table.AppendChild(props); - // Assume you want automatically sized columns. - tc.Append(new TableCellProperties( - new TableCellWidth {Type = TableWidthUnitValues.Auto})); + for (var i = 0; i <= data.GetUpperBound(0); i++) + { + var tr = new TableRow(); + for (var j = 0; j <= data.GetUpperBound(1); j++) + { + var tc = new TableCell(); + tc.Append(new Paragraph(new Run(new Text(data[i, j])))); - tr.Append(tc); - } + // Assume you want automatically sized columns. + tc.Append(new TableCellProperties( + new TableCellWidth { Type = TableWidthUnitValues.Auto })); - table.Append(tr); + tr.Append(tc); } - mainPart.Document.Body.Append(table); - mainPart.Document.Save(); + table.Append(tr); } + + mainPart.Document.Body.Append(table); + mainPart.Document.Save(); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change or replace header and footer.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change or replace header and footer.cs index d3a0a07f0..953c918dd 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change or replace header and footer.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change or replace header and footer.cs @@ -1,6 +1,12 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.Collections.Generic; +using System.Linq; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; @@ -12,120 +18,98 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class ChangeOrReplaceHeaderAndFooter : TestUtil { [Test] - public void ChangeOrReplaceHeaderAndFooterFeature() + public void CreateHeaderFooter() { - // Replace a header in the target document with a header from the source document. - using (WordprocessingDocument document = WordprocessingDocument.Create( - ArtifactsDir + "Change or replace header and footer - OpenXML.docx", - WordprocessingDocumentType.Document)) - { - MainDocumentPart mainDocumentPart = document.MainDocumentPart; + // Create a new Word document. + using WordprocessingDocument document = WordprocessingDocument.Create( + ArtifactsDir + "Create header footer - OpenXML.docx", + WordprocessingDocumentType.Document); - mainDocumentPart.DeleteParts(mainDocumentPart.HeaderParts); - mainDocumentPart.DeleteParts(mainDocumentPart.FooterParts); + // Add a main document part. + MainDocumentPart mainDocumentPart = document.AddMainDocumentPart(); + mainDocumentPart.Document = new Document(new Body()); - HeaderPart headerPart = mainDocumentPart.AddNewPart(); - FooterPart footerPart = mainDocumentPart.AddNewPart(); + // Delete existing header and footer parts (if any). + mainDocumentPart.DeleteParts(mainDocumentPart.HeaderParts); + mainDocumentPart.DeleteParts(mainDocumentPart.FooterParts); - string headerPartId = mainDocumentPart.GetIdOfPart(headerPart); - string footerPartId = mainDocumentPart.GetIdOfPart(footerPart); + // Add new header and footer parts. + HeaderPart headerPart = mainDocumentPart.AddNewPart(); + FooterPart footerPart = mainDocumentPart.AddNewPart(); - GenerateHeaderPartContent(headerPart); + string headerPartId = mainDocumentPart.GetIdOfPart(headerPart); + string footerPartId = mainDocumentPart.GetIdOfPart(footerPart); - GenerateFooterPartContent(footerPart); + // Generate content for the header and footer. + GenerateHeaderPartContent(headerPart); + GenerateFooterPartContent(footerPart); - // Give the HeaderReference and FooterReference of each section property the new Id. - IEnumerable sections = mainDocumentPart.Document.Body.Elements(); + // Ensure the document has at least one section. + if (mainDocumentPart.Document.Body.Elements().Count() == 0) + { + mainDocumentPart.Document.Body.AppendChild(new SectionProperties()); + } - foreach (var section in sections) - { - section.RemoveAllChildren(); - section.RemoveAllChildren(); + // Assign the header and footer to all sections. + IEnumerable sections = mainDocumentPart.Document.Body.Elements(); + + foreach (var section in sections) + { + section.RemoveAllChildren(); + section.RemoveAllChildren(); - section.PrependChild(new HeaderReference {Id = headerPartId}); - section.PrependChild(new FooterReference {Id = footerPartId}); - } + section.PrependChild(new HeaderReference { Id = headerPartId }); + section.PrependChild(new FooterReference { Id = footerPartId }); } + + // Save the document. + mainDocumentPart.Document.Save(); } private void GenerateHeaderPartContent(HeaderPart part) { - Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } }; - header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); - header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); - header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); - header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); - header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); - header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); - header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); - header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); - header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); - header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); - header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); - header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); - header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); - header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); - header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); - - Paragraph paragraph1 = new Paragraph { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" }; - - ParagraphProperties paragraphProperties1 = new ParagraphProperties(); - ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" }; - - paragraphProperties1.Append(paragraphStyleId1); - - Run run1 = new Run(); - Text text1 = new Text(); - text1.Text = "Header"; - - run1.Append(text1); - - paragraph1.Append(paragraphProperties1); - paragraph1.Append(run1); - - header1.Append(paragraph1); - - part.Header = header1; + Header header = new Header(); + + Paragraph paragraph = new Paragraph { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" }; + + ParagraphProperties paragraphProperties = new ParagraphProperties(); + ParagraphStyleId paragraphStyleId = new ParagraphStyleId { Val = "Header" }; + + paragraphProperties.Append(paragraphStyleId); + + Run run = new Run(); + Text text = new Text { Text = "Header" }; + + run.Append(text); + paragraph.Append(paragraphProperties); + paragraph.Append(run); + + header.Append(paragraph); + + part.Header = header; } private void GenerateFooterPartContent(FooterPart part) { - Footer footer1 = new Footer { MCAttributes = new MarkupCompatibilityAttributes { Ignorable = "w14 wp14" } }; - footer1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"); - footer1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); - footer1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); - footer1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); - footer1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); - footer1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); - footer1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"); - footer1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"); - footer1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); - footer1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); - footer1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); - footer1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"); - footer1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk"); - footer1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml"); - footer1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"); - - Paragraph paragraph1 = new Paragraph { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" }; - - ParagraphProperties paragraphProperties1 = new ParagraphProperties(); - ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId { Val = "Footer" }; - - paragraphProperties1.Append(paragraphStyleId1); - - Run run1 = new Run(); - Text text1 = new Text(); - text1.Text = "Footer"; - - run1.Append(text1); - - paragraph1.Append(paragraphProperties1); - paragraph1.Append(run1); - - footer1.Append(paragraph1); - - part.Footer = footer1; + Footer footer = new Footer(); + + Paragraph paragraph = new Paragraph { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" }; + + ParagraphProperties paragraphProperties = new ParagraphProperties(); + ParagraphStyleId paragraphStyleId = new ParagraphStyleId { Val = "Footer" }; + + paragraphProperties.Append(paragraphStyleId); + + Run run = new Run(); + Text text = new Text { Text = "Footer" }; + + run.Append(text); + paragraph.Append(paragraphProperties); + paragraph.Append(run); + + footer.Append(paragraph); + + part.Footer = footer; } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change text in a table.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change text in a table.cs index 01b93f551..73c3a5057 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change text in a table.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Change text in a table.cs @@ -1,6 +1,13 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// +using System; using System.Linq; +using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; using NUnit.Framework; @@ -11,33 +18,49 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class ChangeTextInATable : TestUtil { [Test] - public void ChangeTextInATableFeature() + public void ReplaceText() { - // Use the file name and path passed in as an argument to - // open an existing document. - using (WordprocessingDocument doc = - WordprocessingDocument.Open(MyDir + "Change text in a table.docx", true)) - { - // Find the first table in the document. - Table table = - doc.MainDocumentPart.Document.Body.Elements().First(); + // Use the file name and path passed in as an argument to open an existing document. + using WordprocessingDocument doc = WordprocessingDocument.Open(MyDir + "Replace text.docx", true); + + // Get the main document part. + MainDocumentPart mainPart = doc.MainDocumentPart; + if (mainPart?.Document?.Body == null) + throw new InvalidOperationException("The document does not contain a valid body."); + + // Find the first table in the document. + Table table = mainPart.Document.Body.Elements
().FirstOrDefault(); + // Find the second row in the table. + TableRow row = table.Elements().ElementAtOrDefault(1); + // Find the third cell in the row. + TableCell cell = row.Elements().ElementAtOrDefault(2); + // Find the first paragraph in the table cell. + Paragraph paragraph = cell.Elements().FirstOrDefault(); + // Find the first run in the paragraph. + Run run = paragraph.Elements().FirstOrDefault(); - // Find the second row in the table. - TableRow row = table.Elements().ElementAt(1); + // Find the first text element in the run. + Text text = run.Elements().FirstOrDefault(); + if (text == null) + { + // If no text element exists, create one. + text = new Text(); + run.Append(text); + } - // Find the third cell in the row. - TableCell cell = row.Elements().ElementAt(2); + // Set the text for the run. + text.Text = "The text from the OpenXML API example"; - // Find the first paragraph in the table cell. - Paragraph p = cell.Elements().First(); + using WordprocessingDocument destinationDoc = WordprocessingDocument.Create( + ArtifactsDir + "Replace text - OpenXML.docx", + WordprocessingDocumentType.Document); - // Find the first run in the paragraph. - Run r = p.Elements().First(); + // Copy the content from the source document to the destination document. + destinationDoc.AddMainDocumentPart(); + destinationDoc.MainDocumentPart.Document = (Document)doc.MainDocumentPart.Document.CloneNode(true); - // Set the text for the run. - Text t = r.Elements().First(); - t.Text = "The text from the OpenXML API example"; - } + // Save the destination document. + destinationDoc.MainDocumentPart.Document.Save(); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Convert from docm to docx.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Convert from docm to docx.cs index c6b21f445..e8db9d951 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Convert from docm to docx.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Convert from docm to docx.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; using DocumentFormat.OpenXml; @@ -11,41 +16,28 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class ConvertFromDocmToDocx : TestUtil { [Test] - public void ConvertFromDocmToDocxFeature() + public void DocmToDocxConversion() { - bool fileChanged = false; + string docmFilePath = MyDir + "Docm to Docx conversion.docm"; + string docxFilePath = ArtifactsDir + "Docm to Docx conversion - OpenXML.docx"; - using (WordprocessingDocument document = - WordprocessingDocument.Open(MyDir + "Convert from docm to docx.docm", true)) + using (WordprocessingDocument docm = WordprocessingDocument.Open(docmFilePath, false)) { - var docPart = document.MainDocumentPart; + // Create a copy of the .docm file as .docx. + File.Copy(docmFilePath, docxFilePath, true); - // Look for the vbaProject part. If it is there, delete it. - var vbaPart = docPart.VbaProjectPart; - if (vbaPart != null) + // Open the new .docx file and remove the macros. + using (WordprocessingDocument docx = WordprocessingDocument.Open(docxFilePath, true)) { - // Delete the vbaProject part and then save the document. - docPart.DeletePart(vbaPart); - docPart.Document.Save(); + // Remove the VBA project part (macros). + var vbaPart = docx.MainDocumentPart.VbaProjectPart; + if (vbaPart != null) + docx.MainDocumentPart.DeletePart(vbaPart); - // Change the document type to not macro-enabled. - document.ChangeDocumentType( - WordprocessingDocumentType.Document); - - fileChanged = true; + // Change the document type to .docx (no macros). + docx.ChangeDocumentType(WordprocessingDocumentType.Document); } } - - // If anything goes wrong in this file handling, - // the code will raise an exception back to the caller. - if (fileChanged) - { - if (File.Exists(ArtifactsDir + "Convert from docm to docx - OpenXML.docm")) - File.Delete(ArtifactsDir + "Convert from docm to docx - OpenXML.docm"); - - File.Move(MyDir + "Convert from docm to docx.docm", - ArtifactsDir + "Convert from docm to docx - OpenXML.docm"); - } } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create a document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create a document.cs index 3bc687dcd..b95bb944b 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create a document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create a document.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; @@ -11,21 +16,26 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class CreateADocument : TestUtil { [Test] - public void CreateADocumentFeature() + public void CreateNewDocument() { - using (WordprocessingDocument wordDocument = - WordprocessingDocument.Create(ArtifactsDir + "Create a document - OpenXML.docx", - WordprocessingDocumentType.Document)) + // Create a Wordprocessing document. + using (WordprocessingDocument wordDocument = WordprocessingDocument.Create( + ArtifactsDir + "Create new document - OpenXML.docx", + WordprocessingDocumentType.Document)) { + // Add a main document part. MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); + // Create the document structure and add some text. mainPart.Document = new Document(); - - Body body = mainPart.Document.AppendChild(new Body()); - Paragraph para = body.AppendChild(new Paragraph()); - - Run run = para.AppendChild(new Run()); - run.AppendChild(new Text("Create text in body - Create wordprocessing document")); + Body body = new Body(); + Paragraph paragraph = new Paragraph(); + Run run = new Run(); + run.Append(new Text("Hello, Open XML!")); + paragraph.Append(run); + body.Append(paragraph); + mainPart.Document.Append(body); + mainPart.Document.Save(); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create and add a paragraph style.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create and add a paragraph style.cs index b315215be..2f8089070 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create and add a paragraph style.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Create and add a paragraph style.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.Linq; using DocumentFormat.OpenXml; @@ -12,134 +17,61 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class CreateAndAddAParagraphStyle : TestUtil { [Test] - public void CreateAndAddAParagraphStyleFeature() + public void ParagraphCustomStyle() { - using (WordprocessingDocument doc = - WordprocessingDocument.Create(ArtifactsDir + "Create and add a paragraph style - OpenXML.docx", - WordprocessingDocumentType.Document)) + // Create a Wordprocessing document. + using (WordprocessingDocument wordDocument = WordprocessingDocument.Create( + ArtifactsDir + "Paragraph custom style - OpenXML.docx", + WordprocessingDocumentType.Document)) { - // Get the Styles part for this document. - // If the Styles part does not exist: add the styles part, and then add the style. - StyleDefinitionsPart part = - doc.MainDocumentPart.StyleDefinitionsPart ?? AddStylesPartToPackage(doc); + // Add a main document part. + MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); - // Set up a variable to hold the style ID. - string parastyleId = "OverdueAmountPara"; + // Create the document structure and add some text. + mainPart.Document = new Document(); + Body body = new Body(); - // Create and add a paragraph style to the specified styles part - // with the specified style ID, style name, and aliases. - AddParagraphStyle(part, - parastyleId, - "Overdue Amount Para", - "Late Due, Late Amount"); + // Create a custom paragraph style. + StyleDefinitionsPart stylePart = mainPart.AddNewPart(); + Styles styles = new Styles(); - // Add a paragraph with a run and some text. - Paragraph p = - new Paragraph( - new Run( - new Text("This is some text in a run in a paragraph."))); - - // Add the paragraph as a child element of the w:body element. - doc.MainDocumentPart.Document.Body.AppendChild(p); - - // If the paragraph has no ParagraphProperties object, then create one. - if (!p.Elements().Any()) + // Define a new paragraph style. + Style paragraphStyle = new Style() { - p.PrependChild(new ParagraphProperties()); - } - - // Get a reference to the ParagraphProperties object. - ParagraphProperties pPr = p.ParagraphProperties; - - // If a ParagraphStyleId object doesn't exist, then create one. - if (pPr.ParagraphStyleId == null) - pPr.ParagraphStyleId = new ParagraphStyleId(); - - pPr.ParagraphStyleId.Val = parastyleId; - } - } - - // Create a new paragraph style with the specified style ID, primary style name, and aliases. - // Add it to the specified style definitions part. - public static void AddParagraphStyle(StyleDefinitionsPart styleDefinitionsPart, - string styleid, string stylename, string aliases = "") - { - // Access the root element of the styles part. - Styles styles = styleDefinitionsPart.Styles; - if (styles == null) - { - styleDefinitionsPart.Styles = new Styles(); - styleDefinitionsPart.Styles.Save(); + Type = StyleValues.Paragraph, + StyleId = "CustomStyle", + CustomStyle = true, + StyleName = new StyleName() { Val = "Custom Style" }, + BasedOn = new BasedOn() { Val = "Normal" }, + }; + + styles.Append(paragraphStyle); + stylePart.Styles = styles; + stylePart.Styles.Save(); + + // Create a new paragraph with the custom style. + Paragraph paragraph = new Paragraph() + { + ParagraphProperties = new ParagraphProperties() + { + ParagraphStyleId = new ParagraphStyleId() { Val = "CustomStyle" }, + Justification = new Justification() { Val = JustificationValues.Center }, + SpacingBetweenLines = new SpacingBetweenLines() { After = "200" } + } + }; + Run run = new Run(); + + // Set bold text. + RunProperties runProperties = new RunProperties(); + runProperties.Append(new Bold()); + run.Append(runProperties); + run.Append(new Text("This is a bold paragraph with a custom style!")); + paragraph.Append(run); + body.Append(paragraph); + + mainPart.Document.Append(body); + mainPart.Document.Save(); } - - // Create a new paragraph style element and specify some of the attributes. - Style style = new Style - { - Type = StyleValues.Paragraph, - StyleId = styleid, - CustomStyle = true, - Default = false - }; - - // Create and add the child elements (properties of the style). - Aliases aliases1 = new Aliases { Val = aliases }; - AutoRedefine autoredefine1 = new AutoRedefine { Val = OnOffOnlyValues.Off }; - BasedOn basedon1 = new BasedOn { Val = "Normal" }; - LinkedStyle linkedStyle1 = new LinkedStyle { Val = "OverdueAmountChar" }; - Locked locked1 = new Locked { Val = OnOffOnlyValues.Off }; - PrimaryStyle primarystyle1 = new PrimaryStyle { Val = OnOffOnlyValues.On }; - StyleHidden stylehidden1 = new StyleHidden { Val = OnOffOnlyValues.Off }; - SemiHidden semihidden1 = new SemiHidden { Val = OnOffOnlyValues.Off }; - StyleName styleName1 = new StyleName { Val = stylename }; - NextParagraphStyle nextParagraphStyle1 = new NextParagraphStyle { Val = "Normal" }; - UIPriority uipriority1 = new UIPriority { Val = 1 }; - UnhideWhenUsed unhidewhenused1 = new UnhideWhenUsed { Val = OnOffOnlyValues.On }; - - if (aliases != "") - style.Append(aliases1); - style.Append(autoredefine1); - style.Append(basedon1); - style.Append(linkedStyle1); - style.Append(locked1); - style.Append(primarystyle1); - style.Append(stylehidden1); - style.Append(semihidden1); - style.Append(styleName1); - style.Append(nextParagraphStyle1); - style.Append(uipriority1); - style.Append(unhidewhenused1); - - // Create the StyleRunProperties object and specify some of the run properties. - StyleRunProperties styleRunProperties1 = new StyleRunProperties(); - Bold bold1 = new Bold(); - Color color1 = new Color { ThemeColor = ThemeColorValues.Accent2 }; - RunFonts font1 = new RunFonts { Ascii = "Lucida Console" }; - Italic italic1 = new Italic(); - - // Specify a 12 point size. - FontSize fontSize1 = new FontSize { Val = "24" }; - styleRunProperties1.Append(bold1); - styleRunProperties1.Append(color1); - styleRunProperties1.Append(font1); - styleRunProperties1.Append(fontSize1); - styleRunProperties1.Append(italic1); - - // Add the run properties to the style. - style.Append(styleRunProperties1); - - // Add the style to the styles part. - styles.Append(style); - } - - // Add a StylesDefinitionsPart to the document. - public static StyleDefinitionsPart AddStylesPartToPackage(WordprocessingDocument doc) - { - Styles root = new Styles(); - - var part = doc.MainDocumentPart.AddNewPart(); - root.Save(part); - - return part; } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Extract image from word document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Extract image from word document.cs index 1b074d129..9fd486778 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Extract image from word document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Extract image from word document.cs @@ -1,36 +1,65 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +//// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +//// +//// This file is part of Aspose.Words. The source code in this file +//// is only intended as a supplement to the documentation, and is provided +//// "as is", without warranty of any kind, either expressed or implied. +//////////////////////////////////////////////////////////////////////////// -using System.Collections.Generic; -using System.Drawing; -using System.Linq; +using System; +using System.IO; using DocumentFormat.OpenXml.Packaging; using NUnit.Framework; namespace AsposeWordsVSOpenXML.OpenXML_features { [TestFixture] - public class ExtractImageFromWordDocument : TestUtil + public class ExtractImage : TestUtil { [Test] public void ExtractImageFromWordDocumentFeature() { - using (WordprocessingDocument doc = WordprocessingDocument.Open(MyDir + "Extract image.docx", false)) + // Open the Wordprocessing document. + using (WordprocessingDocument wordDocument = WordprocessingDocument.Open(MyDir + "Extract image.docx", false)) { - int imgCount = doc.MainDocumentPart.GetPartsOfType().Count(); + MainDocumentPart mainPart = wordDocument.MainDocumentPart; - if (imgCount > 0) + // Loop through each ImagePart in the document. + int imageIndex = 0; + foreach (var imagePart in mainPart.ImageParts) { - List imgParts = new List(doc.MainDocumentPart.ImageParts); - - foreach (ImagePart imgPart in imgParts) + // Get the image extension. + string imageExtension = GetImageExtension(imagePart.ContentType); + if (imageExtension != null) { - Image img = Image.FromStream(imgPart.GetStream()); - string imgfileName = imgPart.Uri.OriginalString.Substring(imgPart.Uri.OriginalString.LastIndexOf("/") + 1); + // Create a file name for the image. + string imageFileName = Path.Combine(ArtifactsDir, $"ExtractImage.{imageIndex}.OpenXML{imageExtension}"); + + // Save the image to the output directory. + using (var stream = imagePart.GetStream()) + using (var fileStream = new FileStream(imageFileName, FileMode.Create, FileAccess.Write)) + stream.CopyTo(fileStream); - img.Save(ArtifactsDir + imgfileName); + imageIndex++; } } } } + + static string GetImageExtension(string contentType) + { + switch (contentType) + { + case "image/jpeg": + return ".jpg"; + case "image/png": + return ".png"; + case "image/gif": + return ".gif"; + case "image/bmp": + return ".bmp"; + default: + return null; // Unsupported image type. + } + } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Get and set bookmark text.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Get and set bookmark text.cs index 1824b9f3d..c75ef2796 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Get and set bookmark text.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Get and set bookmark text.cs @@ -1,6 +1,13 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// -using System.Collections.Generic; +using System; +using System.Linq; +using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; using NUnit.Framework; @@ -11,23 +18,38 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class GetAndSetBookmarkText : TestUtil { [Test] - public void GetAndSetBookmarkTextFeature() + public void BookmarkText() { - IDictionary bookmarkMap = new Dictionary(); - - using (WordprocessingDocument wordDocument = WordprocessingDocument.Open(MyDir + "Get and set bookmark text.docx", true)) + // Open the original Wordprocessing document. + using (WordprocessingDocument originalDocument = WordprocessingDocument.Open(MyDir + "Bookmark.docx", false)) { - foreach (BookmarkStart bookmarkStart in wordDocument.MainDocumentPart.Document.Body.Descendants()) + // Create a new Wordprocessing document. + using (WordprocessingDocument newDocument = WordprocessingDocument.Create(ArtifactsDir + "Bookmark text - OpenXML.docx", WordprocessingDocumentType.Document)) { - bookmarkMap[bookmarkStart.Name] = bookmarkStart; + // Add a main document part to the new document. + MainDocumentPart newMainPart = newDocument.AddMainDocumentPart(); + newMainPart.Document = new Document(new Body()); + + // Copy content from the original document to the new document. + MainDocumentPart originalMainPart = originalDocument.MainDocumentPart; + newMainPart.Document.Body = (Body)originalMainPart.Document.Body.Clone(); + + // Find the bookmark in the new document + var bookmark = newMainPart.Document.Descendants() + .FirstOrDefault(b => b.Name == "MyBookmark"); + + // Get the parent element of the bookmark + var parentElement = bookmark.Parent; + + // Create a new run with the new text + Run newRun = new Run(new Text("This is a new bookmarked text.")); - foreach (BookmarkStart bookmark in bookmarkMap.Values) - { - Run bookmarkText = bookmark.NextSibling(); + // Replace the bookmark with the new text + parentElement.RemoveAllChildren(); // Remove existing content + parentElement.Append(newRun); // Add new text - if (bookmarkText != null) - bookmarkText.GetFirstChild().Text = "Test"; - } + // Save changes to the new document + newMainPart.Document.Save(); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert a comment.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert a comment.cs index 303e548df..c950db082 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert a comment.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert a comment.cs @@ -1,7 +1,11 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System; -using System.Linq; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; @@ -13,60 +17,55 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class InsertAComment : TestUtil { [Test] - public void InsertACommentFeature() + public void InsertComment() { - using (WordprocessingDocument document = - WordprocessingDocument.Create(ArtifactsDir + "Insert a comment - OpenXML.docx", - WordprocessingDocumentType.Document)) + using (WordprocessingDocument wordDocument = WordprocessingDocument.Create(ArtifactsDir + "Insert a comment - OpenXML.docx", WordprocessingDocumentType.Document)) { - // Locate the first paragraph in the document. - Paragraph firstParagraph = - document.MainDocumentPart.Document.Descendants().First(); - Comments comments; - string id = "0"; + // Add the main document part. + MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); + mainPart.Document = new Document(); + Body body = new Body(); - // Verify that the document contains a - // WordProcessingCommentsPart part; if not, add a new one. - if (document.MainDocumentPart.GetPartsOfType().Any()) - { - comments = - document.MainDocumentPart.WordprocessingCommentsPart.Comments; - if (comments.HasChildren) - // Obtain an unused ID. - id = comments.Descendants().Select(e => e.Id.Value).Max(); - } - else - { - // No "WordprocessingCommentsPart" part exists, so add one to the package. - WordprocessingCommentsPart commentPart = - document.MainDocumentPart.AddNewPart(); - commentPart.Comments = new Comments(); - comments = commentPart.Comments; - } + // Add a paragraph with some text. + Paragraph paragraph = new Paragraph(); + Run run = new Run(); + run.AppendChild(new Text("Commented text.")); + paragraph.AppendChild(run); + body.AppendChild(paragraph); + + // Add a comments part to the document. + WordprocessingCommentsPart commentsPart = mainPart.AddNewPart(); + commentsPart.Comments = new Comments(); - // Compose a new Comment and add it to the Comments part. - Paragraph p = new Paragraph(new Run(new Text("This is my comment."))); - Comment cmt = new Comment + // Create a comment. + Comment comment = new Comment() { - Id = id, - Author = "author", - Initials = "initials", + Id = "1", + Author = "Aspose.Words", Date = DateTime.Now }; - cmt.AppendChild(p); - comments.AppendChild(cmt); - comments.Save(); - // Specify the text range for the Comment. - // Insert the new CommentRangeStart before the first run of paragraph. - firstParagraph.InsertBefore(new CommentRangeStart {Id = id}, firstParagraph.GetFirstChild()); + // Add text to the comment. + Paragraph commentParagraph = new Paragraph(); + Run commentRun = new Run(); + commentRun.AppendChild(new Text("Comment regarding text.")); + commentParagraph.AppendChild(commentRun); + comment.AppendChild(commentParagraph); + + // Add the comment to the comments part. + commentsPart.Comments.AppendChild(comment); + commentsPart.Comments.Save(); + + // Add a reference to the comment in the document. + run.AppendChild(new CommentRangeStart { Id = "1" }); + run.AppendChild(new CommentRangeEnd { Id = "1" }); + run.AppendChild(new CommentReference { Id = "1" }); - // Insert the new CommentRangeEnd after last run of paragraph. - var cmtEnd = firstParagraph.InsertAfter(new CommentRangeEnd {Id = id}, - firstParagraph.Elements().Last()); + // Add the body to the document. + mainPart.Document.AppendChild(body); - // Compose a run with CommentReference and insert it. - firstParagraph.InsertAfter(new Run(new CommentReference {Id = id}), cmtEnd); + // Save the document. + mainPart.Document.Save(); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert picture in word document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert picture in word document.cs index a8443c5d7..ac6833617 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert picture in word document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Insert picture in word document.cs @@ -1,11 +1,16 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; using DocumentFormat.OpenXml; +using DocumentFormat.OpenXml.Drawing; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; using NUnit.Framework; -using A = DocumentFormat.OpenXml.Drawing; using DW = DocumentFormat.OpenXml.Drawing.Wordprocessing; using Paragraph = DocumentFormat.OpenXml.Wordprocessing.Paragraph; using PIC = DocumentFormat.OpenXml.Drawing.Pictures; @@ -17,91 +22,117 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class InsertPictureInWordDocument : TestUtil { [Test] - public static void InsertPictureInWordDocumentFeature() + public static void InsertPicture() { - using (WordprocessingDocument wordprocessingDocument = - WordprocessingDocument.Create(ArtifactsDir + "Insert picture - OpenXML.docx", - WordprocessingDocumentType.Document)) + using (WordprocessingDocument wordDocument = WordprocessingDocument.Create(ArtifactsDir + "Insert picture - OpenXML.docx", WordprocessingDocumentType.Document)) { - MainDocumentPart mainPart = wordprocessingDocument.MainDocumentPart; + // Add the main document part + MainDocumentPart mainPart = wordDocument.AddMainDocumentPart(); + mainPart.Document = new Document(); + Body body = new Body(); - ImagePart imagePart = mainPart.AddImagePart(ImagePartType.Jpeg); + // Add a paragraph to the document + Paragraph paragraph = new Paragraph(); + Run run = new Run(); + // Add the image to the document + ImagePart imagePart = mainPart.AddImagePart(ImagePartType.Jpeg); using (FileStream stream = new FileStream(MyDir + "Aspose.Words.png", FileMode.Open)) { imagePart.FeedData(stream); } - AddImageToBody(wordprocessingDocument, mainPart.GetIdOfPart(imagePart)); - } - } + // Generate a unique relationship ID for the image + string imageId = mainPart.GetIdOfPart(imagePart); - private static void AddImageToBody(WordprocessingDocument wordDoc, string relationshipId) - { - // Define the reference of the image. - var element = - new Drawing( - new DW.Inline( - new DW.Extent { Cx = 990000L, Cy = 792000L }, - new DW.EffectExtent - { - LeftEdge = 0L, - TopEdge = 0L, - RightEdge = 0L, - BottomEdge = 0L - }, - new DW.DocProperties - { - Id = 1U, - Name = "Picture 1" - }, - new DW.NonVisualGraphicFrameDrawingProperties( - new A.GraphicFrameLocks { NoChangeAspect = true }), - new A.Graphic( - new A.GraphicData( - new PIC.Picture( - new PIC.NonVisualPictureProperties( - new PIC.NonVisualDrawingProperties - { - Id = 0U, - Name = "New Bitmap Image.jpg" - }, - new PIC.NonVisualPictureDrawingProperties()), - new PIC.BlipFill( - new A.Blip( - new A.BlipExtensionList( - new A.BlipExtension - { - Uri = - "{28A0092B-C50C-407E-A947-70E740481C1C}" - }) - ) - { - Embed = relationshipId, - CompressionState = - A.BlipCompressionValues.Print - }, - new A.Stretch( - new A.FillRectangle())), - new PIC.ShapeProperties( - new A.Transform2D( - new A.Offset { X = 0L, Y = 0L }, - new A.Extents { Cx = 990000L, Cy = 792000L }), - new A.PresetGeometry( - new A.AdjustValueList() - ) { Preset = A.ShapeTypeValues.Rectangle })) - ) { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" }) - ) - { - DistanceFromTop = 0U, - DistanceFromBottom = 0U, - DistanceFromLeft = 0U, - DistanceFromRight = 0U, - EditId = "50D07946" - }); + // Define the image's dimensions (width and height in pixels) + const int emuPerPixel = 9525; + int widthInPixels = 300; + int heightInPixels = 200; - // Append the reference to body, the element should be in a Run. - wordDoc.MainDocumentPart.Document.Body.AppendChild(new Paragraph(new Run(element))); + // Add the image to the run + run.AppendChild(new Drawing( + new DW.Inline( + new DW.Extent() + { + Cx = widthInPixels * emuPerPixel, + Cy = heightInPixels * emuPerPixel + }, + new DW.DocProperties() + { + Id = 1, + Name = "Picture 1" + }, + new DW.NonVisualGraphicFrameDrawingProperties(), + new Graphic( + new GraphicData( + new PIC.Picture( + new PIC.NonVisualPictureProperties( + new PIC.NonVisualDrawingProperties() + { + Id = 0, + Name = "Image" + }, + new PIC.NonVisualPictureDrawingProperties() + ), + new PIC.BlipFill( + new Blip() + { + Embed = imageId, + CompressionState = BlipCompressionValues.Print + }, + new Stretch( + new FillRectangle() + ) + ), + new PIC.ShapeProperties( + new Transform2D( + new Offset() + { + X = 0, + Y = 0 + }, + new Extents() + { + Cx = widthInPixels * emuPerPixel, + Cy = heightInPixels * emuPerPixel + } + ), + new PresetGeometry( + new AdjustValueList() + ) + { + Preset = ShapeTypeValues.Rectangle + } + ) + ) + ) + { + Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" + } + ) + ) + { + DistanceFromTop = 0, + DistanceFromBottom = 0, + DistanceFromLeft = 0, + DistanceFromRight = 0, + EditId = "50D07946" + } + )); + + // Add the run to the paragraph + paragraph.AppendChild(run); + + // Add the paragraph to the body + body.AppendChild(paragraph); + + // Add the body to the document + mainPart.Document.AppendChild(body); + + // Save the document + mainPart.Document.Save(); + } } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open and add text to word document.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open and add text to word document.cs index d7080ba4d..7df1aab91 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open and add text to word document.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open and add text to word document.cs @@ -1,5 +1,11 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// +using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; using NUnit.Framework; @@ -10,19 +16,36 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class OpenAndAddTextToWordDocument : TestUtil { [Test] - public void OpenAndAddTextToWordDocumentFeature() + public void AddText() { - // Open a WordprocessingDocument for editing using the filepath. - using (WordprocessingDocument wordprocessingDocument = - WordprocessingDocument.Open(MyDir + "Document.docx", true)) + using (WordprocessingDocument originalDocument = WordprocessingDocument.Open(MyDir + "Document.docx", false)) { - // Assign a reference to the existing document body. - Body body = wordprocessingDocument.MainDocumentPart.Document.Body; + // Create a new Wordprocessing document. + using (WordprocessingDocument newDocument = WordprocessingDocument.Create(ArtifactsDir + "Add text - OpenXML.docx", WordprocessingDocumentType.Document)) + { + // Add a main document part to the new document. + MainDocumentPart newMainPart = newDocument.AddMainDocumentPart(); + newMainPart.Document = new Document(new Body()); - // Add new text. - Paragraph para = body.AppendChild(new Paragraph()); - Run run = para.AppendChild(new Run()); - run.AppendChild(new Text("Append text in body - Open and add text to word document")); + // Copy content from the original document to the new document. + MainDocumentPart originalMainPart = originalDocument.MainDocumentPart; + newMainPart.Document.Body = (Body)originalMainPart.Document.Body.Clone(); + + Body body = newMainPart.Document.Body; + + // Create a new paragraph with the text you want to add + Paragraph newParagraph = new Paragraph(); + Run newRun = new Run(); + Text newText = new Text("This is the text added to the end of the document."); + newRun.Append(newText); + newParagraph.Append(newRun); + + // Append the new paragraph to the body + body.Append(newParagraph); + + // Save the changes + newMainPart.Document.Save(); + } } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open document from stream.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open document from stream.cs index 663bc480c..ec553c9f4 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open document from stream.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open document from stream.cs @@ -1,6 +1,12 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; +using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; using NUnit.Framework; @@ -11,17 +17,41 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class OpenDocumentFromStream : TestUtil { [Test] - public void OpenDocumentFromStreamFeature() + public void AddTextStream() { - using (Stream stream = File.Open(MyDir + "Document.docx", FileMode.Open)) + using (Stream inStream = File.Open(MyDir + "Document.docx", FileMode.Open)) { - using (WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream, true)) + using (WordprocessingDocument originalDocument = WordprocessingDocument.Open(inStream, false)) { - Body body = wordprocessingDocument.MainDocumentPart.Document.Body; - Paragraph para = body.AppendChild(new Paragraph()); + using (Stream outStream = File.Create(ArtifactsDir + "Add text stream - OpenXML.docx")) + { + // Create a new Wordprocessing document. + using (WordprocessingDocument newDocument = WordprocessingDocument.Create(outStream, WordprocessingDocumentType.Document)) + { + // Add a main document part to the new document. + MainDocumentPart newMainPart = newDocument.AddMainDocumentPart(); + newMainPart.Document = new Document(new Body()); - Run run = para.AppendChild(new Run()); - run.AppendChild(new Text("Append text in body - Open and add to wordprocessing stream")); + // Copy content from the original document to the new document. + MainDocumentPart originalMainPart = originalDocument.MainDocumentPart; + newMainPart.Document.Body = (Body)originalMainPart.Document.Body.Clone(); + + Body body = newMainPart.Document.Body; + + // Create a new paragraph with the text you want to add + Paragraph newParagraph = new Paragraph(); + Run newRun = new Run(); + Text newText = new Text("This is the text added to the end of the document."); + newRun.Append(newText); + newParagraph.Append(newRun); + + // Append the new paragraph to the body + body.Append(newParagraph); + + // Save the changes + newMainPart.Document.Save(); + } + } } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open read only access.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open read only access.cs index a0657d1d3..abde340ab 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open read only access.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Open read only access.cs @@ -11,7 +11,7 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class OpenReadOnlyAccess : TestUtil { [Test] - public void OpenReadOnlyAccessFeature() + public void OpenReadOnly() { // Open a WordprocessingDocument based on a filepath. using (WordprocessingDocument wordDocument = @@ -23,7 +23,7 @@ public void OpenReadOnlyAccessFeature() // Attempt to add some text. Paragraph para = body.AppendChild(new Paragraph()); Run run = para.AppendChild(new Run()); - run.AppendChild(new Text("Append text in body, but text is not saved - Open wordprocessing document readonly")); + run.AppendChild(new Text("This is the text added to the end of the document.")); // Call the "Save" method to generate an exception and show that access is read-only. using (Stream stream = File.Create(ArtifactsDir + "Open readonly access - OpenXML.docx")) diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove comments.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove comments.cs index b623b1e88..22c5416e1 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove comments.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove comments.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; @@ -14,72 +19,60 @@ namespace AsposeWordsVSOpenXML.OpenXML_features public class DeleteCommentsByAllOrASpecificAuthor : TestUtil { [Test] - public void DeleteCommentsByAllOrASpecificAuthorFeature() + public void RemoveComments() { - RemoveComments(""); - } + string authorName = string.Empty; - private void RemoveComments(string author) - { - // Get an existing Wordprocessing document. - using (WordprocessingDocument document = - WordprocessingDocument.Open(MyDir + "Comments.docx", true)) + File.Copy(MyDir + "Comments.docx", ArtifactsDir + "Remove comments - OpenXML.docx", true); + using (WordprocessingDocument doc = WordprocessingDocument.Open(ArtifactsDir + "Remove comments - OpenXML.docx", true)) { - WordprocessingCommentsPart commentPart = - document.MainDocumentPart.WordprocessingCommentsPart; - - // If no "WordprocessingCommentsPart" exists, there can be no comments. - // Stop execution and return from the method. - if (commentPart == null) - return; - - // Create a list of comments by the specified author. - // If the author name is empty, then list all authors. - List commentsToDelete = - commentPart.Comments.Elements().ToList(); - - if (!String.IsNullOrEmpty(author)) + // Add a main document part to the new document. + MainDocumentPart mainPart = doc.MainDocumentPart; + + // Get the comments part + var commentsPart = mainPart.WordprocessingCommentsPart; + if (commentsPart != null) { - commentsToDelete = commentsToDelete.Where(c => c.Author == author).ToList(); - } - - IEnumerable commentIds = - commentsToDelete.Select(r => r.Id.Value); + // Get the comments + var comments = commentsPart.Comments; + // Create a list to hold comments to remove + var commentsToRemove = new List(); - foreach (Comment c in commentsToDelete) - c.Remove(); + foreach (var comment in comments.Elements()) + if (string.IsNullOrEmpty(authorName) || comment.Author == authorName) + commentsToRemove.Add(comment); - // Save changes to the comments part. - commentPart.Comments.Save(); + IEnumerable commentIds = + commentsToRemove.Select(r => r.Id.Value); - Document doc = document.MainDocumentPart.Document; + // Remove the comments + foreach (var comment in commentsToRemove) + comment.Remove(); - // Delete the "CommentRangeStart" for each deleted comment in the main document. - List commentRangeStartToDelete = - doc.Descendants().Where(c => commentIds.Contains(c.Id.Value)).ToList(); + // Save changes to the comments part + commentsPart.Comments.Save(); - foreach (CommentRangeStart c in commentRangeStartToDelete) - c.Remove(); + // Delete the "CommentRangeStart" for each deleted comment in the main document. + List commentRangeStartToDelete = + mainPart.Document.Descendants().Where(c => commentIds.Contains(c.Id.Value)).ToList(); - // Delete the "CommentRangeEnd" for each deleted comment in the main document. - List commentRangeEndToDelete = - doc.Descendants().Where(c => commentIds.Contains(c.Id.Value)).ToList(); + foreach (CommentRangeStart rangeStart in commentRangeStartToDelete) + rangeStart.Remove(); - foreach (CommentRangeEnd c in commentRangeEndToDelete) - c.Remove(); + // Delete the "CommentRangeEnd" for each deleted comment in the main document. + List commentRangeEndToDelete = + mainPart.Document.Descendants().Where(c => commentIds.Contains(c.Id.Value)).ToList(); - // Delete the "CommentReference" for each deleted comment in the main document. - List commentRangeReferenceToDelete = - doc.Descendants().Where(c => commentIds.Contains(c.Id.Value)).ToList(); + foreach (CommentRangeEnd rangeEnd in commentRangeEndToDelete) + rangeEnd.Remove(); - foreach (CommentReference c in commentRangeReferenceToDelete) - c.Remove(); + // Delete the "CommentReference" for each deleted comment in the main document. + List commentRangeReferenceToDelete = + mainPart.Document.Descendants().Where(c => commentIds.Contains(c.Id.Value)).ToList(); - using (Stream stream = File.Open(ArtifactsDir + "Remove comments - OpenXML.docx", FileMode.CreateNew)) - { - doc.Save(stream); + foreach (CommentReference reference in commentRangeReferenceToDelete) + reference.Remove(); } - } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove header footer.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove header footer.cs index 6dc90f5a5..dd63c63b1 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove header footer.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove header footer.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; using System.Linq; @@ -14,7 +19,8 @@ public class RemoveHeaderFooter : TestUtil [Test] public void RemoveHeaderFooterFeature() { - using (WordprocessingDocument doc = WordprocessingDocument.Open(MyDir + "Document.docx", true)) + File.Copy(MyDir + "Document.docx", ArtifactsDir + "Remove header and footer - OpenXML.docx", true); + using (WordprocessingDocument doc = WordprocessingDocument.Open(ArtifactsDir + "Remove header and footer - OpenXML.docx", true)) { var mainDocumentPart = doc.MainDocumentPart; @@ -28,26 +34,17 @@ public void RemoveHeaderFooterFeature() // Get a reference to the root element of the main document part. Document document = mainDocumentPart.Document; - // Remove all references to the headers and footers. - // First, create a list of all descendants of type HeaderReference. // Then, navigate the list and call remove on each item to delete the reference. var headers = document.Descendants().ToList(); - foreach (var header in headers) header.Remove(); // First, create a list of all descendants of type FooterReference. // Then, navigate the list and call remove on each item to delete the reference. var footers = document.Descendants().ToList(); - foreach (var footer in footers) footer.Remove(); - - using (Stream stream = File.Create(ArtifactsDir + "Remove header and footer - OpenXML.docx")) - { - document.Save(stream); - } } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove hidden text.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove hidden text.cs index 3292f3069..4f708d6da 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove hidden text.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove hidden text.cs @@ -1,8 +1,14 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; -using System.Xml; +using System.Linq; using DocumentFormat.OpenXml.Packaging; +using DocumentFormat.OpenXml.Wordprocessing; using NUnit.Framework; namespace AsposeWordsVSOpenXML.OpenXML_features @@ -13,35 +19,24 @@ public class RemoveHiddenText : TestUtil [Test] public void RemoveHiddenTextFeature() { - const string wordmlNamespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main"; + File.Copy(MyDir + "Remove hidden text.docx", ArtifactsDir + "Remove hidden text - OpenXML.docx", true); - using (WordprocessingDocument wdDoc = WordprocessingDocument.Open(MyDir + "Remove hidden text.docx", true)) + using WordprocessingDocument doc = WordprocessingDocument.Open(ArtifactsDir + "Remove hidden text - OpenXML.docx", true); + foreach (var paragraph in doc.MainDocumentPart.Document.Body.Elements()) { - // Manage namespaces to perform XPath queries. - NameTable nt = new NameTable(); - XmlNamespaceManager nsManager = new XmlNamespaceManager(nt); - nsManager.AddNamespace("w", wordmlNamespace); - - // Get the document part from the package. - // Load the XML in the document part into an XmlDocument instance. - XmlDocument xdoc = new XmlDocument(nt); - xdoc.Load(wdDoc.MainDocumentPart.GetStream()); - - XmlNodeList hiddenNodes = xdoc.SelectNodes("//w:vanish", nsManager); - - foreach (XmlNode hiddenNode in hiddenNodes) - { - XmlNode topNode = hiddenNode.ParentNode.ParentNode; - XmlNode topParentNode = topNode.ParentNode; - - topParentNode.RemoveChild(topNode); - if (!(topParentNode.HasChildNodes)) - topParentNode.ParentNode.RemoveChild(topParentNode); - } - - using (Stream stream = File.Create(ArtifactsDir + "Remove hidden text - OpenXML.docx")) + // Iterate through all runs in the paragraph. + foreach (var run in paragraph.Elements()) { - xdoc.Save(stream); + // Check if the run has properties + var runProperties = run.RunProperties; + if (runProperties != null) + { + // Check if the text is hidden. + var hidden = runProperties.Elements().FirstOrDefault(); + if (hidden != null) + // Remove the hidden property to unhide the text. + hidden.Remove(); + } } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove page breaks.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove page breaks.cs index f4dcf0b17..c65378c37 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove page breaks.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove page breaks.cs @@ -1,6 +1,10 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// -using System.Collections.Generic; using System.IO; using System.Linq; using DocumentFormat.OpenXml.Packaging; @@ -15,18 +19,17 @@ public class RemovePageBreaks : TestUtil [Test] public void RemovePageBreaksFeature() { - using (WordprocessingDocument myDoc = WordprocessingDocument.Open(MyDir + "Remove page breaks.docx", true)) - { - MainDocumentPart mainPart = myDoc.MainDocumentPart; - List breaks = mainPart.Document.Descendants().ToList(); - - foreach (Break b in breaks) - b.Remove(); + File.Copy(MyDir + "Remove page breaks.docx", ArtifactsDir + "Remove page breaks - OpenXML.docx", true); - using (Stream stream = File.Create(ArtifactsDir + "Remove page breaks - OpenXML.docx")) - { - mainPart.Document.Save(stream); - } + using (WordprocessingDocument doc = WordprocessingDocument.Open(ArtifactsDir + "Remove page breaks - OpenXML.docx", true)) + { + // Get the main document part. + var body = doc.MainDocumentPart.Document.Body; + + // Find all page breaks in the document. + var breaks = body.Descendants().ToList(); + foreach (var pageBreak in breaks) + pageBreak.Remove(); } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove section breaks.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove section breaks.cs index 97b0df195..b51c5da3c 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove section breaks.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Remove section breaks.cs @@ -1,6 +1,10 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// -using System.Collections.Generic; using System.IO; using System.Linq; using DocumentFormat.OpenXml.Packaging; @@ -15,30 +19,19 @@ public class RemoveSectionBreaks : TestUtil [Test] public void RemoveSectionBreaksFeature() { - using (WordprocessingDocument myDoc = WordprocessingDocument.Open(MyDir + "Remove section breaks.docx", true)) - { - MainDocumentPart mainPart = myDoc.MainDocumentPart; - List paraProps = mainPart.Document.Descendants() - .Where(IsSectionProps).ToList(); + File.Copy(MyDir + "Remove section breaks.docx", ArtifactsDir + "Remove section breaks - OpenXML.docx", true); - foreach (ParagraphProperties pPr in paraProps) - pPr.RemoveChild(pPr.GetFirstChild()); + using (WordprocessingDocument doc = WordprocessingDocument.Open(ArtifactsDir + "Remove section breaks - OpenXML.docx", true)) + { + // Get the main document part. + var body = doc.MainDocumentPart.Document.Body; - using (Stream stream = File.Create(ArtifactsDir + "Remove section breaks - OpenXML.docx")) - { - mainPart.Document.Save(stream); - } + // Find all section breaks in the document. + var sectionProperties = body.Descendants().ToList(); + // Remove each section properties element. + foreach (var section in sectionProperties) + section.Remove(); } } - - private static bool IsSectionProps(ParagraphProperties pPr) - { - SectionProperties sectPr = pPr.GetFirstChild(); - - if (sectPr == null) - return false; - - return true; - } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Retrieve comments.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Retrieve comments.cs index b03932e8d..1f9f75329 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Retrieve comments.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Retrieve comments.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System; using DocumentFormat.OpenXml.Packaging; @@ -13,9 +18,9 @@ public class RetrieveComments : TestUtil [Test] public static void RetrieveCommentsFeature() { - using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(MyDir + "Comments.docx", false)) + using (WordprocessingDocument doc = WordprocessingDocument.Open(MyDir + "Comments.docx", false)) { - WordprocessingCommentsPart commentsPart = wordDoc.MainDocumentPart.WordprocessingCommentsPart; + WordprocessingCommentsPart commentsPart = doc.MainDocumentPart.WordprocessingCommentsPart; if (commentsPart?.Comments != null) foreach (Comment comment in commentsPart.Comments.Elements()) diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Search and replace text.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Search and replace text.cs index 81745114b..f59c92a3e 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Search and replace text.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/OpenXML features/Search and replace text.cs @@ -1,4 +1,9 @@ -// Copyright (c) Aspose 2002-2021. All Rights Reserved. +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// using System.IO; using System.Text.RegularExpressions; @@ -13,24 +18,19 @@ public class SearchAndReplaceText : TestUtil [Test] public static void SearchAndReplaceTextFeature() { - using (WordprocessingDocument wordDoc = - WordprocessingDocument.Open(MyDir + "Search and replace text.docx", true)) - { - string docText; + File.Copy(MyDir + "Search and replace text.docx", ArtifactsDir + "Search and replace text - OpenXML.docx", true); - using (StreamReader sr = new StreamReader(wordDoc.MainDocumentPart.GetStream())) - { + using (WordprocessingDocument doc = WordprocessingDocument.Open(ArtifactsDir + "Search and replace text - OpenXML.docx", true)) + { + string? docText = null; + using (StreamReader sr = new StreamReader(doc.MainDocumentPart.GetStream())) docText = sr.ReadToEnd(); - } - Regex regexText = new Regex("Hello world!"); + Regex regexText = new Regex("Hello World!"); docText = regexText.Replace(docText, "Hi Everyone!"); - using (StreamWriter sw = - new StreamWriter(File.Create(ArtifactsDir + "Search and replace text - OpenXML.docx"))) - { + using (StreamWriter sw = new StreamWriter(doc.MainDocumentPart.GetStream(FileMode.Create))) sw.Write(docText); - } } } } diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/Properties/AssemblyInfo.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/Properties/AssemblyInfo.cs index 9a764581a..644febc4d 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/Properties/AssemblyInfo.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/Properties/AssemblyInfo.cs @@ -1,16 +1,6 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Aspose Words")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Aspose Words")] -[assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -21,16 +11,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("5181d152-e178-4066-b8fc-a5e42b67c35a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/TestUtil.cs b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/TestUtil.cs index 56786e629..bc140076f 100644 --- a/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/TestUtil.cs +++ b/Plugins/Aspose.Words Vs OpenXML Words/Aspose.Words VS OpenXML/AsposeWords/TestUtil.cs @@ -1,7 +1,17 @@ -using System; +// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. +// +// This file is part of Aspose.Words. The source code in this file +// is only intended as a supplement to the documentation, and is provided +// "as is", without warranty of any kind, either expressed or implied. +////////////////////////////////////////////////////////////////////////// + +using System; using System.Globalization; using System.IO; +using System.Linq; +using System.Net; using System.Reflection; +using System.Runtime.InteropServices; using System.Threading; using NUnit.Framework; @@ -9,25 +19,28 @@ namespace AsposeWordsVSOpenXML { public class TestUtil { - static TestUtil() - { - MainDataDir = GetCodeBaseDir(Assembly.GetExecutingAssembly()); - MyDir = new Uri(new Uri(MainDataDir), @"Data/").LocalPath; - ArtifactsDir = new Uri(new Uri(MainDataDir), @"Data/Artifacts/").LocalPath; - } - [OneTimeSetUp] - public static void OneTimeSetUp() + public void OneTimeSetUp() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; + if (!Directory.Exists(ArtifactsDir)) Directory.CreateDirectory(ArtifactsDir); } + [SetUp] + public void SetUp() + { + Console.WriteLine($"Clr: {RuntimeInformation.FrameworkDescription}\n"); + } + [OneTimeTearDown] - public static void OneTimeTearDown() + public void OneTimeTearDown() { + ServicePointManager.ServerCertificateValidationCallback = delegate { return false; }; + if (Directory.Exists(ArtifactsDir)) Directory.Delete(ArtifactsDir, true); } @@ -37,26 +50,49 @@ public static void OneTimeTearDown() /// internal static string GetCodeBaseDir(Assembly assembly) { - Uri uri = new Uri(assembly.CodeBase); + // CodeBase is a full URI, such as file:///x:\blahblah. + Uri uri = new Uri(assembly.Location); string mainFolder = Path.GetDirectoryName(uri.LocalPath) ?.Substring(0, uri.LocalPath.IndexOf("Aspose.Words VS OpenXML", StringComparison.Ordinal)); - return mainFolder; } /// - /// Gets the path to the codebase directory. + /// Returns the assembly directory correctly even if the assembly is shadow-copied. /// - internal static string MainDataDir { get; } + internal static string GetAssemblyDir(Assembly assembly) + { + // CodeBase is a full URI, such as file:///x:\blahblah. + Uri uri = new Uri(assembly.Location); + return Path.GetDirectoryName(uri.LocalPath) + Path.DirectorySeparatorChar; + } /// - /// Gets the path to the documents used by the code examples. + /// Gets the path to the currently running executable. /// - internal static string MyDir { get; } + internal static string AssemblyDir { get; } /// - /// Gets the path to the artifacts used by the code examples. + /// Gets the path to the codebase directory. + /// + internal static string CodeBaseDir { get; } + + /// + /// Gets the path to the documents used by the code examples. Ends with a back slash. /// internal static string ArtifactsDir { get; } + + /// + /// Gets the path to the documents used by the code examples. Ends with a back slash. + /// + internal static string MyDir { get; } + + static TestUtil() + { + AssemblyDir = GetAssemblyDir(Assembly.GetExecutingAssembly()); + CodeBaseDir = GetCodeBaseDir(Assembly.GetExecutingAssembly()); + ArtifactsDir = new Uri(new Uri(CodeBaseDir), @"Data/Artifacts/").LocalPath; + MyDir = new Uri(new Uri(CodeBaseDir), @"Data/").LocalPath; + } } } \ No newline at end of file diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Data/Bookmark.docx b/Plugins/Aspose.Words Vs OpenXML Words/Data/Bookmark.docx new file mode 100644 index 0000000000000000000000000000000000000000..c5ad04015480491684fd8d6e953ea8262af218f9 GIT binary patch literal 14336 zcmeHuWmH^Aw|3(i+$Fd>1h?Ss?(R-QkRVBLcb5c$dvJFN?(Xhx!N1PTymw|Yv+i2o z@B1FsDY~ob*;S`{O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0GCf|u+w(0Z8LhJNlDC>xjst52b7?-8Hf@UJ- znodiPBFwZR2U=zhZu5UU?9W!+XowW1mT-M}gUa`A!YrE7UFUvaMgIwK(zw}r&d%Ac zYcwGPXfmbc(y6?A1uS*=%3f&DRYV_Nk;%N*Ecans+blOSgs5ouUgKK%sXX)3!Dk1b8Q+7|Y2fvg&)Tx22#X_C+HLGaLCuwSrF`2Ww&${>2OMt5MfW|ubb|CuhBR^ zFxIRO${Bzd`Jb9R;POM9GpMBxq|H(O%Hl?jjz9JIe>oh)-k>X8c~Bmdq~1(+j;wSt zMMJAtR7$7n&vh1yw@_u~fQHalYwNeST4f~-yAi0sTeUJiv`}$xD|hpe#M&b1&P90( zS9?Fc_L|j~;dErj11qjV8ppyZ<& zCjp^U5>jMXSIsJ?%_=%WGFZ+P zd3*w)}1^$mp$r`mj|V$mH;t5ma2TqFNM~MIE1eRiN8fxqT~{|Oxc zWf=Y=EBsgZ-_u(E1Oos(piT7umgM>?rC*a8|D+WNN>TsU6vtml{F)K+Cy8+M|AeIe z;!6Dr|9gn^PcQ(`hy(byfa$LU{vJd8D}e>vUkUsfQT&z4uc5R*>EPo3=PCXtu=XqX zR~Pb6us-!4;9nfdUn%_R1pP^2h2{?me{+d`#s7VG`6n6x=%EJy{;}8m75;b2{a1Ja s(_i3!*zsS{f7hpfMJuxY^%wXz?W!mP1>$%B015OL4-y*nH$T7qKZwlp-2eap literal 0 HcmV?d00001 diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Data/Comments.docx b/Plugins/Aspose.Words Vs OpenXML Words/Data/Comments.docx index a43cb56993f762daa1578a53aafc0924bff2ccb5..5ba7d4b51cdc7c549ae1083c876557ff903cb7e1 100644 GIT binary patch literal 25134 zcmeF3bxdFR^&KSkde&K#Pj z1+Yw>nnrq)h$_DLKFRx2*4wpW#D$I}v>r^eY4+1>D(c$MKu1}<8iWFuR;>oF38wl< zQuA5Bo98>{^I&~gKcxZ(H0Zj3G5iEPTjX(8XsSX>H0V0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hIvKo@O$wHxtX2bV8fK&D= zNqxD_>E-BZ>j~NfX zw1T4E5%Qt#N2ZgGBBs0IYiO%c?$-Rqy?3!A7xH~X!(j808TAu|DpWLLXZW&g)7-Et zCLtP{->2s}fd~^U9})Mqp2UlXsaL|re-8Mmbxaag1Ni^|@&WhHt?!>1O5*OoR}xIk zOn-V63zPJKP70v^KJ}Ym-1_?uVGd$UBhHZvE51VXYJeljWw57n4HPj8W1*^Cq62Qb ziIwcf?QWK0Vi}blvdw6{O_UgMkw*q#U?ryj*S=nuPdI&(985C5ht$_6JyjpYxCduT zq6#VIt35#qnj|s1LbYsOfrt@L#}&Z zoy;WWk@}D~t&6b$9|HOvuUj?IC@fc4$j5YThHCGOJGCom&`h#mVrt&o&s^=)4y3Gw zK9y5b@XbE2__TmoNbhY7d@x74nrVkyxsSrBze)!hiUEhkN@iKS7+ggn3`Cjq#a${x!D F{XZ`sd~*N* diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Data/Convert from docm to docx.docm b/Plugins/Aspose.Words Vs OpenXML Words/Data/Docm to Docx conversion.docm similarity index 100% rename from Plugins/Aspose.Words Vs OpenXML Words/Data/Convert from docm to docx.docm rename to Plugins/Aspose.Words Vs OpenXML Words/Data/Docm to Docx conversion.docm diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Data/Document.docx b/Plugins/Aspose.Words Vs OpenXML Words/Data/Document.docx index fe1ec51b9636b32f2860229fdd77765c80d3258f..d17a230d1ca2ed0c9cc1befccb377d0dd74b7f53 100644 GIT binary patch literal 18105 zcmeHv^;;ZS)Ar!*?(XgoJh;2NySrO(cMt9ahd_e6ySoIE;GW>$B)iX(-R!>aKk&Wt z!(20c`mXLiSJhor=Tx<#3>Y{%01^NV002k;7B19G=^y|AH4FfN27m_D5pl40HM4g$ zQ1x;&bJ1h;w6i5H1P7(g2Y>?4|G&@w$1~8MHfG(&j4bvo^f_dvWm#I8x}<-kFy0K$ z@*X6LJxnW%lx#BjWsQ7&n*#3#!-OnmHA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^V zKq&M<@S6fFU=?X!P}s%FMsM;_yLPw1S9Z>Un?mK}wWz_0n@KY-uwC7{s5Pub(Y1Ak4V{TVm_GEx7pwA!C3{aYI4-?T76iIx9I zs{9%LJs9$P>e=6LB9M>&5BTqiXup&AJ#POu339X_;enr4(cj^}2Ic++0|22|fS-ah ze{%EJ5Z&*zehuyXOe-4aXIj4odVZ(!dxYa}IwQD0CiI_p$M4`@&kTP<0f1(50N@`d zh~MGA?&N-k8&dr~gFp6lzZ3XnZ@5J{AvLH h#sdIHbU$(6FLR(E{Tw9m001KBlK@hhWXA7L{|EA9ncDyW diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Data/Remove page breaks.docx b/Plugins/Aspose.Words Vs OpenXML Words/Data/Remove page breaks.docx index c79e98cb02ff74e2949a2173f10a80e8f234078a..d0670c258e2344a19acaa1e4239efdc3a0a6ec3a 100644 GIT binary patch delta 895 zcmV-_1AzRYV4`5K_XrACT08p~0{{Sf3X=f|7k{NzU2~!^6#XjcIXO4chsUqFvQ}6~!sx{I?p@o$G-Vl~ z#l&8!{BCSpQX!h5icvhVH(1(_(}#7Gv25nxS|-pMk~Lu9q$LsxfAtvN z)gYns%NZX7`9A;xg}!$PRUfYsLGA9*L8vu2O9Sj3+ z1dUpVyDb@=5;bJnTbCg&soSK)t+S@0BY$uO92k`);ahv^pQ1sq>_ArMM6Bw{-nNz( z+}2xh<4X^C3H{d0x@wr8NA%na9MKTlj7uo&*X)?oh|s?9kCtX2T#oQl3J8G;lAK;(sUJ)5~adASHk~*Zmc?3&s}u#QjuoR0AwUHE{a- z%AQfW&~=Dj61$Pxy`0eOAY$ZJNU9G^Gc0iSjtcxNFj_S6?-W;r;#*X2BRi_Y_}NX| zaCF8%LwBz2Q5&uq0b8TwED1MBf>R{6{k214_~gd3aNvDIqFI$2L=FdoFn>;F?moUd z8jf8*7&Kif7|RpUtCSp9l`+~rY~O>%J)H`+?-Ytd@nr# VwUfFpJ^^5p`7a^{ODzBZ001Ptq!$1H delta 894 zcmV-^1A+XaV4+~J_XrBy1{C}k0{{S63zGo}7k}MW+iv185dD=X?`X~2w%o?&Wz94=JDyfu8bw-qNHSOI`_6|V3N?Z zB>C7}$n0)p8bTtHqKXncHrH5~Pm{-0n9^iXVEi84&Um{DFM2}7P+HRAIHy8~o~WH~FVQmz5i9(FJk zwBaOdA?`N8D3`DarfoV8ehzQr61B=|Mt_Ur3Syu{6eZipQ(ub)#-amR{*=VBuFOqo zIo@rx6*ao_faiqYidk1pgcNA?$K?k<_RpJ@Hjrv$eU7e;IBBz zG6=tgu*ACVkH(7Sx2gQb>4NoW7mnGO%%XS5e+k*Kj5QC#!C*gZeD1S$@ z3L*mS4Uo^!3K;5?nCfDl(R8g^W~@TE*3-|i2@&~0>`u*YD#96BR8m={(IALk!Qyx! zLma)QYBq{p&mA?haD7QN8?+zI!alfa1Wx1!KfI0 zc9GRSW^cSq6?#eVM=28sbTDkpR+pykwu$Q>Ir&|b!hkPQCaD)R<`Y|@pUaM)aV#)j zVsm2bxGR95e&HC+8~dq@)kfcv^~SQ5wI99MvF!&x)Gcon zJw|26v3HDWb9lC>hR=31^#{%gs-D&>SyLX%=&Re%1_j zS1?>vTFz~4bdm0r=W$mMcOA#^gmSvzm3)SKRKUYKp-u3=y%U-%*XsWiPyPY3FbwY@ z3fu-1{1*cN09Xr?DK1X|FOzvLLIE|Cye>WgpOgD8KLWuSlinE?lTt4#0Sl9TFFgUY Ule;fI0bi5)FCqp?EdT%j0QIw_!vFvP diff --git a/Plugins/Aspose.Words Vs OpenXML Words/Data/Remove section breaks.docx b/Plugins/Aspose.Words Vs OpenXML Words/Data/Remove section breaks.docx index d0670c258e2344a19acaa1e4239efdc3a0a6ec3a..76b4396911e43a8a1f4938ffc0e683f703c81771 100644 GIT binary patch delta 7860 zcmZWu1ymi&vOT!FTX1(jxO;GS3+^rf4uRl$IJgFadvNzaAh^4`O9Fu)pWOTYzwf`- zv$|GKb?xfCW@c4Qbr+c3TGjT#Bd^3O($>KM0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&OEbH47THOr2v!;19um0C7!1(ulSYH@7tc?26 zc-(vBaa)JQP-3t2FAirq!2ITi_b^F%&cy=e{i9w}2r9qCE_4#UcH>^XN0)hFJ8>ed zmAsP~%~rGp#VLh{#hawQ%S&lj#C&R<*w`bI8CW(76Y4i1|36W6Wv60WaJ^_1^V=Y1gffJLF6BCm>E)bK-EgAvNljSWx0?`?h;TaZ_JT58$8 Date: Mon, 24 Feb 2025 18:35:13 +0700 Subject: [PATCH 61/61] updated examples --- .../ApiExamples/ExHtmlSaveOptions.cs | 42 ++++++++------- Examples/ApiExamples/ApiExamples/ExLists.cs | 8 +-- .../ApiExamples/ExTxtSaveOptions.cs | 53 ++++++++++--------- .../ApiExamples/ExWordML2003SaveOptions.cs | 22 ++++---- 4 files changed, 66 insertions(+), 59 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs index 2bca80b0f..fb4f9f62e 100644 --- a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs @@ -819,11 +819,12 @@ public void ExportXhtmlTransitional(bool showDoctypeDeclaration) // Our document will only contain a DOCTYPE declaration heading if we have set the "ExportXhtmlTransitional" flag to "true". string outDocContents = File.ReadAllText(ArtifactsDir + "HtmlSaveOptions.ExportXhtmlTransitional.html"); + string newLine = Environment.NewLine; if (showDoctypeDeclaration) Assert.True(outDocContents.Contains( - "\r\n" + - "\r\n" + + $"{newLine}" + + $"{newLine}" + "")); else Assert.True(outDocContents.Contains("")); @@ -1850,27 +1851,28 @@ public void PrettyFormat(bool usePrettyFormat) // Enabling pretty format makes the raw html code more readable by adding tab stop and new line characters. string html = File.ReadAllText(ArtifactsDir + "HtmlSaveOptions.PrettyFormat.html"); + string newLine = Environment.NewLine; if (usePrettyFormat) Assert.AreEqual( - "\r\n" + - "\t\r\n" + - "\t\t\r\n" + - "\t\t\r\n" + - $"\t\t\r\n" + - "\t\t\r\n" + - "\t\t\r\n" + - "\t\r\n" + - "\t\r\n" + - "\t\t

\r\n" + - "\t\r\n", + $"{newLine}" + + $"\t{newLine}" + + $"\t\t{newLine}" + + $"\t\t{newLine}" + + $"\t\t{newLine}" + + $"\t\t{newLine}" + + $"\t\t{newLine}" + + $"\t{newLine}" + + $"\t{newLine}" + + $"\t\t
{newLine}" + + $"\t\t\t

{newLine}" + + $"\t\t\t\tHello world!{newLine}" + + $"\t\t\t

{newLine}" + + $"\t\t\t

{newLine}" + + $"\t\t\t\t {newLine}" + + $"\t\t\t

{newLine}" + + $"\t\t
{newLine}" + + $"\t{newLine}", html); else Assert.AreEqual( diff --git a/Examples/ApiExamples/ApiExamples/ExLists.cs b/Examples/ApiExamples/ApiExamples/ExLists.cs index 64a55c938..ad487d3e1 100644 --- a/Examples/ApiExamples/ApiExamples/ExLists.cs +++ b/Examples/ApiExamples/ApiExamples/ExLists.cs @@ -573,11 +573,11 @@ public void ApplyExistingListToParagraphs() Assert.AreEqual(0, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); doc.Lists.Add(ListTemplate.NumberDefault); - List list = doc.Lists[0]; + List docList = doc.Lists[0]; foreach (Paragraph paragraph in paras.OfType()) { - paragraph.ListFormat.List = list; + paragraph.ListFormat.List = docList; paragraph.ListFormat.ListLevelNumber = 2; } @@ -608,11 +608,11 @@ public void ApplyNewListToParagraphs() Assert.AreEqual(0, paras.Count(n => ((Paragraph)n).ListFormat.IsListItem)); - List list = doc.Lists.Add(ListTemplate.NumberUppercaseLetterDot); + List docList = doc.Lists.Add(ListTemplate.NumberUppercaseLetterDot); foreach (Paragraph paragraph in paras.OfType()) { - paragraph.ListFormat.List = list; + paragraph.ListFormat.List = docList; paragraph.ListFormat.ListLevelNumber = 1; } diff --git a/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs index 836d09ce6..04946cbdd 100644 --- a/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExTxtSaveOptions.cs @@ -144,28 +144,29 @@ public void ExportHeadersFooters(TxtExportHeadersFootersMode txtExportHeadersFoo string docText = File.ReadAllText(ArtifactsDir + "TxtSaveOptions.ExportHeadersFooters.txt"); + string newLine = Environment.NewLine; switch (txtExportHeadersFootersMode) { case TxtExportHeadersFootersMode.AllAtEnd: - Assert.AreEqual("Page 1\r\n" + - "Page 2\r\n" + - "Page 3\r\n" + - "Even header\r\n\r\n" + - "Primary header\r\n\r\n" + - "Even footer\r\n\r\n" + - "Primary footer\r\n\r\n", docText); + Assert.AreEqual($"Page 1{newLine}" + + $"Page 2{newLine}" + + $"Page 3{newLine}" + + $"Even header{newLine}{newLine}" + + $"Primary header{newLine}{newLine}" + + $"Even footer{newLine}{newLine}" + + $"Primary footer{newLine}{newLine}", docText); break; case TxtExportHeadersFootersMode.PrimaryOnly: - Assert.AreEqual("Primary header\r\n" + - "Page 1\r\n" + - "Page 2\r\n" + - "Page 3\r\n" + - "Primary footer\r\n", docText); + Assert.AreEqual($"Primary header{newLine}" + + $"Page 1{newLine}" + + $"Page 2{newLine}" + + $"Page 3{newLine}" + + $"Primary footer{newLine}", docText); break; case TxtExportHeadersFootersMode.None: - Assert.AreEqual("Page 1\r\n" + - "Page 2\r\n" + - "Page 3\r\n", docText); + Assert.AreEqual($"Page 1{newLine}" + + $"Page 2{newLine}" + + $"Page 3{newLine}", docText); break; } //ExEnd @@ -249,18 +250,20 @@ public void SimplifyListLabels(bool simplifyListLabels) string docText = File.ReadAllText(ArtifactsDir + "TxtSaveOptions.SimplifyListLabels.txt"); + string newLine = Environment.NewLine; + if (simplifyListLabels) - Assert.AreEqual("* Item 1\r\n" + - " > Item 2\r\n" + - " + Item 3\r\n" + - " - Item 4\r\n" + - " o Item 5\r\n", docText); + Assert.AreEqual($"* Item 1{newLine}" + + $" > Item 2{newLine}" + + $" + Item 3{newLine}" + + $" - Item 4{newLine}" + + $" o Item 5{newLine}", docText); else - Assert.AreEqual("· Item 1\r\n" + - "o Item 2\r\n" + - "§ Item 3\r\n" + - "· Item 4\r\n" + - "o Item 5\r\n", docText); + Assert.AreEqual($"· Item 1{newLine}" + + $"o Item 2{newLine}" + + $"§ Item 3{newLine}" + + $"· Item 4{newLine}" + + $"o Item 5{newLine}", docText); //ExEnd } diff --git a/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs index 2599e781a..a1b4c0437 100644 --- a/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExWordML2003SaveOptions.cs @@ -5,6 +5,7 @@ // "as is", without warranty of any kind, either expressed or implied. ////////////////////////////////////////////////////////////////////////// +using System; using System.IO; using Aspose.Words; using Aspose.Words.Saving; @@ -41,19 +42,20 @@ public void PrettyFormat(bool prettyFormat) doc.Save(ArtifactsDir + "WordML2003SaveOptions.PrettyFormat.xml", options); string fileContents = File.ReadAllText(ArtifactsDir + "WordML2003SaveOptions.PrettyFormat.xml"); + string newLine = Environment.NewLine; if (prettyFormat) Assert.True(fileContents.Contains( - "\r\n\t\t" + - "1\r\n\t\t" + - "0\r\n\t\t" + - "1\r\n\t\t" + - "0\r\n\t\t" + - "0\r\n\t\t" + - "1\r\n\t\t" + - "1\r\n\t\t" + - "0\r\n\t\t" + - "11.5606\r\n\t" + + $"{newLine}\t\t" + + $"1{newLine}\t\t" + + $"0{newLine}\t\t" + + $"1{newLine}\t\t" + + $"0{newLine}\t\t" + + $"0{newLine}\t\t" + + $"1{newLine}\t\t" + + $"1{newLine}\t\t" + + $"0{newLine}\t\t" + + $"11.5606{newLine}\t" + "")); else Assert.True(fileContents.Contains(