spire.office 6.8.2已发布。本次更新带来了许多出色的新功能,比如:spire.presentation支持加载保存 dps/dpt 格式的文档,支持设置ppt中图表的边框样式为直角,同时还支持设置图表坐标轴的刻度线间隔;spire.pdf 支持转换 pdf 到 ofd,支持给数字签名添加有效性检查标记,以及支持添加不可见的数字签名的功能;spire.xls 支持转换 smartart/shape 为图片;spire.barcode 支持获取条码在图片中的位置和条码类型等等。此外,该版本还修复了大量已知的问题。详情请阅读以下内容。
该版本涵盖了最新版的spire.doc, spire.pdf, spire.xls, spire.presentation, spire.email, spire.docviewer, spire.pdfviewer, spire.spreadsheet, spire.officeviewer, spire.dataexport, spire.barcode。
版本信息如下:
- spire.pdf.dll v7.8.9
- spire.xls.dll v11.8.4
- spire.email.dll v4.7.0
- spire.docviewer.forms.dll v6.6.0
- spire.pdfviewer.forms.dll v6.8.4
- spire.pdfviewer.asp.dll v6.8.4
- spire.presentation.dll v6.8.4
- spire.spreadsheet v5.6.1
- spire.officeviewer.forms.dll v6.8.2
- spire.barcode.dll v5.7.1
- 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.doc
问题修复:
- 修复了转换word到pdf内容不正确的问题
- 修复了转换word到pdf,图片位置改变的问题
- 修复了加载保存后限制区域丢失的问题
- 修复了转换word到pdf抛异常“argumentoutofrangeexception”的问题
- 修复了转换word到pdf,表格边框显示不正确的问题
- 修复了替换书签内容抛异常“stackoverflowexception”的问题
- 修复了转换word到pdf程序挂起的问题
- 修复了转换word到pdf抛异常“invalidcastexception”的问题
- 修复了邮件合并域没有正确合并的问题
- 修复了转换word到pdf,生成的书签缺少列表编号的问题
- 修复了比较文档时抛异常“stackoverflowexception”的问题
- 修复了转换rtf到pdf,页面背景丢失的问题
- 修复了加载文档抛异常“argumentoutofrangeexception”的问题
- 修复了转换word到pdf抛异常“argumentoutofrangeexception”的问题
- 修复了转换word到图片,分页不正确的问题
- 修复了转换word到pdf,分页不正确的问题
- 修复了转换html到pdf抛异常“invalid date string, after time”的问题
- 修复了转换word到pdf,结果文档打开提示内容错误的问题
- 修复了转换html到pdf,表格的“title”属性没有正确解析的问题
- 修复了更新目录抛异常“keynotefoundexception”的问题
- 修复了加载文档抛异常“argumentoutofrangeexception”的问题
- 修复了转换word到pdf抛异常“invalid date string, after time”的问题
- 修复了转换word到图片程序挂起的问题
spire.pdf
新功能:
- 支持转换pdf到ofd
pdfdocument doc = new pdfdocument();
doc.loadfromfile(pdffile);
doc.savetofile(ofdfile, fileformat.ofd
pdfdocument doc = new pdfdocument();
doc.loadfromfile(inputpath);
pdfcertificate cert = new pdfcertificate(pfxpath, password);
pdfordinarysignaturemaker signaturemaker = new pdfordinarysignaturemaker(doc, cert);
signaturemaker.setacro6layers(false);
signaturemaker.makesignature("signname", doc.pages[0], 100, 100, 120, 60);
doc.savetofile(outputpath);
pdfdocument doc = new pdfdocument();
doc.loadfromfile(inputpath);
pdfcertificate cert = new pdfcertificate(pfxpath, password);
pdfordinarysignaturemaker signaturemaker = new pdfordinarysignaturemaker(doc, cert);
pdfsignature signature = signaturemaker.signature;
signature.name = "e-iceblue";
signature.contactinfo = "028-81705109";
signature.location = "chengdu";
signature.reason = "the certificate of this document";
pdfsignatureappearance appearance = new pdfsignatureappearance(signature);
appearance.namelabel = "signer: ";
appearance.contactinfolabel = "contactinfo: ";
appearance.locationlabel = "location: ";
appearance.reasonlabel = "reaseon: ";
appearance.signatureimage = pdfimage.fromfile(imagepath);
appearance.graphicmode = graphicmode.signimageandsigndetail;
signaturemaker.makesignature("signname", doc.pages[0], 100, 600, 200, 100, appearance);
doc.savetofile(outputpath);
pdfordinarysignaturemaker signaturemaker = new pdfordinarysignaturemaker(doc, x509);
signaturemaker.makesignature("signname");
问题修复:
- 修复了insert方法插入的页面位置错误的问题
- 修复了打印文档抛异常“system.componentmodel.win32exception”的问题
- 修复了转换pdf到svg内容丢失的问题
- 修复了转换pdf到图片内容不正确的问题
- 修复了查找文本失败的问题
- 修复了转换pdf到pdfa1b,内容不正确的问题
- 修复了打印pdf时,打印队列中的文件过大的问题
- 优化了加密文档的耗时
- 修复了转换xps到pdf,某些字符没有正确转换的问题
- 修复了查找文本抛异常“system.nullreferenceexception”的问题
- 修复了转换pdf到图片抛异常“object reference not set to an instance of an object”的问题
- 修复了合并文档抛异常“object reference not set to an instance of an object”的问题
- 修复了添加附件后,附件名称不正确的问题
- 修复了插入页面时多出额外页面的问题
- 修复了提取文本乱码的问题
- 修复了获取自定义属性耗时太长的问题
- 修复了提取文本结果不正确的问题
- 修复了合并文档抛异常“system.argumentnullexception”的问题
- 修复了合并文档抛异常“system.formatexception”的问题
- 修复了插入页面时程序挂起的问题
- 修复了验证签名结果不正确的问题
- 修复了验证签名抛异常“argumentexception”的问题
- wpf平台支持转换pdf到word
- 修复了转换pdf到图片结果不正确的问题
- 修复了打印pdf抛异常“indexoutofrangeexception”的问题
- 修复了转换pdf到图片抛异常“indexoutofrangeexception”的问题
- 修复了对文件加密后图片背景色改变的问题
- 修复了使用createtemplate绘制模板,结果文档内容丢失的问题
- 修复了转换pdf到图片抛异常“stackoverflowexception”的问题
- 优化了填充表单和合并文档的耗时
- 修复了打印结果不正确的问题
- 修复了打印pdf时,打印队列中的文件过大的问题
- 修复了转换pdf到图片抛异常“outofmemoryexception”的问题
- 修复了拆分pdf文件,结果文档过大的问题
- 修复了提取文本抛异常“nullreferenceexception”的问题
- 修复了调用appendpage方法抛异常“nullreferenceexception”的问题
- 修复了打印pdf抛异常“nullreferenceexception”的问题
- 修复了转换pdf到svg抛异常“argumentexception”的问题
- 修复了添加附件mime type不正确的问题
spire.presentation
新功能:
- 支持加载保存dps/dpt格式的文档
ppt.savetofile(outputpath filename ".dps", fileformat.dps);
ppt.savetofile(outputpath filename ".dpt", fileformat.dpt);
ichart chart = ppt.slides[0].shapes[0] as ichart;
itrendlines trendline = chart.series[0].trendlines[0] as itrendlines;
foreach(textparagraph para in trendline.trendlinelabel.textframeproperties.paragraphs)
{
para.defaultcharacterproperties.fontheight = 20;
foreach(textrange range in para.textranges)
{
range.fontheight = 20;
}
}
trendline.trendlinelabel.offsetx = -0.1f;
trendline.trendlinelabel.offsety = 0.1f;
ichart chart = ppt.slides[0].shapes[0] as ichart;
chart.line.fillformat.filltype = fillformattype.solid;
chart.line.fillformat.solidfillcolor.color = color.red;
chart.borderroundedcorners = false;
regex regex = new regex("^[a-za-z] $");
string newvalue = "new string";
foreach(ishape shape in ppt.slides[0].shapes)
{
shape.replacetextwithregex(regex, newvalue);
}
presentation ppt = new presentation();
ppt.loadfromfile(intputfile);
ichart chart = ppt.slides[0].shapes[0] as ichart;
ichartaxis chartaxis = chart.primarycategoryaxis;
chartaxis.tickmarkspacing = 30;
ppt.savetofile(outputfile, fileformat.pptx2013);
filestream from_stream = file.openread(inputfile);
presentation presentation = new presentation();
presentation.loadfromstream(from_stream,fileformat.auto, "12345");
presentation.savetofile(outputfile_px, fileformat.pptx2013);
问题修复:
- 解决了在linux环境下,转换ppt到pdf,ole图标消失的问题
- 解决了删除ppt中chart图形的趋势线类型的图例时,程序抛异常的问题
- 解决了设置ppt中图表的图例和坐标轴字体后,生成文档字体应用错误的问题
- 解决了转换ppt到pdf,超链接失效的问题
- 解决了转换ppt到pdf,生成文件多出线条的问题
- 解决了高亮ppt中包含“)”的文本时,程序抛异常的问题
- 修复了转换ppt到pdf,ole图标不正确的问题
spire.xls
新功能:
- 支持转换smartart/shape为图片
workbook workbook = new workbook();
workbook.loadfromfile("sample.xlsx");
worksheet sheet = workbook.worksheets[0];
saveshapetypeoption shapelist = new saveshapetypeoption();
list images = sheet.saveshapestoimage(shapelist);
int index = 0;
foreach (system.drawing.image img in images)
{
img.save("toimage" index ".png", imageformat.png);
index ;
}
workbook wb = new workbook();
wb.loadfromfile(etinputfile);
//wb.loadfromfile(ettinputfile);
wb.savetofile(etoutputfile, fileformat.et);
//wb.savetofile(ettoutputfile, fileformat.ett);
问题修复:
- 修复了转换xlsx到pdf,图表显示不正确的问题
- 修复了转换xls到pdf分页不正确的问题
- 修复了多线程创建多个workbook实例抛异常“argumentexcep”的问题
- 修复了更新透视表后转到pdf内容不正确的问题
- 修复了转换excel到pdf,段落之间有较大的间距的问题
- 修复了转换xls到pdf,公式没有正确计算的问题
- 修复了删除行抛异常“can't delete row because it's in array”的问题
- 修复了转换html到pdf结果乱码的问题
- 修复了copytheme方法未复制主题字体的问题
- 修复了加载xlsx文档抛异常“input string was not in a correct format”的问题
- 修复了转换html到excel,内容不正确的问题
- 修复了转换xls到pdf图片丢失的问题
- 修复了加载文档抛异常“cannot read that as a zpifile”的问题
- 优化了插入datatable的耗时
spire.barcode
新功能:
- 支持获取条码在图片中的位置和条码类型。
barcodeinfo[] barcodeinfos = barcodescanner.scaninfo(imagefile);
//barcodeinfo[] barcodeinfos = barcodescanner.scaninfo(imagefile, barcodetype);
for (int i = 0; i < barcodeinfos.length; i )
{
//获取条码位置
barcodereadtype barcodereadtype = barcodeinfos[i].barcodereadtype;
//获取条码四个顶点的坐标
point[] vertexes = barcodeinfos[i].vertexes;
}
问题修复:
- 修复了扫描图片程序挂起的问题。
- 修复了扫描结果不正确的问题。
spire.email
问题修复:
- 修复了使用筛选条件语句查询邮件时, 程序报错"system.invalidoperationexception"的问题