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格式时,发件人不正确的问题。