spire.office 6.2.1已发布。本次更新带了一些新的功能,譬如:spire.pdf 支持检测 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 9.2.4
- spire.pdf.dll 7.2.6
- spire.xls.dll 11.2.3
- spire.email.dll 4.1.2
- spire.docviewer.forms.dll 6.1.0
- spire.pdfviewer.forms.dll 6.1.1
- spire.pdfviewer.asp.dll 6.1.1
- spire.presentation.dll 6.2.2
- spire.spreadsheet 5.2.0
- spire.officeviewer.forms.dll 6.2.1
- spire.barcode.dll 5.1.4
- spire.dataexport.dll 4.1.9
- spire.dataexport.resourcemgr.dll 2.1.0
- spire.license.dll 1.3.8
https://www.e-iceblue.cn/downloads/spire-office-net.html
spire.pdf
新功能:
- 支持转换pdf为灰度文档
pdfgrayconverter convert = new pdfgrayconverter(inputfile);
convert.tograypdf(outputfile);
pdfdocument.ispasswordprotected(inputfile);
public custompkcs7signatureformatter(x509certificate2 certificate)
{
if (null == certificate)
{ throw new argumentnullexception("certificate"); }
m_certificate = certificate;
parameters.add("filter", "adobe.ppkms");
parameters.add("subfilter", "adbe.pkcs7.detached");
parameters.add("signaturelength", 975);
parameters.add("softwaremodulename", "create by spire.pdf");
}
pdftextreplacer ptr = new pdftextreplacer(page);
ptr.replacealltext("london midland", "west midlands railway");//全部替换
ptr.replacetext("london midland", "west midlands railway");//仅替换一个
问题修复:
- 修复了加载xps文档抛异常“there is an error in xml document”的问题
- 修复了转换pdf到图片内容不正确的问题
- 修复了打印pdf内容丢失的问题
- 修复了打印pdf边框丢失的问题
- 修复了转换pdf到doc乱码的问题
- 修复了合并文档后,扁平化表单时抛异常“keynotfoundexception”的问题
- 修复了创建的pdfgotoaction跳转位置不正确的问题
- 修复了pdf转svg图片变得不透明的问题
- 修复了多次签名仅最后一次有效的问题
- 修复了设置两端对齐结果不正确的问题
- 修复了生成的结果文档在adobe中打开显示不正确的问题
- 修复了在fips模式下给文档加密时抛异常“document encryption is not allowed in fips mode”的问题
- 修复了绘制grid不正确的问题
- 修复了添加svg到pdf中内容不正确的问题
- 修复了pdf被压缩后图片发生旋转的问题
- 修复了打印pdf抛异常“索引超出了数组界限”的问题
- 修复了转pdf/a-3b,结果文档在福昕阅读器中未被识别的问题
- 修复了加入图片后图片大小和位置都不正确的问题
- 修复了转换pdf到图片程序抛出了argumentexception的问题
- 修复了转换xps到pdf一些字符丢失的问题
- 修复了绘制图片到pdf图片变成黑色的问题
- 修复了插入不同尺寸的页面到pdf文档输出结果不正确的问题
- 修复了执行page.createtemplate()时程序抛“the index can not be less then zero or greater then count”的问题
- 修复了绘制透明图片到pdf图片底色变成黑色的问题
spire.presentation
新功能:
- 支持了替换视频文件的功能
presentation ppt= new presentation();
ppt.loadfromfile(inputfile);
videocollection videos = ppt.videos;
foreach (islide sld in ppt.slides)
{
foreach (spire.presentation.shape sp in sld.shapes)
{
if (sp is ivideo)
{
ivideo video = sp as ivideo;
byte[] bts = file.readallbytes("c:/test.mp4");
videodata videodata = videos.append(bts);
video.embeddedvideodata = videodata;
}
}
}
ppt.savetofile(outputfile, fileformat.pptx2013);
问题修复:
- 修复了删除视频所在的shape后保存的pptx文件打开失败的问题
- 修复了多线程下转换ppt文档到图片时图表中的数据标签文本错乱的问题
- 修复了替换smartart中的图片时程序抛 nullreferenceexception 异常的问题
- 修复了加载ppt文件程序抛出 “an object reference is not set to an instance of the object” 的问题
- 修复了复制包含项目符号列表的段落到新的幻灯片时项目符号显示错误的问题
- 修复了添加html文本时程序抛 “{"rgb(255 is not a valid value for int32. (parameter 'htmlcolor')"}” 的问题
- 修复了合并两个pptx文档结果文档很大的问题
spire.doc
问题修复:
- 修复了转换word到pdf内容不一致的问题
- 修复了转换word到pdf链接丢失的问题
- 修复了转换word到pdf时抛“system.nullreferenceexception”的问题
- 修复了加载带密码的docx文档抛“system.exception: 'invalid data'”的问题
- 修复了加载doc文档抛“system.invalidoperationexception”的问题
- 修复了转换word到pdf时抛“system.formatexception”的问题
- 修复了加载docx文档抛“system.formatexception'”的问题
- 修复了加载docx文档抛“system.argumentoutofrangeexception”的问题
- 修复了转换word到pdf时签名图片消失的问题
spire.xls
问题修复:
- 修复了修改多个sheet背景颜色后转换图片时只有第一个sheet生效的问题
- 修复了添加char码值到单元格后打开文档失败的问题
- 修复了拷贝图表时程序抛system.nullreferenceexception异常的问题
- 修复了转换excel到pdf程序抛system.stackoverflowexception异常的问题
- 修复了加载xlsx文档程序抛system.nullreferenceexception异常的问题
- 修复了加载xlsx文件程序抛出system.argumentnullexception异常的问题
- 修复了转换excel到pdf换行不一致的问题
- 修复了计算透视表数据时程序抛system.argumentexception异常的问题
- 修复了获取单元格数据类型不正确的问题
- 修复了转换excel到pdf文档大小增加到20倍的问题
- 修复了竖行排版的文本设置了自动换行后转换到pdf和图片时内容没有换行导致文本显示不完整
- 修复了转换excel到pdf文档内容显示不完整的问题
- 修复了生成的.ods文档图表排版不正确的问题
- 修复了转换excel到pdf和图片时竖行排版的文本的居中对齐格式丢失的问题
- 修复了保存文档后背景图片颜色变成黑色的问题
- 修复了转换xlsm转pdf内容不正确的问题
- 修复了拷贝下拉列表失败的问题