Render Shapes to SVG
New public methods have been added to the NodeRendererBase
class, allowing developers to set the SvgSaveOptions
.
Export the shape to SVG and save it to a file or a stream using the Aspose.Words for .NET API.
The below-given sample C# code showcases how to apply SvgSaveOptions
and render it to an SVG file.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "Office math.docx");
OfficeMath math = (OfficeMath)doc.GetChild(NodeType.OfficeMath, 0, true);
SvgSaveOptions options = new SvgSaveOptions();
options.TextOutputMode = SvgTextOutputMode.UsePlacedGlyphs;
math.GetMathRenderer().Save(ArtifactsDir + "SvgSaveOptions.Output.svg", options);
Source*
Refined Style Management
This release includes new public properties Priority
, UnhideWhenUsed
, and SemiHidden
added to the Style
class.
Developers can use these properties to manage styles within their .NET document processing apps.
Please check out the following C# code example to learn how to use these properties:
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document();
Style styleTitle = doc.Styles[StyleIdentifier.Subtitle];
if (styleTitle.Priority == 9)
styleTitle.Priority = 10;
if (!styleTitle.UnhideWhenUsed)
styleTitle.UnhideWhenUsed = true;
if (styleTitle.SemiHidden)
styleTitle.SemiHidden = true;
doc.Save(ArtifactsDir + "Styles.StylePriority.docx");
Source*
Extract Text From Footnotes and Endnotes
- A new public property
ActualReferenceMark
is added to the Footnote
class. - Added a new public method
UpdateActualReferenceMarks
to the Document
class.
Effortlessly extract the reference mark text from the footnotes and endnotes in your .NET Word documents.
The following C# coding sample illustrates the process of getting the actual reference mark text using the .NET API:
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "Footnotes and endnotes.docx");
Footnote footnote = (Footnote)doc.GetChild(NodeType.Footnote, 1, true);
doc.UpdateFields();
doc.UpdateActualReferenceMarks();
Assert.AreEqual("1", footnote.ActualReferenceMark);
Source*
Load Markdown Files with Empty Lines Preserved
- The newly added
MarkdownLoadOptions
class enables setting additional load options while loading Markdown (MD) files. - Another new addition is the
PreserveEmptyLines
boolean property.
Preserving the empty lines during the Markdown file loading process ensures fidelity and maintains the layout and structure of the files.
The below-given code example demonstrates the MarkdownLoadOptions
class and PreserveEmptyLines
property usage in C# apps:
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
string mdText = $"{Environment.NewLine}Line1{Environment.NewLine}{Environment.NewLine}Line2{Environment.NewLine}{Environment.NewLine}";
using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(mdText)))
{
MarkdownLoadOptions loadOptions = new MarkdownLoadOptions() { PreserveEmptyLines = true };
Document doc = new Document(stream, loadOptions);
Assert.AreEqual("\rLine1\r\rLine2\r\f", doc.GetText());
}
Source*
Broader Word 2016 Chart Type Support
This release brings extended chart-type support for the LINQ reporting engine. Developers looking to enhance the reporting capabilities of their document processing apps can integrate Word 2016 chart types such as Treemap, Sunburst, Histogram, Box & Whisker, Waterfall, Funnel, and Stock.
Please refer to the following C# example code to learn how to use these chart types with the .NET Word processing API:
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "Reporting engine template - Word 2016 Charts.docx");
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, new object[] { Common.GetShares(), Common.GetShareQuotes() },
new string[] { "shares", "quotes" });
doc.Save(ArtifactsDir + "ReportingEngine.Word2016Charts.docx");
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.Words for .NET 24.2 Release Notes.