spire.office 6.11.2已发布。本次更新带来了一些新的功能,例如:spire.xls支持给数据栏设置边框的功能以及给折线图和面积图设置垂直线;spire.doc新增了两个方法;spire.pdf支持获取附件所在的页码和转换线性化pdf;spire.presentation支持获取表格单元格的填充颜色。此外,该版本还修复了大量已知的问题。详情请阅读以下内容。
该版本涵盖了最新版的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.11.6
- spire.pdf.dll v7.11.1
- spire.xls.dll v11.11.2.
- spire.email.dll v4.11.1
- spire.docviewer.forms.dll v6.8.0
- spire.pdfviewer.forms.dll v6.11.1
- spire.pdfviewer.asp.dll v6.11.1
- spire.presentation.dll v6.11.4
- spire.spreadsheet v5.10.0
- spire.officeviewer.forms.dll v6.11.2
- spire.barcode.dll v5.9.4
- spire.dataexport.dll v4.1.9
- spire.dataexport.resourcemgr.dll v2.1.0
- spire.license.dll v1.4.0
https://www.e-iceblue.cn/downloads/spire-office-net.html
spire.xls
新功能:
- 支持了转换excel文件到pdf文件设置自定义纸张尺寸的问题
workbook.worksheets[0].pagesetup.setcustompapersize(width, height);
chart.series[0].hasdroplines = true;
xlsconditionalformats cfs = sheet.conditionalformats[0];
iconditionalformat cf = cfs[0];
spire.xls.databar databar1 = cf.databar;
databar1.barborder.type = spire.xls.core.spreadsheet.conditionalformatting.databarbordertype.databarbordersolid;
databar1.barborder.color = color.greenyellow;
问题修复:
- 修复了转换excel文件到html文件后图片位置不正确的问题
- 修复了转换excel文件到pdf文件时内容被裁剪的问题
- 修复了转换一个组合图表到图片时内容不正确的问题
- 修复了加载一个ods文件程序挂起的问题
- 修复了转换excel文件到pdf文件时内容不正确的问题
- 修复了ms excel打开保存后的xlsx文件失败的问题
spire.pdf
新功能:
- 支持获取附件所在的页码。
int page = pdf.attachments.getattachmentpage("attachmentfilename");
pdftolinearizedpdfconverter converter = new pdftolinearizedpdfconverter("inputfile");
converter.tolinearizedpdf("outputfile");
问题修复:
- 修复了转换pdf到word文档内容不正确的问题
- 优化了转换pdf到图片的耗时
- 修复了压缩文档后,结果文档打开提示错误的问题
- 修复了合并文档后数字签名丢失的问题
- 修复了获取使用的字体名字不正确的问题
- 修复了转换pdf到图片,条形码不正确的问题
- 优化了转换pdf到pdfa的内存消耗
- 修复了加载文档抛异常“header checksum illegal"的问题
- 修复了提取文本内容不完整的问题
- 修复了添加的checkbox域字体大小不正确的问题
- 优化了添加水印的耗时
- 修复了设置pdfpolylineannotation的线条粗细不起作用的问题
- 修复了提取pdf表格结果不正确的问题
- 修复了从指定矩形区域提取文本,得到的结果不正确的问题
- 修复了转换pdf到图片抛异常“object reference not set to an instance of an object”的问题
spire.doc
新功能:
- 新增setcolumnwidth方法设置表格列宽。
table.setcolumnwidth(int columnindex, float columnwidth, cellwidthtype columnwidthtype);
document doc = new document();
doc.loadfromfile("input.docx");
doc.usenewengine = true;
doc.savetofile("result.pdf", fileformat.pdf);
问题修复:
- 调整设置表格单元格宽度的方法。
//old method
//tablecell.width //deprecated
//tablecell.cellwidthtype //deprecated
//new method
tablecell.setcellwidth(float width, cellwidthtype widthtype);
spire.presentation
新功能:
- 支持获取表格单元格的填充颜色
table.tablerows[i][j].displaycolor;
presentation ppt = new presentation();
ichart chart = ppt.slides[0].shapes.appendchart(charttype.columnstacked, new rectanglef(100, 100, 500, 400));
cellrange cellrange = chart.chartdata["f1"];
cellrange.text = "aaa";
cellrange = chart.chartdata["f2"];
cellrange.text = "bbb";
cellrange = chart.chartdata["f3"];
cellrange.text = "ccc";
cellrange = chart.chartdata["f4"];
cellrange.text = "ddd";
chart.series[0].datalabelranges = chart.chartdata["f1", "f4"];
chartdatalabel datalabel1 = chart.series[0].datalabels.add();
datalabel1.id = 0;
datalabel1.labelvaluevisible = true;
datalabel1.showdatalabelsrange = true;
foreach (animationeffect effect in shape.slide.timeline.mainsequence)
{
if (effect.shapetarget.equals(shape as spire.presentation.shape))
{
motionpath path = ((animationmotion)effect.commonbehaviorcollection[0]).path;
foreach (motioncmdpath motioncmdpath in path)
{
pointf[] points = motioncmdpath.points;
motioncommandpathtype type = motioncmdpath.commandtype;
}
}
}
image image = shape.saveasimage();
table[0, 0].borderleftdisplaycolor;
table[0, 0].bordertopdisplaycolor;
table[0, 0].borderrightdisplaycolor;
table[0, 0].borderbottomdisplaycolor;
问题修复:
- 修复了新增的shape没有默认线宽和颜色的问题
- 修复了ppt转图片不够清晰的问题
- 修复了无法获取主题的背景色的问题
- 修复了转换到图形到图片内容不正确的问题
- 修复了获取到的文字颜色错误的问题
- 修复了插入的圆柱体不正确的问题
- 修复了ppt公式转换后的图片模糊的问题。
- 修复了ppt转pdf时符号丢失的问题。
- 修复了获取的文本字体大小不正确的问题。
- 修复了加载 ppt 文件时抛出“spire.presentation.appexception”的问题。
- 修复了替换文本时抛出“system.nullreferenceexception”的问题。
- 修复了将组合形状转换为图像时抛出“system.argumentexception”的问题。
spire.email
问题修复:
- 修复了将pst文件中提取的电子邮件保存为eml格式时,发件人不正确的问题。