Aspose.Words 15.4.0正式发布了。本次更新包含110项改动,包括新增功能,原有功能升级以及漏洞修复 。
点击链接下载最新版本:
下面罗列出Aspose.Words 15.4.0的主要更新内容:
- 改进了图形内的MathM方程式的渲染;
- 改进了MathML方程式渲染过程中的垂直定位;
- 改进对 Mac 2011文档MS Word 的Iso29500的支持;
- 改进了页数计算,脚注平衡,嵌套的浮动表格和图片四周文字环绕等功能;
- 改进了EMF和WMF渲染;
- HTML保存选项和图形/绘图添加了一些新的 public members;
- DocumentBuilder, TXT, ODT以及Microsoft Word文档格式有超过30项改进;
添加HtmlFixedSaveOptions.CssClassNamesPrefix 公共属性
HtmlFixedSaveOptions类添加了新的公共属性:
1
|
/// <summary> /// Specifies prefix which is added to all class names in style.css file. ///
Default
value is <c>
"aw"
</c>. /// </summary> public string CssClassNamesPrefix { get { return mCssClassNamesPrefix; } set { mCssClassNamesPrefix = value; } }
|
该属性与Aspose.Pdf中的HtmlSaveOptions.CssClassNamesPrefix属性相似。
在先前版本的 Aspose.Words,style.css看上去很简单:
1
|
div { position:absolute; } span { position:absolute; white-space:nowrap; color:#000000; font-size:12pt; } img { position:absolute; } svg { position:absolute; } page { position:relative; border:solid 1pt black; margin:10pt auto 10pt auto; overflow:hidden; } .text1 { font-family:
'Calibri'; font-style:normal; font-weight:normal; }
|
元素和类选择符都用到了。为了提供Aspose.Pdf的HtmlSaveOptions.CssClassNamesPrefix behavior属性 ,现在tyle.css 是这样的:
1
|
.awdiv { position:absolute; } .awspan { position:absolute; white-space:nowrap; color:#000000; font-size:12pt; } .awimg { position:absolute; } .awsvg { position:absolute; } .awpage { position:relative; border:solid 1pt black; margin:10pt auto 10pt auto; overflow:hidden; } .awtext1 { font-family:
'Calibri'; font-style:normal; font-weight:normal; }
|
只使用类选择符,它允许所有类名加前缀。
添加HtmlSaveOptions.ExportOriginalUrlForLinkedImages公共属性
HtmlSaveOptions类新增公共属性:
1
|
/// <summary> /// Specifies whether original URL should be used as the URL of the linked images. ///
Default
value is <c>false</c>. /// </summary> /// <remarks> /// <para>
If
value is set to <c>true</c> <see cref=
"ImageData.SourceFullName"
> value is used as the URL of linked images /// and linked images are not loaded into document
's folder or <see cref="HtmlSaveOptions.ImagesFolder">.</see></see></para> /// <para>If value is set to <c>false</c> linked images are loaded into document's folder or <see cref="HtmlSaveOptions.ImagesFolder"> /// and URL of each linked image is constructed depending on document's folder, <see cref="HtmlSaveOptions.ImagesFolder"> /// and <see cref="HtmlSaveOptions.ImagesFolderAlias"> properties.</see></see></see></para> /// </remarks> public bool ExportOriginalUrlForLinkedImages { get { return mExportOriginalUrlForLinkedImages; } set { mExportOriginalUrlForLinkedImages = value; } }
|
添加ShapeBase.IsSignatureLine公共属性
原先API并不明确说明某图形是否为签名档,只是在替代文本下有个提示。现在新属性能帮助辨别签名档图形了。