Spire.Office 5.9.6已正式发布。该版本新增了一些功能,例如:Spire.Presentaion支持对组合图形取消组合和GroupShapes方法返回GroupShape对象,并新增了GetPlaceholderShapes方法来通过占位符获取幻灯片母版版式中的形状的功能;Spire.XLS支持设置透视表域的重复项目标签选项;Spire.Barcode支持设置条码顶部文本的排列方式以及在条形码底部添加自定义文本。此外,本次更新也修复了一些在转换、操作PowerPoint、Excel和PDF文档以及扫描barcode时出现的问题。更多新功能及问题修复详情如下。
该版本涵盖了最新版的Spire.Doc、Spire.PDF、Spire.XLS、Spire.Presentation、Spire.DataExport、Spire.Barcode、Spire.DocViewer、Spire.PDFViewer、Spire.OfficeViewer、Spire.Email。
版本信息如下::
- Spire.Doc.dll v8.9.6
- Spire.Pdf.dll v6.9.16
- Spire.XLS.dll v10.9.16
- Spire.Email.dll v3.9.1
- Spire.DocViewer.Forms.dll v5.1.1
- Spire.PdfViewer.Forms.dll v5.9.2
- Spire.PdfViewer.Asp.dll v5.9.2
- Spire.Presentation.dll v5.9.5
- Spire.Spreadsheet v4.5.0
- Spire.OfficeViewer.Forms.dll v5.9.6
- Spire.Barcode.dll v4.9.2
- Spire.DataExport.dll v4.1.9
- Spire.DataExport.ResourceMgr.dll v2.1.0
- Spire.Common.dll v10.9.16
- Spire.License.dll v1.3.8
https://www.e-iceblue.cn/Downloads/Spire-Office-NET.html
Spire.Presentation
新功能:
- 支持对组合图形取消组合。
GroupShape groupShape = presentation.Slides[0].Shapes[0] as GroupShape;
presentation.Slides[0].Ungroup(groupShape);
Placeholder placeholder = presentation.Slides[1].Shapes[0].Placeholder;
IShape[] shapes = presentation.Slides[1].GetPlaceholderShapes(placeholder);
for (int i = 0; i < shapes.Length; i++)
{
if (shapes[i] is IAutoShape)
{
IAutoShape autoShape = shapes[i] as IAutoShape;
if (autoShape.TextFrame != null)
{
Console.WriteLine(autoShape.TextFrame.Text);
}
}
}
ArrayList groupShapeList = new ArrayList();
groupShapeList.Add(shape1);
groupShapeList.Add(shape2);
groupShapeList.Add(shape3);
GroupShape groupshape = ppt.Slides[0].GroupShapes(groupShapeList);
问题修复:
- 修复了拷贝幻灯片到新文档时抛“DocumentEditException”的问题。
- 修复了组合图形后导致图形消失的问题。
- 修复了转换PPTX到HTML抛“NullReferenceException”的问题。
- 修复了加载PPTX文档抛“IndexOutOfRangeException”的问题。
- 修复了转换PPTX到PDF图表内容不正确的问题。
- 修复了加载受保护的PPT文档抛异常“Encrypted presentations are not supported”的问题。
Spire.XLS
新功能:
- 支持设置透视表域的重复项目标签选项。
pt.PivotFields["OnHand"].RepeatItemLabels = true;
问题修复:
- 修复了转换xls 到 xlsx,多边形变矩形的问题。
- 修复了由Spire创建的矩形的Left属性值为0的问题。
- 修复了转换包含透视表的sheet到PDF,内容不正确的问题。
- 修复了在德语环境下添加的数字格式不正确的问题。
- 修复了设置矩形的left和top属性值后,矩形的高度和宽度改变的问题。
- 修复了转换到PDF,FIXED公式值不正确的问题。
- 修复了获取分页处的行索引失败的问题。
- 修复了转换Excel到PDF,内容不正确的问题。
- 修复了转换Excel到PDF,边框不正确的问题。
- 修复了转换xls到ods, 边框丢失的问题。
Spire.PDF
问题修复:
- 修复了添加多个按钮表单域后用Adobe Acrobat Reader DC打开报修复表单错误的问题。
- 修复了打印时字符顶部被裁剪的问题。
- 修复了查找到的文本的Y值不正确的问题。
- 修复了查找到的文本的Width值不正确的问题。
- 修复了替换图片失败的问题。
- 修复了创建的PdfPolygonAnnotation无法打印的问题。
- 修复了提取特定矩形区域文本的结果不正确的问题。
- 修复了在WPF项目中转换PDf到Docx文档失败的问题。
- 修复了PDF到Word转换时图章丢失的问题。
- 修复了使用名字为2.16.76.1.4.2.2.1和值为101620创建自定义属性程序抛出“Bad XML name”的问题。
- 修复了提取模板页面中的图片时程序抛出异常的问题。
- 修复了模板页面中复选框状态改变的问题。
- 修复了转换PDF到XPS,粗体效果丢失的问题。
- 修复了转换PDF到HTML程序抛ArgumentOutOfRangeException异常的问题。
- 修复了修改域的名字失败的问题。
- 修复了转换PDF到图片程序抛出ArgumentOutOfRangeException异常的问题。
Spire.Barcode
新功能:
- 支持设置条码顶部文本的排列方式。
int width = 399;
int height = 159;
BarcodeSettings bs = new BarcodeSettings();
bs.Type = BarCodeType.UPCA;
bs.Unit = GraphicsUnit.Pixel;
bs.WideNarrowRatio = 0.5f;
bs.TextFont = new Font("Arial", 20, FontStyle.Regular);
string data = "602318275035";
bs.Data2D = data;
bs.Data = data;
bs.ShowTextOnBottom = true;
bs.TopText = data;
bs.ShowTopText = true;
bs.TextAlignment = StringAlignment.Center;
bs.TopTextAligment = StringAlignment.Center;
bs.TopTextFont = new Font("Arial", 20, FontStyle.Regular);
bs.AutoResize = false;
bs.X = 3.0f;
bs.BarHeight = height * 0.6f;
bs.ImageWidth = width;
bs.ImageHeight = height;
BarCodeGenerator generator = new BarCodeGenerator(bs);
Image barImage = generator.GenerateImage();
barImage.Save(outputFile_img, ImageFormat.Png);
BarcodeSettings barsetting = new BarcodeSettings();
barsetting.Type=BarCodeType.EAN13;
barsetting.BackColor = Color.WhiteSmoke;
String data = "6901234567892";
barsetting.Data=data;
barsetting.Data2D=data;barsetting.TopText="EAN13";
barsetting.TopTextFont=new Font("Arial", 20, FontStyle.Regular);
barsetting.TopTextColor=Color.Red;
barsetting.ShowTopText=true;
barsetting.ShowTextOnBottom=true;
barsetting.TopTextAligment=StringAlignment.Center;
barsetting.BottomText="EAN";
barsetting.BottomTextFont=new Font("fangsong", 25, FontStyle.Bold);
barsetting.BottomTextColor=Color.Black;
barsetting.ShowBottomText=true;
barsetting.BottomTextAligment=StringAlignment.Far;
BarCodeGenerator generator = new BarCodeGenerator(barsetting);
Image barcode = generator.GenerateImage();
barcode.Save(outputFile_img);
问题修复:
- 修复了扫描条形码得到的数据不正确的问题。
- 修复了扫描条形码失败的问题。
- 修复了扫描条形码程序抛“NullPointerException”的问题。
- 修复了添加自定义文本不生效的问题。
- 修复了扫描含特殊字符的QR码,得到的数据错误的问题。