spire.office 6.1已正式发布。本次更新带了一系列新的功能,例如:spire.xls 支持计算 ms excel2019 新增公式,增加了在气泡图中不显示图表标题和转换shape到图片等新功能;spire.pdf 支持了自定义签名图片的功能;spire.presentation 支持嵌入 zip 对象到 pptx 文件;spire.pdfviewer 支持了显示页面标签的功能等等。此外,该版本还修复了大量问题。详情请阅读以下内容。
该版本涵盖了最新版的spire.doc, spire.pdf, spire.xls, spire.presentation, spire.email, spire.docviewer, spire.pdfviewer, spire.spreadsheet, spire.officeviewer, spire.dataexport, spire.barcode。
版本信息如下:
- spire.license.dll 1.3.8
- spire.barcode.dll 5.1.4
- spire.dataexport.dll 4.1.9
- spire.doc.dll 9.1.7
- spire.docviewer.forms.dll 6.1.0
- spire.email.dll 4.1.2
- spire.pdf.dll 7.1.10
- spire.pdfviewer.forms.dll 6.1.0
- spire.presentation.dll 6.1.4
- spire.spreadsheet.dll 5.1.0
- spire.xls.dll 11.1.4
https://www.e-iceblue.cn/downloads/spire-office-net.html
spire.xls
功能优化:
- 优化了转换excel到html的速度
新功能:
- 支持计算ms excel2019新增公式concat, ifs, maxifs, minifs, switch, textjoin
- 支持了在气泡图中不显示图表标题的功能
chart.hascharttitle = false;
移除边框两种方式:设置picture.line.visible = false或设置line.weight = 0
image img = shape.savetoimage();
shape.savetoimage(string filename);
shape.savetoimage(string filename, imageformat imageformat);
shape.savetoimage(stream filestream);
shape.savetoimage(stream filestream, imageformat imageformat);
workbook book = new workbook();
book.loadfromfile(input);
foreach (worksheet sheet in book.worksheets)
{
foreach (excelpicture picture in sheet.pictures)
{
picture.compress(30);
}
}
book.savetofile(result, excelversion.version97to2003);
问题修复:
- 修复了获取图表标题失败的问题
- 修复了转换excel到pdf日期的换行不正确的问题
- 修复了加载文件时程序抛system.overflowexception的问题
- 修复了加载保存文件时程序抛system.argumentoutofrangeexception的问题
- 修复了转换excel到pdf条件格式的数据条显示不正确的问题
- 修复了在win10 64位区域设置为意大利的环境下创建透视表失败的问题
- 修复了文本框不能被复制拷贝正确的问题
- 修复了拷贝单元格内容时文本字型缩进由紧缩变为标准的问题
- 修复了转换excel到html时程序挂起的问题
- 修复了导sheet数据到数据表时日期数据格式不正确的问题
- 修复了插入和删除行耗时长的问题
- 修复了保存图表到图片时图表中的的分类标签的数据不正确的问题
- 修复了转换turkish iso-8859-9 编码的csv文件到xlsx时字符显示乱码的问题
spire.doc
问题修复:
- 修复了当设置从右到左的语言时,转到pdf/xps结果不正确的问题
- 修复了查找文本失败的问题
- 修复了转换word到pdf内容不正确的问题
- 修复了转换word到pdf,内容重叠的问题
- 修复了转换word到pdf,页码不正确的问题
- 修复了转换word到pdf抛异常“未将对象引用设置到对象的实例”的问题
- 修复了转换word到pdf,分页不正确的问题
- 修复了保存word文档后书签位置被改变的问题
- 修复了转换word文档到pdf,线条显示不正确的问题
- 修复了转换word到pdf抛异常“索引超出了数组界限”的问题
- 修复了保存到word文档后,方程不正确的问题
- 修复了转换word到pdf后,列表编号错误的问题
- 修复了加载文档抛异常“输入字符串的格式不正确”的问题
spire.pdf
新功能:
- 支持了自定义签名图片的功能
pdfsignature signature = new pdfsignature(doc, page, cert, "123456");
signature.configurecustomgraphics(drawgraphics);
private void drawgraphics(pdfcanvas g)
{
pointf point1 = new pointf(10, 20);
pointf point2 = new pointf(25, 50);
pointf point3 = new pointf(60, 20);
pointf[] pntarr = { point1, point2, point3 };
pdfrgbcolor color = new pdfrgbcolor(color.red);
g.drawpolygon(new pdfpen(color), pntarr);
g.drawrectangle(new pdfpen(color.green), new rectanglef(70, 10, 20, 30));
g.drawline(new pdfpen(color.blue), new pointf(120, 50), new pointf(95, 5));
g.drawline(new pdfpen(color.blue), new pointf(100, 30), new pointf(130, 20));
}
问题修复:
- 修复了使用智能卡(smart card)和数字身份加密锁(usb token)进行签名时多次需输入密码的问题。
- 修复了转换出的pdfa3b文档不符合标准的问题。
- 修复了提取pdf文本时内容顺序不正确的问题。
- 修复了转换pdf到excel表格合并格式丢失的问题。
- 修复了转换pdf到excel程序抛异常 “未将对象引用设置到对象的实例”的问题。
- 修复了转换xps到pdf部分字符没有转换成功的问题。
- 修复了在grid单元格中设置文本分散对齐不生效的问题。
spire.presentation
新功能:
- 支持嵌入zip对象到pptx文件。(03ppt尚不支持此功能)
string zippath= "c:/test.zip";
presentation ppt = new presentation();
byte[] data = file.readallbytes(zippath);
rectangle rec = new rectangle(80, 60, 100, 100);
//the first parameter needs to be passed the complete file name
ioleobject ole = ppt.slides[0].shapes.appendoleobject("test.zip", data, rec);
ole.progid = "package";
image image = image.fromfile(@"e:\demoproducts\image\logo.png");
iimagedata oleimage = ppt.images.append(image);
ole.substituteimagepicturefillformat.picture.embedimage = oleimage;
ppt.savetofile(@"result.pptx", spire.presentation.fileformat.pptx2013);
问题修复:
- 修复了复制组合图形时里面的形状大小改变的问题。
- 修复了给组合图形中一个形状修改值后该形状的位置改变的问题。
- 修复了打印多个幻灯片到一页上,内容被拉伸的问题。
- 修复了克隆一个形状到另外一个幻灯片里后当修改形状的高度时它的位置改变的问题。
spire.email
调整变化:
- 将imapclient.markasdeleted(int sequqnceno)方法的参数类型由string改为int。
spire.pdfviewer
新功能:
- 支持了显示页面标签的功能。
问题修复:
- 修复了图片白色颜色显示为黑色的问题。
- 修复了中文字符显示乱码的问题。
- 修复了旋转页面失败的问题。
- 修复了表单域的背景色显示不正确的问题。
spire.barcode
新功能:
- 新增了barcodescan类实现可以创建不同的实例去调用scan方法
barcodescan task1 = new barcodescan();
task1.scan(bitmap, rectangle, barcodetype);
问题修复:
- 修复了barcodescanner.scan方法在异步委托使用时抛出异常“未将对象引用设置到对象的实例”的问题
- 修复了扫描code128条码结果数据不正确的问题。
- 修复了扫描不含barcode的图片时程序挂起的问题。
- 修复了扫描qr-code二维码结果数据为空的问题。
- 修复了barcodesettings.code128setmode设置无效的问题。