Spire.Office 6.12.1已发布。本次更新带来了一些新的功能,例如:Spire.PDF 新增了 .NET 6.0 以及解密 PDF 方法,支持了获取附件所在的 PDF 页面。此外,该版本还修复了大量已知的问题。详情请阅读以下内容。
该版本涵盖了最新版的 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.12.3
 - Spire.Pdf.dll v7.12.1
 - Spire.XLS.dll v11.12.0
 - Spire.Email.dll v4.12.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.12.1
 - Spire.Spreadsheet v5.10.0
 - Spire.OfficeViewer.Forms.dll v6.12.1
 - 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.PDF
新功能:
- 新增.NET 6.0
 - 新增了解密PDF方法
 
pdf.Security.DecryptOwnerPassWord(string ownerPassword);
pdf.Security.DecryptUserPassWord();
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(input);
int pageIndex = GetAttachmentPage(doc.Pages, attachmentName);
private int GetAttachmentPage(Spire.Pdf.Widget.PdfPageCollection pageCollection, string fileName)
{
    if (string.IsNullOrEmpty(fileName))
    {
        throw new ArgumentException("fileName is null or empty");
    }
    for (int i = 0; i < pageCollection.Count; i++)
    {
        PdfPageBase page = pageCollection[i];
        for (int j = 0; j < page.AnnotationsWidget.Count; j++)
        {
            Spire.Pdf.Annotations.PdfFileLinkAnnotationWidget pdfFileLinkAnnotationWidget = page.AnnotationsWidget[j] as Spire.Pdf.Annotations.PdfFileLinkAnnotationWidget;
            if (pdfFileLinkAnnotationWidget != null)
            {
                if (fileName.Equals(pdfFileLinkAnnotationWidget.FileName))
                {
                    return i;
                }
            }
        }
    }
    return -1;
}
问题修复:
- 修复了加载含加密口令PDF文档失败的问题
 - 修复了转换出的图片内容不正确的问题
 - 修复了转换出的XPS内容不正确的问题
 - 修复了在.NETCore平台上将透明的TIFF绘制到PDF时结果文档中TIFF有白色背景问题
 - 修复了转换XPS到PDF内容不一致的问题
 - 修复了删除PDF文件中的图片结果文档变大的问题
 - 修复了转换PDF到OFD结果文档右边出现空白部分的问题
 - 修复了包含“-”的单词的PDF文档转换到SVG内容不正确的问题
 - 修复了转换PDF到图片程序抛System.NullReferenceException异常的问题
 - 修复了打印PDF程序抛System.NullReferenceException异常的问题
 - 修复了设置文本高亮显示失败的问题
 
Spire.Doc
问题修复:
- 修复了转换HTML到Docx时内容不一致的问题
 - 修复了转换Word到PDF时程序报System.IndexOutOfRangeException的问题
 - 修复了复制内容到新的文档可编辑区域消失的问题
 - 修复了转换Word到PDF内容丢失的问题
 - 修复了在Windows10系统下转换Word到XPS程序抛System.NullReferenceException的问题
 - 修复了转换Html到Word时表格的宽度不正确的问题
 - 修复了转换HTML到Word时公式显示不正确的问题
 







