没有找到合适的产品?
联系客服协助选型:023-68661681
提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
翻译|产品更新|编辑:李显亮|2019-06-04 14:32:37.267|阅读 619 次
概述:Aspose.Words for Java更新至v19.5版本,添加了Jdk1.6构建选项,部分类型任务的Mailmerge性能提高到50%。
# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>
Aspose.Words for Java是一种高级Java Word处理API,使您可以直接在Java应用程序中执行各种文档处理任务。
Aspose.Words for Java更新至v19.5,新增Jdk1.6构建选项,部分类型任务的Mailmerge性能提高了50%,修复多像Bug!
【点击下载最新版Aspose.Words for Java】
| key | 概述 | 类别 |
|---|---|---|
| WORDSNET-14297 | 提供一种方法来检查是否应用了特定的Dml文本效果 | 新功能 |
| WORDSNET-16739 | 提供类似于FileFontSource的StreamFontSource | 新功能 |
| WORDSNET-16734 | 添加功能以获取“运行”节点的字体前导/度量标准 | 新功能 |
| WORDSNET-18436 | 提供API以识别样式分隔符段落 | 新功能 |
| WORDSNET-17843 | 为PDF格式的目录生成 | 新功能 |
| WORDSNET-18440 | 向ExtrusionParameters添加新的3D参数及其处理 | 新功能 |
| WORDSJAVA-1866 | 用尽了与Pdf不匹配的颜色组件数量的图像,用尽Java堆空间。 | Bug修复 |
| WORDSJAVA-2010 | 将DOCX转换为PDF的时间消耗 | Bug修复 |
| WORDSJAVA-2012 | 邮件合并的时间消耗 | Bug修复 |
| WORDSJAVA-2039 | 错误的带有损坏的base64字符串的WML文档中的ImageBytes。 | Bug修复 |
| WORDSJAVA-2059 | Aspose.Words for Java 19.3和JDK 1.6引发异常 | Bug修复 |
| WORDSJAVA-2063 | 标题中的表格/图像消失,文本框在转换的DOCX中部分可见 | Bug修复 |
| WORDSJAVA-2079 | 签名.doc文件后,Aspose.Words 19.4 OutputStream对象为空。 | Bug修复 |
| WORDSJAVA-2080 | 当DOC_PRE_WORD_60用作参数时,无法加载Word 6或Word 95格式。 | Bug修复 |
| WORDSNET-11952 | 将Html转换为Pdf时的性能问题 | Bug修复 |
| WORDSNET-18097 | XML中的图片偶尔会呈现为PDF中的红十字 | Bug修复 |
| WORDSNET-13463 | 加入RTF文件后,列表级别的起始编号会更改 | Bug修复 |
| WORDSNET-18332 | 图表x-scale在PDF中有字体问题 | Bug修复 |
| WORDSNET-18444 | 加载MHTML文件时会引发异常 | Bug修复 |
| WORDSNET-17401 | 保存为pdfA1a不支持TOC和TOC项目(TOCI)标记 | Bug修复 |
| WORDSNET-18355 | 导入MHTML时抛出System.NotSupportedException | Bug修复 |
| WORDSNET-18512 | 外语使用表格按原始文档的顺序转换文档 | Bug修复 |
| WORDSNET-18446 | DOCX到PDF - 连字符不一样 | Bug修复 |
| WORDSNET-18380 | Document.UpdateFields抛出System.InvalidOperationException | Bug修复 |
| WORDSNET-7452 | Aspose.Words在将文本文件渲染为Pdf时挂起 | Bug修复 |
| WORDSNET-7588 | 在加载使用Aspose.Email生成的MHTML文件时,AW挂起 | Bug修复 |
| WORDSNET-18395 | 表格加入PDF输出 | Bug修复 |
| WORDSNET-18386 | 将RTF转换为PDF时的IndexOutOfRangeException | Bug修复 |
| WORDSNET-17383 | FontSettings.SetFontSubstitutes不替换字体 | Bug修复 |
| WORDSNET-10368 | 将Docx转换为Pdf时的性能问题 | Bug修复 |
| WORDSNET-10867 | Document.Save方法需要花费时间将Docx转换为Pdf | Bug修复 |
| WORDSNET-3738 | 如果文档只包含一个包含大量换行符的段落,则渲染需要很长时间 | Bug修复 |
| WORDSNET-18171 | 加载MHTML时抛出System.NotSupportedException | Bug修复 |
| WORDSNET-18237 | 数学公式标签mi将变为斜体 | Bug修复 |
| WORDSNET-18357 | 引入Field.DisplayResult属性以获取假结果 | Bug修复 |
| WORDSNET-17407 | 表的右边缘未正确呈现在HTML中 | Bug修复 |
| WORDSNET-18307 | “不是合法的OleAut日期”DOCX到DOC或PDF转换时发生异常 | Bug修复 |
| WORDSNET-12431 | 将Word保存为Pdf时标题的间距错误 | Bug修复 |
| WORDSNET-18448 | 在调用UpdateFields之后,表列表在PDF中添加了延续条目 | Bug修复 |
| WORDSNET-12539 | 目录在输出PDF中放错了位置 | Bug修复 |
| WORDSNET-13691 | 由于右缩进,带有右选项卡的段落将换行到下一行 | Bug修复 |
| WORDSNET-13788 | 从Word转换为PDF有一些页眉/页脚问题 | Bug修复 |
• • • • • •
更多更新细则可参考【Aspose.Words for Java v19.5更新说明】
在Document类中添加了一个新的重载AppendDocument()方法:
////// Appends the specified document to the end of this document. //////The document to append.///Specifies how to merge style formatting that clashes.///Allows to specify options that affect formatting of a result document.public void AppendDocument(Document srcDoc, ImportFormatMode importFormatMode, ImportFormatOptions importFormatOptions)
用例:
Document srcDoc = new Document("source.docx");
Document dstDoc = new Document("destination.docx");
ImportFormatOptions options = new ImportFormatOptions();
// Specify that if numbering clashes in source and destination documents, then a numbering from the source document will be used.
options.KeepSourceNumbering = true;
dstDoc.AppendDocument(srcDoc, ImportFormatMode.UseDestinationStyles, importFormatOptions)在Paragraph类中添加了一个新的公共属性BreakIsStyleSeparator。
////// True if this paragraph break is a Style Separator. A style separator allows one /// paragraph to consist of parts that have different paragraph styles. ///public bool BreakIsStyleSeparator
用例:
Paragraph paragraph;
if (paragraph.BreakIsStyleSeparator)
{
// Do smth..
}字体的行间距是两个连续文本行的基线之间的垂直距离。因此,行间距包括行之间的空白空间以及字符本身的高度。Font类中引入了以下属性以获取此值:
////// Returns line spacing of this font (in points).
///public double LineSpacing { get; }用例:
DocumentBuilder builder = new DocumentBuilder(new Document());
builder.Font.Name = "Calibri";
builder.Writeln("qText");
// Obtain line spacing.
Font font = builder.Document.FirstSection.Body.FirstParagraph.Runs[0].Font;
Console.WriteLine($"lineSpacing = {font.LineSpacing}");受WORDSNET-18165的启发,添加一个属性,允许客户获取没有字段分隔符节点的字段的字段结果。我们称之为“假结果”或显示结果; MS Word通过动态计算字段的值在文档中显示它,但文档模型中没有这样的值
////// Gets the text that represents the displayed field result. ///////// Themethod must be called to obtain correct value for the ///,,andfields. ///public string DisplayResult
用法:
List Field> fields = FieldExtractor.ExtractToCollection(document, false);
Assert.AreEqual("111", fields[0].DisplayResult);
Assert.AreEqual("222", fields[1].DisplayResult);
Assert.AreEqual("Multi\rLine\rText", fields[2].DisplayResult);
Assert.AreEqual("%", fields[3].DisplayResult);
Assert.AreEqual("Macro Button Text", fields[4].DisplayResult);
Assert.AreEqual(string.Empty, fields[5].DisplayResult);
document.UpdateListLabels();
Assert.AreEqual("1)", fields[5].DisplayResult);添加了新的StreamFontSource类,允许从流中加载字体:
////// Base class for user-defined stream font source.
/////////In order to use the stream font source you should create a derived class from the/// and provide implementation of themethod.///
///method could be called several times. For the first time it will be called
/// when Aspose.Words scans the provided font sources to get the list of available fonts. Later it may be called if the
/// font is used in the document to parse the font data and to embed the font data to some output formats.///
///may be useful because it allows to load the font data only when it is required
/// and not to store it in the memory for thelifetime.///public abstract class StreamFontSource : FontSourceBase, IFontData
{
////// Ctor.
///protected StreamFontSource()
{
}
////// Ctor.
//////Font source priority. See theproperty description for more information.protected StreamFontSource(int priority)
: base(priority)
{
}
////// Returns the type of the font source.
///public sealed override FontSourceType Type
{
get { return FontSourceType.FontStream; }
}
////// This method should open the stream with font data on demand.
//////Font data stream.////// Aspose.Words will close the stream after reading. There is no need to close it explicitly.
///public abstract Stream OpenFontDataStream();
}用例:
class ResourceSteamFontSourceExample : StreamFontSource
{
public override Stream OpenFontDataStream()
{
return Assembly.GetExecutingAssembly().GetManifestResourceStream("resourceName");
}
}添加了Font.HasDmlEffect()方法以检查特定的Dml文本效果是否应用于Run。
////// Checks if particular Dml text effect is applied. //////Dml text effect type.///True if particular Dml text effect is applied.public bool HasDmlEffect(TextDmlEffect dmlEffectType)
用例:
RunCollection runs = doc.FirstSection.Body.FirstParagraph.Runs; Font runFont = runs[1].Font; // One run might have several Dml text effects applied. Debug.WriteLine(runFont.HasDmlEffect(TextDmlEffect.Shadow)); Debug.WriteLine(runFont.HasDmlEffect(TextDmlEffect.Effect3D)); Debug.WriteLine(runFont.HasDmlEffect(TextDmlEffect.Reflection)); Debug.WriteLine(runFont.HasDmlEffect(TextDmlEffect.Outline)); Debug.WriteLine(runFont.HasDmlEffect(TextDmlEffect.Fill));
想要购买Aspose.Words正版授权,可联系
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@ke049m.cn




数据库工具DataGrip v2025.2正式发布,新版本为 AI 聊天上下文附加数据库对象的功能等,欢迎下载最新版体验!
本文将介绍界面组件Telerik UI for WinForms在今年第三个重大版本2025 Q3中发布的新功能,欢迎下载最新版组件体验!
界面控件DevExpress WinForms v25.2将于今年年末左右更新,新版本将继续升级报表组件功能等,欢迎关注我们及时获取最新消息~
DevExpress WinForms控件v25.1日前已经全新发布,新版本的Ribbon、PDF Viewer(查看器)等组件功能全新升级等,欢迎下载最新版体验!
相关产品
可用于基于Java SE或EE的桌面,Web或任何种类应用程序的Native Java API。
最新文章 MORE
半岛外围网上直营相关的文章 MORE
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@ke049m.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢
半岛外围网上直营 