Spire.Office 7.7.2 已发布。该版本进行了一些功能更新,如:Spire.PDF 支持加载OFD文件流,并且在WPF程序集中添加了接口支持设置打印选项;Spire.Doc 支持用新引擎转换 Word 到 PDF 时,将 Word 的目录转换为 PDF 中对应的书签以及取消文档中的超链接;Spire.XLS 提供接口支持设置是否应用样式到行和列。此外,此版本还修复了许多已知问题。详情请阅读以下内容。
该版本涵盖了最新版的Spire.Doc,Spire.PDF,Spire.XLS,Spire.Email,Spire.DocViewer, Spire.PDFViewer,Spire.Presentation,Spire.Spreadsheet, Spire.OfficeViewer, Spire.DocViewer, Spire.Barcode, Spire.DataExport。
版本信息如下:
- Spire.Doc.dll v10.7.3
- Spire.Pdf.dll v8.7.2
- Spire.XLS.dll v12.6.1
- Spire.Email.dll v5.6.0
- Spire.DocViewer.Forms.dll v7.6.0
- Spire.PdfViewer.Forms.dll v7.6.0
- Spire.PdfViewer.Asp.dll v7.6.0
- Spire.Presentation.dll v7.7.1
- Spire.Spreadsheet.dll v6.6.1
- Spire.OfficeViewer.Forms.dll v7.7.2
- Spire.Barcode.dll v6.6.0
- Spire.DataExport.dll v4.5.0
- Spire.DataExport.ResourceMgr.dll v2.1.0
https://www.e-iceblue.cn/Downloads/Spire-Office-NET.html
Spire.PDF
新功能:
- 支持设置PDFLineAnnotation的作者和主题。
- 支持设置复选框的ForeColor属性。
- 调整了查找文本的接口find.ApplyHighLight()为 find.HighLight(),且此方法改善了高亮效果
- 支持创建tagged结构PDF
- 支持加载OFD文件流。
- 在WPF程序集中添加了接口支持设置打印选项。
if (annotation is PdfLineAnnotationWidget)
{
PdfLineAnnotationWidget lineAnn = annotation as PdfLineAnnotationWidget;
//PdfLineAnnotation lineAnn = annotation as PdfLineAnnotation;
lineAnn.Author = "Author_test";
lineAnn.Subject = "Subject_test";
}
checkboxField.ForeColor = new PdfRGBColor(Color.Red);
PdfStringFormat format = new PdfStringFormat();
PdfTrueTypeFont font = new PdfTrueTypeFont(new System.Drawing.Font("Times New Roman", 10));
PdfPen pen = PdfPens.Black;
PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
PdfDocument doc = new PdfDocument("HelloWord.pdf");
PdfLogicalStructure tree = PdfLogicalStructure.CreateLogicalStructure(doc);
PdfStructureElement article = tree.AppendChildElement(PdfStandardStructTypes.Article);
article.Title = "create tagged pdf";
PdfStructureElement paragraph1 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
paragraph1.Title = "text paragraph1";
int mcid = 0;
paragraph1.BeginMarkedContentSequence(doc.Pages[0].Canvas, "paragraph1", mcid);
doc.Pages[0].Canvas.DrawString("paragraph1: PDF’s logical structure facilities (PDF 1.3) provide a mechanism for " +
"incorporating structural information about a document’s content into a PDF file. Such information might include, " +
"for example, the organization of the document into chapters and sections or the identification of special elements " +
"such as figures, tables, and footnotes. The logical structure facilities are extensible, allowing applications that " +
"produce PDF files to choose what structural information to include and how to represent it, while enabling PDF " +
"consumers to navigate a file without knowing the producer’s structural conventions.",
font, pen, brush, new Rectangle(40, 200, 480, 80), format);
paragraph1.EndMarkedContentSequence(doc.Pages[0].Canvas);
paragraph1.ReferenceContent(doc.Pages[0], mcid);
PdfStructureElement paragraph2 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
paragraph2.Title = "text paragraph2";
mcid = 1;
paragraph2.BeginMarkedContentSequence(doc.Pages[0].Canvas, "paragraph2", mcid);
doc.Pages[0].Canvas.DrawString("paragraph2: PDF logical structure shares basic features with standard document markup languages" +
" such as HTML, SGML, and XML. A document’s logical structure is expressed as a hierarchy of structure elements, each" +
" represented by a dictionary object. Like their counterparts in other markup languages, PDF structure elements can" +
" have content and attributes. In PDF, rendered document content takes over the role occupied by text in HTML, SGML, and XML.",
font, pen, brush, new Rectangle(40, 280, 480, 60), format);
paragraph2.EndMarkedContentSequence(doc.Pages[0].Canvas);
paragraph2.ReferenceContent(doc.Pages[0], mcid);
doc.SaveToFile("Tagged.pdf");
Stream stream = File.OpenRead(inputFile);
OfdConverter converter = new OfdConverter(stream);
MemoryStream ms = new MemoryStream();
converter.ToPdf(ms);
PdfDocument.Print(PdfPrintSettings printSettings)
问题修复:
- 修复了打印PDF,域值不正确的问题。
- 提高了转换PDF到图片的时间。
- 修复了获取XFA域值失败的问题。
- 优化了操作PDF文档的内存消耗以及结果文档大小。
- 修复了查找含有上标的文本失败的问题。
- 修复了转换PDF到图片,程序抛异常“post table issue”。
- 修复了替换PDF中的图片不正确的问题。
- 修复了删除图片不正确的问题。
- 修复了转换PDF到图片格式不正确的的问题。
- 修复了查找垂直文本失败的问题。
- 修复了转换OFD到PDF,文本间隔不正确的问题。
- 修复了填充图片到PDFButton域,程序抛空指针异常。
- 修复了转换OFD到PDF流,PDFViewer加载流报错的问题。
- 同步JAVA中的cell.getStyle().setCellPadding接口(设置某个单元格的内边距)到.NET。
- 修复了打印PDF,字符不正确的问题。
- 修复了设置grid的换行格式不生效的问题。
- 修复了转换OFD到PDF,图章尺寸变大的问题。
- 修复了转换使用QT插件转换HTML到PDF,程序抛插件找不到的问题。
- 修复了转换SVG到PDF,图片丢失的问题。
- 修复了转换OFD到PDF,图章丢失的问题。
- 修复了添加文本到grid,文本重叠的问题。
- 修复了转换到PdfX1A2001不符合规范的问题
- 修复了转换PDF到图片,程序抛“Object reference not set to an instance of an object.”异常。
- 修复了转换PDF到图片,二维码模糊的问题。
- 修复了转换XPS到PDF,内容丢失的问题。
- 优化了发送到打印机的时间。
- 修复 了打印PDF后,条码无法扫描的问题。
- 修复了跨行文本查找失败的问题。
- 修复了转换PDF到图片,二维码模糊的问题。
- 修复了转换PDF到图片,二维码不正确的问题。
- 修复了转换PDF到OFD,程序抛异常“NullReferenceException”。
- 修复了转换PDF层到图片,结果不正确的问题。
- 修复了打印文档,页码丢失的问题。
- 修复了转换PDF到OFD,不可见内容转换失败的问题。
- 修复了合并PDF,程序抛“NullReferenceException”的问题。
- 修复了转换PDF到图片,程序抛“ArgumentNullException”的问题。
- 修复了压缩PDF,程序抛“IndexOutOfRangeException”的问题。
- 修复了转换PDF到图片,内容丢失的问题。
- 修复了将有密码保护的PDF保存到流,重新加载抛异常“can not open an encrypted document, The password is invalid”。
Spire.Doc
新功能:
- 使用新引擎方式转换Word到PDF时,支持将Word的目录转换为PDF中对应的书签。
- 使用新引擎方式转换Word到PDF时,支持关闭文档中的超链接。
ToPdfParameterList toPdf = new ToPdfParameterList();
toPdf.CreateWordBookmarks = true;
toPdf.CreateWordBookmarksUsingHeadings = true;
document.setUseNewEngine(true);
document.saveToFile("output.pdf",toPdf);
ToPdfParameterList toPdf = new ToPdfParameterList();
toPdf.DisableLink = true;
document.setUseNewEngine(true);
document.saveToFile("output.pdf",toPdf);
问题修复:
- 修复了HTML转Docx后,表格边框颜色丢失的问题。
- 修复了Word转PDF后,标题前多出空行的问题。
- 修复了Word转PDF后,表格分页错误的问题。
- 修复了在法语区域设置下,Word转PDF抛出"System.FormatException"异常的问题。
- 修复了在保存Docx文件后,图片链接失效的问题。
- 修复了替换段落文本后,瀑布图表显示为空的问题。
- 修复了加载Docx文档时抛出“System.ArgumentOutOfRangeException”异常的问题。
- 修复了Word转PDF后,内容格式不一致的问题。
- 修复了保存文档后,瀑布图表变为图片类型的问题。
- 修复了保存Docx文档时抛出“System.Collections.Generic.KeyNotFoundException”异常的
Spire.XLS
新功能:
- 提供接口支持设置是否应用样式到行和列。
- 支持了转换Excel2016中新的图表类型如瀑布图, 树状图和箱须图到PDF和图片。
worksheet.ApplyStyle(style, applyRowStyle, applyColumnStyle)
问题修复:
- 修复了转Excel到PDF,自定义格式的单元格内容效果不正确的问题。
- 修复了内容包含回车的页眉,在转换到PDF后,页眉高度不正确的问题。
- 修复了拷贝sheet, 图片按钮和宏的关联丢失的问题。
- 修复了转换Excel到PDF,透视表数据不正确的问题。
- 修复了插入图片到Excel,新版本效果模糊的问题。
- 修复了获取非连续区域的名称管理器失败的问题。
Spire.Presentation
问题修复:
- 修复了插入HTML到PPT时程序抛出“ArgumentOutOfRangeException”异常的问题。
- 修复了获取形状的填充颜色不正确的问题。
Spire.Spreadsheet
问题修复:
- 修复了加载Excel文档时出现“NullReferenceException”错误的问题。
- 修复了新增和删除行,结果不正确的问题。
Spire.Barcode
问题修复:
- 修复了在二维码中添加长方形图片,变为正方形的问题。
- 修复了Spire识别二维码的数据与手机识别的数据不一致的问题。