彩票走势图

文档协同工具开发利器!Aspose.Words v20.4四月更新!支持阅读PDF文档等9大新功能

原创|产品更新|编辑:李显亮|2020-04-07 10:24:55.837|阅读 291 次

概述:Aspose.Words for .Net更新至新版本v20.4,主要新增5大特点,包括:支持阅读PDF文档;提供了更改亚洲段落间距和缩进的功能;为PDF渲染添加了图像插值选项;添加了新的模式3D形状渲染; 图表数据标签和系列的扩展API,同时修复多项Bug,欢迎下载体验。

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

不知不觉已是春暖花开的4月,国内疫情也逐渐趋于平缓,各大企业已然复工。与此同时,Aspose.Words也迎来了4月的最新版更新!Aspose.Words for .Net是一种高级Word文档处理API,用于执行各种文档管理和操作任务。API支持生成,修改,转换,呈现和打印文档,而无需在跨平台应用程序中直接使用Microsoft Word。

主要特点如下:

  • Aspose.Words为.NET 4.6.1提供DLL。与.NET Standard 2.0一样,它支持阅读PDF文档。
  • 提供了更改亚洲段落间距和缩进的功能。
  • 为PDF渲染添加了图像插值选项。
  • 添加了新的模式3D形状渲染。
  • 图表数据标签和系列的扩展API。

>>你可以点击这里下载Aspose.Words for .NET v20.4测试体验

具体更新内容

key 概述 类别
WORDSNET-15697 提供更改受密码保护的VBA代码(更改字符串)的功能 新功能
WORDSNET-20043 公布公开的CompareLevel(粒度)选项 新功能
WORDSNET-20001 提供API以获取针对中文特定段落格式的设置Word 新功能
WORDSNET-19913 Range.Replace替换 新功能
WORDSNET-19996 添加用于PDF渲染的图像插值选项 新功能
WORDSNET-19873 添加功能以设置/获取浮动表的位置(HorizontalAnchor和VerticalAnchor) 新功能
WORDSNET-20080 支持带有复合重音符号的OTF(CFF)字体子集 新功能
WORDSNET-20146 实施ISO 29500特定BorderArt样式的渲染 新功能
WORDSNET-19747 添加功能以设置/获取段落属性“定义文档网格时对齐网格” 新功能
WORDSNET-10548 锚固件靠近紧紧包裹的浮子时,浮子位置不正确 增强功能
WORDSNET-20042 检查RTF格式是否支持在块/单元/行级别放置注释 增强功能

完整更新细则请参考:【Aspose.Words for .NET v20.4更新说明】


公共API更改

①增加了更改亚洲段落间距和缩进的功能,添加了以下ParagraphFormat属性:

///
/// Gets or sets the left indent value (in characters) for the specified paragraphs.
///
publicintParagraphFormat.CharacterUnitLeftIndent {get;set; }
///
/// Gets or sets the right indent value (in characters) for the specified paragraphs.
///
publicintParagraphFormat.CharacterUnitRightIndent {get;set; }
///
/// Gets or sets the value (in characters) for the first-line or hanging indent.
///

Use positive values to set the first-line indent, and negative values to set the hanging indent.

///
publicintParagraphFormat.CharacterUnitFirstLineIndent {get;set; }
///
/// Gets or sets the amount of spacing (in gridlines) before the paragraphs.
///
publicintParagraphFormat.LineUnitBefore {get;set; }
///
/// Gets or sets the amount of spacing (in gridlines) after the paragraphs.
///
publicintParagraphFormat.LineUnitAfter {get;set; }

用例

请注意,设置单位的缩进和间距将更新适当的公共缩进或间距属性。例如,设置ParagraphFormat.CharacterUnitLeftIndent将更新ParagraphFormat.LeftIndent

Document doc = new Document()
ParagraphFormat format = doc.FirstSection.Body.FirsdtParagraph.ParagraphFormat;
  
format.CharacterUnitLeftIndent = 10;       // ParagraphFormat.LeftIndent will be updated
  
format.CharacterUnitRightIndent = 10;      // ParagraphFormat.RightIndent will be updated
  
format.CharacterUnitFirstLineIndent = 20;  // ParagraphFormat.FirstLineIndent will be updated
  
format.LineUnitBefore = 5;                 // ParagraphFormat.SpaceBefore will be updated
  
format.LineUnitAfter= 10;                  // ParagraphFormat.SpaceAfter will be updated

②添加了新模式的3D形状渲染,添加了新的公共属性SaveOptions.Dml3DEffectsRenderingMode :

///
/// Gets or sets a value determining how 3D effects are rendered.
///
///
/// The default value is.
///
publicDml3DEffectsRenderingMode Dml3DEffectsRenderingMode
{
get{returnmDml3DEffectsRenderingMode; }
set{ mDml3DEffectsRenderingMode = value; }
}


///
/// Specifies how 3D shape effects are rendered.
///
publicenumDml3DEffectsRenderingMode
{
///
/// A lightweight and stable rendering, based on the internal engine,
/// but advanced effects such as lighting, materials and other additional effects
/// are not displayed when using this mode.
/// Please see documentation for details.
///
Basic,
///
/// Rendering of an extended list of special effects including advanced 3D effects
/// such as bevels, lighting and materials.
///
///
/// The current implementation uses OpenGL.
/// Please make sure that OpenGL library version 1.1 or higher is installed on your system before use.
/// This mode is still under development, and some things may not be supported, so it's recommended to use
/// themode if the rendering result is not acceptable.
/// Please see documentation for details.
///
Advanced
}

用例

Document doc = new Document(docPath);
SaveOptions saveOptions = new PdfSaveOptions();
saveOptions.Dml3DEffectsRenderingMode = Dml3DEffectsRenderingMode.Advanced;
doc.Save(pdfPath, saveOptions);

③Font和ParagraphFormat添加了新的公共属性SnapToGrid

///
/// Specifies whether the current paragraph should use the document grid lines per page settings
/// when laying out the contents in the paragraph.
///
publicboolSnapToGrid

和Font.SnapToGrid:

///
/// Specifies whether the current run should use the document grid characters per line settings
/// when laying out the contents in this run.
///
publicboolSnapToGrid

用例

Document doc = new Document(docPath);
Paragraph par = doc.FirstSection.Body.FirstParagraph;
par.ParagraphFormat.SnapToGrid = true;
par.FirstRun.Font.SnapToGrid = true;

还想要更多吗?您可以点击阅读【2019 · Aspose最新资源整合】查找需要的教程资源。如果您有任何疑问或需求,请随时,我们很高兴为您提供查询和咨询
标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn


为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP