提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
原创|产品更新|编辑:龚雪|2015-04-22 10:10:26.000|阅读 395 次
概述:Aspose.Words 15.3 正式发布。此次更新内容有131项,包含功能改进和漏洞修复。
# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>
Aspose.Words 15.3 正式发布。此次更新内容有131项,包含功能改进和漏洞修复。其中最显著的内容有:
支持 DISPLAYBARCODE字段。 Aspose.Words API新引入下列字符实体:
点击查看 “DISPLAYBARCODE字段的自定义条码图像生成 DISPLAYBARCODE” 功能:
The following new method inserts content of the document into the current position of DocumentBuilder’s cursor 下列新类函数插入文档内容到DocumentBuilder光标的当前位置。
public Node InsertDocument(Document, ImportFormatMode);
点击查看 “DISPLAYBARCODE字段的自定义条码图像生成 DISPLAYBARCODE” 功能:
文档可以在任何周期发出警告消息 。所以为了收取所有的警告,DocumentBase class.添加了一个新的属性。
public IWarningCallback WarningCallback
与此同时 time SaveOptions.WarningCallback被淘汰了,因此就不要在新的代码中出现了。
OpaqueBoundsInPoints属性和类函数 GetOpaqueRectangleInPixels 添加到ShapeRenderer类。这样就可以恰当的获取图形的不透明边界。新的工作机制如下:
public static void RenderNode(Node node, string filePath, ImageSaveOptions imageOptions) { // This code is taken from public API samples of AW. // Previously to find opaque bounds of the shape the function // that checks every pixel of the rendered image was used. // For now opaque bounds is got using ShapeRenderer.GetOpaqueRectangleInPixels method. // If no image options are supplied, create default options. if (imageOptions == null) imageOptions = new ImageSaveOptions(FileFormatUtil.ExtensionToSaveFormat(Path.GetExtension(filePath))); // Store the paper color to be used on the final image and change to transparent. // This will cause any content around the rendered node to be removed later on. Color savePaperColor = imageOptions.PaperColor; imageOptions.PaperColor = Color.Transparent; // There a bug which affects the cache of a cloned node. To avoid this we instead clone the entire document including all nodes, // find the matching node in the cloned document and render that instead. Document doc = (Document)node.Document.Clone(true); node = doc.GetChild(NodeType.Any, node.Document.GetChildNodes(NodeType.Any, true).IndexOf(node), true); // Create a temporary shape to store the target node in. This shape will be rendered to retrieve // the rendered content of the node. Shape shape = new Shape(doc, ShapeType.TextBox); Section parentSection = (Section)node.GetAncestor(NodeType.Section); // Assume that the node cannot be larger than the page in size. shape.Width = parentSection.PageSetup.PageWidth; shape.Height = parentSection.PageSetup.PageHeight; shape.FillColor = Color.Transparent; // We must make the shape and paper color transparent. // Don't draw a surronding line on the shape. shape.Stroked = false; // Move up through the DOM until we find node which is suitable to insert into a Shape (a node with a parent can contain paragraph, tables the same as a shape). // Each parent node is cloned on the way up so even a descendant node passed to this method can be rendered. // Since we are working with the actual nodes of the document we need to clone the target node into the temporary shape. Node currentNode = node; while (!(currentNode.ParentNode is InlineStory || currentNode.ParentNode is Story || currentNode.ParentNode is ShapeBase)) { CompositeNode parent = (CompositeNode)currentNode.ParentNode.Clone(false); currentNode = currentNode.ParentNode; parent.AppendChild(node.Clone(true)); node = parent; // Store this new node to be inserted into the shape. } // We must add the shape to the document tree to have it rendered. shape.AppendChild(node.Clone(true)); parentSection.Body.FirstParagraph.AppendChild(shape); // Render the shape to stream so we can take advantage of the effects of the ImageSaveOptions class. // Retrieve the rendered image and remove the shape from the document. MemoryStream stream = new MemoryStream(); ShapeRenderer renderer = shape.GetShapeRenderer(); renderer.Save(stream, imageOptions); shape.Remove(); Rectangle crop = renderer.GetOpaqueRectangleInPixels(imageOptions.Scale, imageOptions.Resolution); // Load the image into a new bitmap. using (Bitmap renderedImage = new Bitmap(stream)) { Bitmap croppedImage = new Bitmap(crop.Width, crop.Height); croppedImage.SetResolution(imageOptions.Resolution, imageOptions.Resolution); // Create the final image with the proper background color. using (Graphics g = Graphics.FromImage(croppedImage)) { g.Clear(savePaperColor); g.DrawImage(renderedImage, new Rectangle(0, 0, croppedImage.Width, croppedImage.Height), crop.X, crop.Y, crop.Width, crop.Height, GraphicsUnit.Pixel); croppedImage.Save(filePath); } } }
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn
知名C/C++开发工具CLion全新发布v2024.3,新版本新语言引擎有显著改进等,欢迎下载新版体验!
强大的VS插件CodeRush已正式发布v24.2.3,新版本现在可以运行xUnit.Net v3测试等,欢迎下载最新版体验!
Spire.PDF 10.12.4 最新版本支持在进行多页打印时设置自动旋转方向。同时,一些已知问题也在本次更新中被成功修复,例如打印 PDF 文档时内容丢失的问题,欢迎下载体验~
日程安排控件dhtmlxScheduler v7.2全新发布,新版本增强并增加了编辑、修改等多个操作体验,欢迎下载最新版试用~
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@pclwef.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢