Spire. Office 5.5.1已正式发布。该版本新增加了一些功能,如Spire.PDF支持添加和转换SVG图片到PDF,支持创建PDF Portfolios;Spire.Doc支持获取表格以及表格单元格的对角线边框属性;Spire.XLS支持转换HTML到Excel。与此同时,一些在加载、转换和操作PDF、Word、Excel文档时出现的问题也得以成功解决。新功能及问题修复详情如下。
该版本涵盖了最新版的Spire.Doc、Spire.PDF、Spire.XLS、Spire.Presentation、Spire.DataExport、Spire.Barcode、Spire.DocViewer、Spire.PDFViewer、Spire.OfficeViewer、Spire.Email。
版本信息如下:
- Spire.Doc.dll v8.5.4
- Spire.Pdf.dll v6.5.9
- Spire.XLS.dll v10.5.7
- Spire.Email.dll v3.3.0
- Spire.DocViewer.Forms.dll v5.1.1
- Spire.PdfViewer.Forms.dll v5.1.4
- Spire.PdfViewer.Asp.dll v5.1.4
- Spire.Presentation.dll v5.5.1
- Spire.Spreadsheet v4.3.3
- Spire.OfficeViewer.Forms.dll v5.5.1
- Spire.Barcode.dll v4.5.0
- Spire.DataExport.dll v4.1.9
- Spire.DataExport.ResourceMgr.dll v2.1.0
- Spire.Common.dll v10.5.7
- Spire.License.dll v1.3.8
https://www.e-iceblue.cn/Downloads/Spire-Office-NET.html
Spire.PDF
新功能:
- 支持添加SVG图片到PDF。
PdfDocument doc1 = new PdfDocument();
doc1.LoadFromSvg(inputFile_svg);
PdfDocument doc2 = new PdfDocument();
doc2.LoadFromFile(inputFile_pdf);
PdfTemplate template = doc1.Pages[0].CreateTemplate();
template.Draw(doc2.Pages[0].Canvas, new PointF());
doc2.SaveToFile(outputFile, FileFormat.PDF);
PdfDocument doc = new PdfDocument();
doc.LoadFromSvg("test.svg");
doc.SaveToFile("result.pdf", FileFormat.PDF);
String[] files = new String[] { "File1.pdf", "File2.pdf" };
using (PdfDocument doc = new PdfDocument())
{
for (int i = 0; i < files.Length; i++)
{
doc.Collection.AddFile(files[i]);
}
doc.SaveToFile("output.pdf", FileFormat.PDF);
doc.Dispose();
}
//创建子文件夹并向其添加文件
string[] files = Directory.GetFiles(@"input/");
string inputFile_1 = "input.pdf";
using (PdfDocument doc = new PdfDocument(inputFile_1))
{
for (int i = 0; i < files.Length; i++)
{
doc.Collection.Folders.AddFile(files[i]);
PdfFolder folder = doc.Collection.Folders.CreateSubfolder("SubFolder" + i);
folder.AddFile(files[i]);
}
doc.SaveToFile("output.pdf", FileFormat.PDF);
doc.Dispose();
}
问题修复:
- 优化了查找文本内存增长问题。
- 修复了转换PDF到Word文本位置不正确的问题。
- 修复了提取的文本内容不正确的问题。
- 修复了不能在XFASignatureField 已有域上签名的问题。
- 修复了获取的多变形注释位置不正确的问题。
- 修复了提取文本抛出"Invalid/Unknown/Unsupported format"异常的问题。
- 修复了不能获取文档中的矩形注释的问题。
- 修复了指定区域提取的文本内容不正确的问题。
- 修复了填充TextBoxField表单间距不正确的问题。
- 修复了Excel转PDF,生成的PDF文档在Adobe中显示不正确的问题。
- 修复了在打印文档时抛异常“Index was outside the bounds of the array” 的问题。
- 修复了给文本域设置 “ReadOnly” 后在Adobe中显示不正确的问题。
- 修复了在提取文本时抛 “NullReferenceException” 的问题。
- 修复了在获取使用的字体时抛异常 “Value cannot be null” 的问题。
- 修复了在验证文档是否被修改时抛异常“Signature ‘FPZYZ’ failed to verified”的问题。
Spire.Doc
新功能:
- 支持获取表格以及表格单元格的对角线边框属性。
//获取表格的对角线属性
BorderStyle bs_UP = table.TableFormat.Borders.DiagonalUp.BorderType;
Color color_UP = table.TableFormat.Borders.DiagonalUp.Color;
float width_UP = table.TableFormat.Borders.DiagonalUp.LineWidth;
BorderStyle bs_Down = table.TableFormat.Borders.DiagonalDown.BorderType;
Color color_Down = table.TableFormat.Borders.DiagonalDown.Color;
float width_Down = table.TableFormat.Borders.DiagonalDown.LineWidth;
//获取表格单元格的对角线属性
bs_UP = table[rowIndex, columnIndex].CellFormat.Borders.DiagonalUp.BorderType;
width_UP = table[rowIndex, columnIndex].CellFormat.Borders.DiagonalUp.LineWidth;
color_UP = table[rowIndex, columnIndex].CellFormat.Borders.DiagonalUp.Color;
bs_Down = table[rowIndex, columnIndex].CellFormat.Borders.DiagonalDown.BorderType;
color_Down = table[rowIndex, columnIndex].CellFormat.Borders.DiagonalDown.Color;
width_Down = table[rowIndex, columnIndex].CellFormat.Borders.DiagonalDown.LineWidth;
问题修复:
- 修复了Word转到PDF内容不正确的问题。
- 修复了Word转到图片抛异常"未将对象引用设置到对象的实例"的问题。
- 修复了插入HTML文本导致域的结构被破坏的问题。
- 修复了加载文档抛异常“输入的字符串格式不正确”的问题。
- 修复了插入Advance域存在额外的双引号的问题。
- 修复了插入HTML文本抛异常“索引超出范围”的问题。
- 修复了更新域后保存文档抛异常“mscorlib.dll中发生了'System.StackOverflowException'类型的未处理异常”的问题。
Spire.XLS
新功能:
- 新增LoadFromHtml 和 LoadFromMHtml 方法支持转换HTML到Excel。
workbook.LoadFromHtml(string fileName);
workbook.LoadFromHtml(Stream stream);
workbook.LoadFromMHtml(string fileName);
workbook.LoadFromMHtml(Stream stream);
问题修复:
- 修复了转换Excel到PDF,图片变成黑屏的问题。
- 修复了加载文件抛异常ArgumentOutOfRangeException的问题。
- 修复了转换Excel到PDF右边距不正确的问题。
- 修复了加载文件抛异常FormatException的问题。
- 修复了转换Excel到PDF文本换行不正确的问题。
- 修复了转换Excel到HTML,透视表样式丢失的问题。
- 修复了转换Excel到PDF时根据透视表创建的图表数据更新不正确的问题。
- 修复了转换XML到Excel,网格丢失的问题。
- 修复了当使用自定义打印尺寸进行打印时,内容被缩小的问题。
- 修复了转换xltx 到PDF时内容不正确的问题。
- 修复了加载文件抛异常NullReferenceException的问题。
- 修复了转换excel到PDF时边框格式改变的问题。
- 修复了加载文件抛异常ArgumentNullException的问题。