没有找到合适的产品?
联系客服协助选型:023-68661681
提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
原创|产品更新|编辑:李显亮|2020-03-04 10:59:57.010|阅读 304 次
概述:令人兴奋的是,在3月开初,.NET版Aspose.Words迎来了2020第三次更新!新增了如下四大新功能亮点,本文将为你用示例解析这些新功能。
# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>
Aspose.Words for .Net是一种高级Word文档处理API,用于执行各种文档管理和操作任务。API支持生成,修改,转换,呈现和打印文档,而无需在跨平台应用程序中直接使用Microsoft Word。
令人兴奋的是,在3月开初,.NET版Aspose.Words迎来了2020第三次更新!新增了如下四大新功能亮点:
>>你可以点击这里下载Aspose.Words for .NET v20.3测试体验
key | 概述 | 类别 |
---|---|---|
WORDSNET-18362 | LINQ Reporting Engine-提供选项以使图像适合文本框范围,同时保持比例 | 新功能 |
WORDSNET-19568 | 提供在IFieldMergingCallback.ImageFieldMerging内设置Shape的不同属性的功能 | 新功能 |
WORDSNET-19912 | FindReplaceOptions的新属性 | 新功能 |
WORDSNET-20012 | 实现侧面的颜色更改 | 新功能 |
WORDSNET-3297 | 考虑添加通过书签获取表列的功能 | 新功能 |
WORDSNET-19935 | 为体积形状实现正确的轮廓渲染 | 新功能 |
WORDSNET-19469 | 从DOCX转换为PDF的图表中的轴,数据和图例标签丢失/错误/以不同的颜色显示 | 增强功能 |
WORDSNET-19815 | 请勿将ODT图表转换为形状 | 增强功能 |
WORDSNET-19998 | 为非凸形状实现正确的轮廓渲染 | 增强功能 |
/// <summary>/// Gets or sets a value determining whether the BuiltInDocumentProperties.LastPrinted property is updated before saving./// </summary>publicboolUpdateLastPrintedProperty
用例
Document doc = new Document(docPath); SaveOptions saveOptions = new PdfSaveOptions(); saveOptions.UpdateLastPrintedProperty = false; doc.Save(pdfPath, saveOptions);
客户要求在合并图像合并字段(尤其是WrapType)时控制各种图像属性 。当前,只能 分别使用ImageFieldMergingArgs.ImageWidth 和 ImageFieldMergingArgs.ImageHeight属性设置图像的宽度或高度 。Aspose选择了一种更为通用的方法,并决定对插入的图像(或任何其他形状)提供完全控制。 ImageFieldMergingArgs.Shape 属性如下:
/// <summary>/// Specifies the shape that the mail merge engine must insert into the document./// </summary>/// <remarks>/// <p>When this property is specified, the mail merge engine ignores all other properties like <see cref="ImageFileName"/> or <see cref="ImageStream"/>/// and simply inserts the shape into the document.</p>/// <p>Use this property to fully control the process of merging an image merge field./// For example, you can specify <see cref="ShapeBase.WrapType"/> or any other shape property to fine tune the resulting node. However, please note that/// you are responsible for providing the content of the shape.</p>/// </remarks>publicShape Shape {get;set; }
如摘要所示,此属性将覆盖其他属性,例如 ImageFileName 或 ImageStream ,即用户只需指定要插入的形状并设置所有必要的属性即可:
private class TestShapeSetFieldMergingCallback : IFieldMergingCallback { void IFieldMergingCallback.FieldMerging(FieldMergingArgs args) { // Implementation is not required. } void IFieldMergingCallback.ImageFieldMerging(ImageFieldMergingArgs args) { Shape shape = new Shape(args.Document); shape.Width = 1000; shape.Height = 2000; shape.WrapType = WrapType.Square; string imageFileName = "image.png"; shape.ImageData.SetImage(imageFileName); args.Shape = shape; } }
////// Gets or sets a boolean value indicating either to ignore text inside delete revisions./// The default value isfalse.///publicboolIgnoreDeleted
////// Gets or sets a boolean value indicating either to ignore text inside insert revisions./// The default value isfalse.///publicboolIgnoreInserted
////// Gets or sets a boolean value indicating either to ignore text inside fields./// The default value isfalse.///publicboolIgnoreFields
用例1:说明如何忽略删除修订中的文本
// Create new document. Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Insert non-revised text. builder.Writeln("Deleted"); builder.Write("Text"); // Remove first paragraph with tracking revisions. doc.StartTrackRevisions("author", DateTime.Now); doc.FirstSection.Body.FirstParagraph.Remove(); doc.StopTrackRevisions(); Regex regex = new Regex("e"); FindReplaceOptions options = new FindReplaceOptions(); // Replace 'e' in document ignoring deleted text. options.IgnoreDeleted = true; doc.Range.Replace(regex, "*", options); Console.WriteLine(doc.GetText()); // The output is: Deleted\rT*xt\f // Replace 'e' in document NOT ignoring deleted text. options.IgnoreDeleted = false; doc.Range.Replace(regex, "*", options); Console.WriteLine(doc.GetText()); // The output is: D*l*t*d\rT*xt\f
用例2:说明如何忽略插入修订中的文本
// Create new document. Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Insert text with tracking revisions. doc.StartTrackRevisions("author", DateTime.Now); builder.Writeln("Inserted"); doc.StopTrackRevisions(); // Insert non-revised text. builder.Write("Text"); Regex regex = new Regex("e"); FindReplaceOptions options = new FindReplaceOptions(); // Replace 'e' in document ignoring inserted text. options.IgnoreInserted = true; doc.Range.Replace(regex, "*", options); Console.WriteLine(doc.GetText()); // The output is: Inserted\rT*xt\f // Replace 'e' in document NOT ignoring inserted text. options.IgnoreInserted = false; doc.Range.Replace(regex, "*", options); Console.WriteLine(doc.GetText()); // The output is: Ins*rt*d\rT*xt\f
用例3:说明如何忽略字段内的文本
// Create document. Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Insert field with text inside. builder.InsertField("INCLUDETEXT", "Text in field"); Regex regex = new Regex("e"); FindReplaceOptions options = new FindReplaceOptions(); // Replace 'e' in document ignoring text inside field. options.IgnoreFields = true; doc.Range.Replace(regex, "*", options); Console.WriteLine(doc.GetText()); // The output is: \u0013INCLUDETEXT\u0014Text in field\u0015\f // Replace 'e' in document NOT ignoring text inside field. options.IgnoreFields = false; doc.Range.Replace(regex, "*", options); Console.WriteLine(doc.GetText()); // The output is: \u0013INCLUDETEXT\u0014T*xt in fi*ld\u0015\f
从Aspose.Words 20.3开始,Xamarin支持已更改。在早期版本中,我们为Xamarin.Android,Xamarin.Mac和Xamarin.iOS提供了单独的DLL。现在Xamarin开发人员可以在所有提到的平台中使用Aspose.Words for .NET Standard。根据.NET Standard文档,用于.NET Standard 2.0的Aspose.Words可以与Xamarin.iOS 10.14或更高版本,Xamarin.Mac 3.8或更高版本以及Xamarin.Android 8.0或更高版本一起使用。
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@wqylolg.cn
Navicat 17.2 版本现已正式发布。 这一版本引入了不少亮眼的功能,持续赋能数据库管理效率。其中,AI 助手的加入,为用户提供了智能高效的操作支持;对 Snowflake 的支持,极大地拓展了可管理数据库的范围;增强的数据建模方法,使数据模型的构建更加精准、便捷。
DevExpress VCL v24.2已于日前正式发布,新版本官宣支持RAD Studio 12.2、现代64位C++编译器等,欢迎下载官方正式版体验!
界面控件DevExpress WPF v25.1在今年年中更新,新版本将重点关注AI、可访问性和简化的项目设置等领域,欢迎关注我们及时获取最新消息~
RealVNC Connect 版本 8 是该远程访问软件的重磅升级版本,从界面设计、功能整合到安全机制,均进行了深度优化。此次更新带来了 Code Connect 临时访问、统一应用程序、新版 HelpDesk 支持系统等多项核心能力,全面提升用户远程协作体验。本文将带您快速了解五个必须知道的重要更新。
无需Microsoft Word也可在任何平台上满足Word文档的一切操作需求。
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@wqylolg.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢