spire.office 6.3.3已发布。本次更新带了一些新的功能,譬如:spire pdf 支持添加 page-piece 字典,新增移除表单域的功能;spire.xls支持修改透视表的数据源并且新增设置形状顺序的功能等等。此外,该版本还修复了大量问题。详情请阅读以下内容。
该版本涵盖了最新版的spire.doc, spire.pdf, spire.xls, spire.presentation, spire.email, spire.docviewer, spire.pdfviewer, spire.spreadsheet, spire.officeviewer, spire.dataexport, spire.barcode。
版本信息如下:
- spire.doc.dll v9.3.3
- spire.pdf.dll v7.3.1
- spire.xls.dll v11.3.4
- spire.email.dll v4.1.2
- spire.docviewer.forms.dll v6.1.0
- spire.pdfviewer.forms.dll v6.1.1
- spire.pdfviewer.asp.dll v6.1.1
- spire.presentation.dll v6.2.2
- spire.spreadsheet.dll v5.3.0
- spire.officeviewer.forms.dll v6.3.3
- spire.barcode.dll v5.1.4
- spire.dataexport.dll v4.1.9
- spire.dataexport.resourcemgr.dll v2.1.0
- spire.license.dll v1.3.8
https://www.e-iceblue.cn/downloads/spire-office-net.html
spire.pdf
新功能:
- 支持添加page-piece字典
pdfdocument doc = new pdfdocument(inputfile);
if (doc.documentpieceinfo==null) {
doc.documentpieceinfo = new pdfpieceinfo();
}
doc.documentpieceinfo.addapplicationdata("ice","this is a uu");
doc.documentpieceinfo.addapplicationdata("blie", "this is a uu");
doc.documentpieceinfo.addapplicationdata("blue", "this is a uu");
doc.documentpieceinfo.addapplicationdata("jis", "this is a uu");
doc.documentpieceinfo.removeapplicationdata("blie");
if (doc.pages[0].pagepieceinfo==null) {
doc.pages[0].pagepieceinfo = new pdfpieceinfo();
}
doc.pages[0].pagepieceinfo.addapplicationdata("ice", "this is a uu");
doc.pages[0].pagepieceinfo.addapplicationdata("blie", "this is a 2222uu");
doc.pages[0].pagepieceinfo.addapplicationdata("blue", "this is a 3333uu");
doc.pages[0].pagepieceinfo.addapplicationdata("jis", "this is a 4444uu");
doc.pages[0].pagepieceinfo.removeapplicationdata("blie");
stringbuilder sb = new stringbuilder();
idictionary<sstring, pdfapplicationdata> dic = doc.pages[0].pagepieceinfo.applicationdatas;
foreach (string item in dic.keys) {
pdfapplicationdata data = dic[item];
if (data.private is string) {
string ss = data.private as string;
sb.appendline(ss);
}
}
file.writealltext(outputfile_txt, sb.tostring());
doc.savetofile(outputfile);
string input = @"field.pdf";
pdfdocument doc = new pdfdocument();
doc.loadfromfile(input);
pdfformwidget formwidget = doc.form as pdfformwidget;
if (formwidget != null)
{
//方法 1
//formwidget.fieldswidget.clear();
for (int i = formwidget.fieldswidget.list.count - 1; i >= 0; i--)
{
//方法 2
pdffield field = formwidget.fieldswidget.list[i] as pdffield; formwidget.fieldswidget.remove(field);
}
}
string output = "deleteformfield.pdf";
doc.savetofile(output);
pdfdocument doc = new pdfdocument();
memorystream stream = new memorystream(file.readallbytes("test.pdf"));
doc.collection.addfile("file.pdf", stream);
doc.savetofile("result.pdf");
问题修复:
- 修复了转换pdf到xps中文加粗效果丢失的问题
- 修复了转换pdf到图片时抛出nullreferenceexception的问题
- 修复了转换pdf到图片时背景颜色变成黑色的问题
- 修复了给文档加密后用adobe打开失败的问题
- 修复了使用插件转换html到边框阴影效果不正确的问题
- 修复了删除产品创建的线条类型注解失败的问题
- 修复了提取pdf中的文本顺序紊乱的问题
- 修复了保存pdf抛“system.argumentexception”异常的问题
- 修复了保存pdf文档内容全部丢失的问题
- 修复了转换pdf到图片抛“system.formatexception”异常的问题
- 修复了打印pdf文字背景变成黑色的问题
- 修复了转换pdf到excel内容丢失的问题
- 修复了在填充文本框后,打开保存的pdf时出现警告提示的问题
- 修复了从pdf中提取文本时,文本顺序不正确的问题
- 修复了使用netcore向数字签名添加时间戳失败的问题
- 修复了拆分pdf后,保存的pdf文档大小过大的问题
- 修复了在linux中使用插件将html转换pdf时,无法输出pdf的问题
- 修复了转换pdf到图片抛“system.argumentnullexception”异常的问题
- 修复了转换pdf到pdf/a-3a不符合规范的问题
- 修复了获取文档的documentinformation和conformance属性时,程序抛异常“已添加了具有相同键的项”的问题
- 修复了压缩图片后结果文档打开报错的问题
- 修复了绘制grid内容不正确的问题
- 修复了替换文本后,结果文档打开报错的问题
- 修复了添加链接到pdf失败的问题
- 修复了通过createtemplate方法绘制页面,但生成空白页的问题
- 修复了在adobe中打开转换后的pdfa3a文件时,出现错误提示的问题
- 修复了移除签名域后,文档无法编辑的问题
- 修复了在pdf转换word后,使用wps打开结果word文档时布局混乱的问题
- 修复了转换pdf到图片抛“system.formatexception”异常的问题
- 修复了验证转换后的pdfa3a文件时,验证不成功的问题
spire.xls
新功能:
- 支持修改透视表的数据源
var pivottable = sheet.pivottables[0];
((spire.xls.pivottable)pivottable).changedatasource(sheet.range["a1:c9"]);
wb.worksheets[0].pictures[0].changelayer(shapelayerchangetype.bringforward);
wb.worksheets[1].pictures[0].changelayer(shapelayerchangetype.bringtofront);
wb.worksheets[2].pictures[1].changelayer(shapelayerchangetype.sendbackward);
wb.worksheets[3].pictures[1].changelayer(shapelayerchangetype.sendtoback);
//拷贝workbook的theme
workbook.copytheme(srcworkbook);
//设置workbook中默认theme的某一类型颜色
workbook.setthemecolor(themecolortype.accent1, color.blue);
//获取workbook中默认theme的某一类型颜色
color color = workbook.getthemecolor(themecolortype.accent2);
//设置style 为theme color
style.setthemecolor(themecolortype.lt1, 0.1);
//获取style的themecolor(type ,tint)
bool isthemecolor = style.getthemecolor(out themetype, out tint);
sheet.getfreezepanes(out rowindex, out colindex);
问题修复:
- 修复了获取不连续区域的系列数据失败的问题
- 修复了创建图表时设置plotarea,相应数据不正确的问题
- 修复了将excel转换为pdf时,日期公式转换失败的问题
- 修复了将excel转换为pdf时,程序抛"exception unhandled"异常的问题
- 修复了创建新图表时,将hasmajorgridlines设置为“true”不起作用的问题
- 修复了在加载xlsm件时程序抛“system.nullreferenceexception”的问题,以及在转换xlsm文件到html时,程序抛"system.argumentoutofrangeexception"异常的问题
- 修复了日期格式数据的识别不正确的问题
- 修复了将xlsx文档转换为pdf时,输出pdf的条码显示不正确的问题
- 修复了图表更新不正确的问题
- 修复了转换excel到图片,内容不正确的问题
- 修复了转换excel到pdf,字体格式不正确的问题
- 修复了转换excel到pdf, 分页不正确的问题
- 修复了保存excel文档图表格式不正确的问题
- 修复了饼图颜色设置不正确的问题
spire.doc
问题修复:
- 修复了转换word到pdf内容不一致的问题
- 修复了转换word到pdf复选框丢失的问题
- 修复了转换word到pdf格式不正确的问题
- 修复了加载docx文档,程序抛“ system.invalidoperationexception”的问题
- 修复了获取项目列表文本“listtext”值为空的问题
- 修复了转换xml到pdf后包含图像路径的域丢失的问题
- 修复了合并多个word文档后文本乱码的问题
- 修复了使用ps方式转换word到pdf,程序抛“ directorynotfoundexception”的问题
- 修复了转换word到pdf,程序抛“ system.nullreferenceexception”的问题
- 修复了document.gettext()方法获得的文本字母大小写不正确的问题
- 修复了转换rtf到pdf后缩进不正确的问题
- 修复了转换html到pdf,程序抛“ system.argumentnullexception”的问
- 修复了转换word到图片,程序挂起的问题
- 修复了转换word到pdf,程序抛“ system.dividebyzeroexception”的问题
spire.spreadsheet
问题修复:
- 修复了数字显示错误的问题
- 修复了文本显示错误的问题