Aspose.Words for .NET 24.7 (DLLs-only) provides the essential libraries that you can integrate directly into your multi-platform .NET development projects. This release introduces functionalities that enhance accessibility, ActiveX control management, and export capabilities.
Easily Accessible PDF Documents
This C# Word document processing API version helps developers generate PDF/UA-2 compliance documents and ascertain convenient access for all types of users.
Upgraded XLSX Export
Equip your cross-platform .NET word-processing applications with advanced XLSX export functionalities, including the ability to automatically detect datetime formats for effortless data export. Check out the following code example, highlighting the datetime parsing mode in C#.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "Xlsx DateTime.docx");
XlsxSaveOptions saveOptions = new XlsxSaveOptions();
// Specify using datetime format autodetection.
saveOptions.DateTimeParsingMode = XlsxDateTimeParsingMode.Auto;
doc.Save(ArtifactsDir + "XlsxSaveOptions.DateTimeParsingMode.xlsx", saveOptions);
Source*
ActiveX Control Management
Aspose.Words for .NET now allows users to edit ActiveX control properties like foreground color, background color, and size within their documents. This C# code sample showcases the feature usage.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "ActiveX controls.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Forms2OleControl oleControl = (Forms2OleControl)shape.OleFormat.OleControl;
oleControl.ForeColor = Color.FromArgb(0x17, 0xE1, 0x35);
oleControl.BackColor = Color.FromArgb(0x33, 0x97, 0xF4);
oleControl.Height = 100.54;
oleControl.Width = 201.06;
Source*
You can set the selected state of ActiveX radio buttons and checkbox controls programmatically in your .NET applications on Windows, Linux, or macOS. The C# code examples shared below showcase the feature usage for radio buttons and checkboxes, respectively.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "Radio buttons.docx");
Shape shape1 = (Shape)doc.GetChild(NodeType.Shape, 0, true);
OptionButtonControl optionButton1 = (OptionButtonControl)shape1.OleFormat.OleControl;
// Deselect selected first item.
optionButton1.Selected = false;
Shape shape2 = (Shape)doc.GetChild(NodeType.Shape, 1, true);
OptionButtonControl optionButton2 = (OptionButtonControl)shape2.OleFormat.OleControl;
// Select second option button.
optionButton2.Selected = true;
doc.Save(ArtifactsDir + "Shape.SelectRadioControl.docx");
Source*
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "ActiveX controls.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
CheckBoxControl checkBoxControl = (CheckBoxControl)shape.OleFormat.OleControl;
checkBoxControl.Checked = true;
Source*
Markdown Export Links Control
Are you looking to manipulate how links are exported in your .NET documents? Aspose.Words for .NET 24.7 lets you choose exporting links as inline or reference using the LinkExportMode
property in MarkdownSaveOptions
, as shown in the C# code snippet below.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertShape(ShapeType.Balloon, 100, 100);
// Image will be written as reference:
// ![ref1]
//
// [ref1]: aw_ref.001.png
MarkdownSaveOptions saveOptions = new MarkdownSaveOptions();
saveOptions.LinkExportMode = MarkdownLinkExportMode.Reference;
doc.Save(ArtifactsDir + "MarkdownSaveOptions.LinkExportMode.Reference.md", saveOptions);
// Image will be written as inline:
// ![](aw_inline.001.png)
saveOptions.LinkExportMode = MarkdownLinkExportMode.Inline;
doc.Save(ArtifactsDir + "MarkdownSaveOptions.LinkExportMode.Inline.md", saveOptions);
Source*
Optimized Chart Presentation
Modify the orientation and rotation of chart data labels for a more personalized look with the latest .NET Word documents API release. The following code sample demonstrates how to use this feature in your C# document processing applications, running on your favorite platform.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
ChartSeries series = shape.Chart.Series[0];
ChartDataLabelCollection dataLabels = series.DataLabels;
// Show data labels.
series.HasDataLabels = true;
dataLabels.ShowValue = true;
dataLabels.ShowCategoryName = true;
// Define data label shape.
dataLabels.Format.ShapeType = ChartShapeType.UpArrow;
dataLabels.Format.Stroke.Fill.Solid(Color.DarkBlue);
// Set data label orientation and rotation for the entire series.
dataLabels.Orientation = ShapeTextOrientation.VerticalFarEast;
dataLabels.Rotation = -45;
// Change orientation and rotation of the first data label.
dataLabels[0].Orientation = ShapeTextOrientation.Horizontal;
dataLabels[0].Rotation = 45;
doc.Save(ArtifactsDir + "Charts.LabelOrientationRotation.docx");
Source*
Create Custom List Numbering Styles
Boost your word-processing applications with the capability to set a custom number style format for different list levels and delegate finer control over list appearance. Here is how you can use this feature in C#.
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git.
Document doc = new Document(MyDir + "List with leading zero.docx");
doc.UpdateListLabels();
ParagraphCollection paras = doc.FirstSection.Body.Paragraphs;
Assert.AreEqual("001.", paras[0].ListLabel.LabelString);
Assert.AreEqual("0001.", paras[1].ListLabel.LabelString);
Assert.AreEqual("0002.", paras[2].ListLabel.LabelString);
paras[1].ListFormat.ListLevel.CustomNumberStyleFormat = "001, 002, 003, ...";
doc.UpdateListLabels();
Assert.AreEqual("001.", paras[0].ListLabel.LabelString);
Assert.AreEqual("001.", paras[1].ListLabel.LabelString);
Assert.AreEqual("002.", paras[2].ListLabel.LabelString);
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.7 Release Notes.