spire.office 6.6已发布。本次更新带来一些新的功能,比如:spire.pdf 支持转换 pdf 为透明背景的图片,同时还支持pdf签名添加时间戳时设置用户名和密码;spire.xls支持转换 excel 到 pdf 时指定字体目录;spire.doc 支持添加跨整个页面的横线等等。同时,该版本还修复了大量已知问题。详情请阅读以下内容。
该版本涵盖了最新版的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.15
- spire.barcode.dll 5.6.0
- spire.email.dll 4.6.0
- spire.dataexport.dll 4.1.9
- spire.pdf.dll 7.6.0
- spire.pdfviewer.forms.dll 6.6.0
- spire.pdfviewer.asp.dll 6.6.0
- spire.doc.dll 9.6.10
- spire.docviewer.forms.dll 6.6.0
- spire.xls.dll 11.6.0
- spire.spreadsheet.dll 5.6.0
- spire.presentation.dll 6.6.2
- spire.officeviewer.forms.dll 6.6.2
https://www.e-iceblue.cn/downloads/spire-office-net.html
spire.pdf
新功能:
- 支持转换pdf为透明背景的图片
pdfdocument doc = new pdfdocument();
doc.loadfromfile("input.pdf");
doc.convertoptions.setpdftoimageoptions(0);
image image = doc.saveasimage(0);
image.save("output.png", imageformat.png);
static void main(string[] args)
{
x509certificate2 x509 = new x509certificate2(inputfile_pfx, password);
pdfdocument doc = new pdfdocument();
doc.loadfromfile(inputfile);
pdfpkcs7formatter formatter = new pdfpkcs7formatter(x509, false);
formatter.timestampservice = new tsahttpservice("http://time.certum.pl");
pdfordinarysignaturemaker signaturemaker = new pdfordinarysignaturemaker(doc, formatter);
ipdfsignatureappearance signatureappearance = new pdfcustomsignatureappearance();
signaturemaker.makesignature("sign", doc.pages[0], 100, 100, 100, 100, signatureappearance);
doc.savetofile(outputfile, fileformat.pdf);
doc.close();
}
public class pdfcustomsignatureappearance : ipdfsignatureappearance
{
public void generate(pdfcanvas g)
{
float fontsize = 10;
pdftruetypefont font = new pdftruetypefont(new font("arial", fontsize), true);
g.drawstring("aaaaaaaaaaa", font, pdfbrushes.red, new pointf(0, 0));
}
}
string url = "http://test1.tsa.cn/tsa";
signature.configuretimestamp(url, "tsademo", "tsademo");
doc.loadfromsvg(stream stream);
问题修复:
- 修复了验证签名是否被修改时返回值不正确的问题
- 修复了加密文档后文档损坏的问题
- 修复了strong和em标签解析不正确的问题
- 修复了pdf转图片,第一页是空白的问题
- 修复了解析html 标签,两个标签之间的空格宽度会比较大的问题
- 修复了转换pdf到svg内容不正确的问题
- 修复了转换svg到pdf内容不正确的问题
- 修复了转换pdf到图片内容不正确的问题
- 修复了添加的数字签名无效的问题
- 修复了添加的数字签名签署时间不正确的问题
- 修复了转换pdf到excel,控制台打印“-------------again”的问题
- 修复了转换xps到pdf的内容不正确的问题
- 修复了打印了pdf结果不正确的问题
- 修复了合并pdf结果文档打开报错的问题
- 修复了.netstandard平台获取的图片位置信息不正确的问题
- 修复了扁平化域后文本位置改变的问题
- 删除了security.permissions的set方法
- 修复了pdfa/3b文档添加数字签名后不符合规范的问题
- 修复了转换pdf到svg结果文档打开报错的问题
spire.xls
新功能:
- 支持判断行或列是否隐藏
sheet.getcolumnishide(columnindex)
sheet.getrowishide(rowindex)
workbook.customfontfiledirectory = new string[] { "./data/font" };
问题修复:
- 修复了转换sheet到html多出下划线的问题
- 修复了转换excel到html结果不正确的问题
- 修复了移除过滤器后内容不正确的问题
- 修复了插入行抛异常“can't insert row”的问题
- 修复了docker环境中转换excel到pdf抛异常“index was out of range"的问题
- 修复了转换chartsheet到图片内容不正确的问题
- 修复了加载xlsx文件抛异常“system.overflowexception”的问题
- 修复了加载xlsx文件抛异常“system.argumentoutofrangeexception”的问题
- 修复了转换excel到pdf,文本换行不正确的问题
- 修复了转换excel到pdf抛异常“input string was not in a correct format”的问题
- 修复了转换图表到图片内容不正确的问题
- 修复了转换excel到pdf页面边距不正确的问题
- 修复了设置125%dpi时,转换excel到图片内容不完整的问题
- 修复了获取到单元格样式不正确的问题
- 修复了转换excel到pdf艺术字被裁剪的问题
- 修复了加载xlsx文档抛异常“invalid cell name”的问题
- 修复了转换excel到svg抛异常“outofrangeexception”的问题
- 修复了转换excel到pdf抛异常“nullreferenceexception”的问题
- 修复了导出excel数据时抛异常“system.data.duplicatenameexception”的问题
spire.doc
新功能:
- 支持添加跨整个页面的横线
document doc = new document();
section section = doc.addsection();
section.addparagraph().appendhorizonalline();
doc.savetofile("result.docx", fileformat.docx);
问题修复:
- 修复了转换word到图片内容不正确的问题
- 修复了添加含有中文的公式不正确的问题
- 修复了邮件合并后数字格式不正确的问题
- 修复了加载保存文档后多出额外字符的问题
- 修复了添加的公式不正确的问题
- 修复了转换word到pdf内容不正确的问题
- 修复了添加的html文本,字母列表未正确解析的问题
- 修复了转换word到pdf表格不正确的问题
- 修复了转换rtf到pdf,图片内容不正确的问题
- 修复了添加的数学公式对齐方式不正确的问题
- 修复了提取word文档文本抛异常“system.argumentoutofrangeexception”的问题
- 修复了加载保存npoi生成的文档,内容不正确的问题
- 修复了保存文档抛异常“system.objectdisposedexception”的问题
- 修复了转换word到pdf多出书签“word bookmarks”的问题
- 修复了转换word到pdf,内容不正确的问题
- 修复了打印word文档,内容不正确的问题
- 修复了转换word到pdf图片丢失的问题
- 修复了转换word到pdf目录不正确的问题
- 修复了转换word到pdf文本内容丢失的问题
- 修复了转换word到pdf分页不正确的问题
- 修复了打印word文档纸张方向不正确的问题
- 修复了加载rtf文档抛异常“system.nullreferenceexception”的问题
- 修复了加载word文档抛异常“system.nullreferenceexception”的问题
spire.presentation
问题修复:
- 修复了加载文档抛异常“shape was not found”的问题
- 修复了拷贝幻灯片后,结果文档的线条格式不正确的问题
- 修复了加载文档抛异常“system.indexoutofrangeexception”的问题
- 修复了替换文本时抛异常“can't assign string which contains paragraph break character“的问题
- 修复了设置艺术字文本效果为拱形时不生效的问题
- 修复了转换ppt到pdf内容不正确的问题
spire.pdfviewer
问题修复:
- 修复了pdf文档打开后乱码的问题
- 修复了pdf文档打开后内容显示不正确的问题
- 修复了pdf文档打开后显示空白的问题
- 修复了放大查看pdf时内容不显示的问题
spire.officeviewer
问题修复:
- 修复了word水印显示不完整的问题