Spire.Office 8.9.2 is released

2023-09-08 08:02:47

We are happy to announce the release of Spire.Office 8.9.2. In this version, Spire.Doc exposes the AllowOverlap and BehindText properties under the ShapeObject object; Spire.PDF supports setting page margins when printing and adds a new method to determine if a document is encrypted without loading the document; Spire.XLS supports adding signature lines, getting shapes in sheets and customizing the paper size without scaling the content during printing; Spire.Presentation supports highlighting replaced text. Besides, a lot of known issues are fixed successfully in this version. More details are listed below.

In this version, the most recent versions of Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Email, Spire.DocViewer, Spire.PDFViewer, Spire.Spreadsheet, Spire.OfficeViewer, Spire.DataExport, Spire.Barcode are included.

DLL Versions:

  • Spire.Doc.dll v11.8.22
  • Spire.Pdf.dll v9.9.3
  • Spire.XLS.dll v13.8.14
  • Spire.Presentation.dll v8.8.4
  • Spire.Email.dll v6.8.0
  • Spire.DocViewer.Forms.dll v8.7.0
  • Spire.PdfViewer.Forms.dll v7.12.0
  • Spire.PdfViewer.Asp.dll v7.12.0
  • Spire.Spreadsheet.dll v7.4.2
  • Spire.OfficeViewer.Forms.dll v8.9.2
  • Spire.Barcode.dll v7.2.1
  • Spire.DataExport.dll v4.9.0
  • Spire.DataExport.ResourceMgr.dll v2.1.0.
Click the link to get the version Spire.Office 8.9.2:
More information of Spire.Office new release or hotfix:

Here is a list of changes made in this release

Spire.Doc

Category ID Description
New feature SPIREDOC-9057 Supports converting math formulas to OfficeMathMLCode.
    Document doc = new Document();
            doc.LoadFromFile("1.docx");
            StringBuilder stringBuilder = new StringBuilder();

            foreach (Section section in doc.Sections)
            {
                foreach (Paragraph par in section.Body.Paragraphs)
                {
                    foreach (DocumentObject obj in par.ChildObjects)
                    {
                        OfficeMath omath = obj as OfficeMath;
                        if (omath == null) continue;
                        string mathml = omath.ToOfficeMathMLCode();
                        stringBuilder.Append(mathml);
                        stringBuilder.Append("\r\n");
                    }
                }
            }
            File.WriteAllText("1.txt", stringBuilder.ToString());
            doc.Close();
New feature SPIREDOC-9710 Supports adding hyperlinks to images in mail merge.
Document doc = new Document();
                doc.LoadFromFile("Test.docx");
                var fieldNames = new string[] { "MyImage" };
                var fieldValues = new string[] { "logo.png" };

                doc.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MailMerge_MergeImageField);

                doc.MailMerge.Execute(fieldNames, fieldValues);

                doc.SaveToFile("result.docx", FileFormat.Docx);
            }

            void MailMerge_MergeImageField(object sender, MergeImageFieldEventArgs field)
            {
                string filePath = field.FieldValue as string;
                if (!string.IsNullOrEmpty(filePath))
                {
                    field.Image = Image.FromFile(filePath);
                    field.ImageLink = "https://www.e-iceblue.com/";
                }

            }
New feature SPIREDOC-9778 Improves the efficiency of document storage.
Bug SPIREDOC-9769 Fixes the issue that the content layout of the result documents generated in .NET 7.0 projects was incorrect.
Bug SPIREDOC-6013 Fixes the issue that loading Word documents threw a System.InvalidOperationException exception.
Bug SPIREDOC-8541 Fixes the issue that converting Word to PDF caused inconsistent pagination.
Bug SPIREDOC-8587 Fixes the issue that converting Word to PDF threw a System.NullReferenceException exception.
Bug SPIREDOC-9197 Fixes the issue that exporting Docx files from Sparrow and converting them to HTML files failed.
Bug SPIREDOC-9213 Fixes the issue that page number fields could not be automatically updated after insertion.
Bug SPIREDOC-9253 Fixes the issue that list characters were displayed incorrectly when converting HTML to Doc.
Bug SPIREDOC-9310 Fixes the issue that line break tags were ignored when converting HTML to Doc.
Bug SPIREDOC-9400 Fixes the issue that logos were lost when converting Docx to PDF.
Bug SPIREDOC-9627 Fixes the issue that loading RTF documents threw a System.NullReferenceException exception.
Bug SPIREDOC-9640 Fixes the issue that the symbol "~" in LaTeX formulas was parsed incorrectly.
Bug SPIREDOC-9641 Fixes the issue that TOC was split across multiple pages when converting Word to PDF.
Bug SPIREDOC-9684 Fixes the issue that images were blurry when converting Docx to HTML.
Bug SPIREDOC-9712 Fixes the issue that extra text appeared when converting Word to PDF.
Bug SPIREDOC-9755 Fixes the issue that content was inconsistent after loading and saving a document.
Bug SPIREDOC-9761 Fixes the issue that the program hung when inserting HTML strings.

Spire.PDF

Category ID Description
New feature SPIREPDF-6199 Add a new method to determine if a document is encrypted without loading the document.
bool value = PdfDocument.IsPasswordProtected("1.pdf"); 
New feature SPIREPDF-6223 Supports setting margins when printing.
pdf.PrintSettings.SelectMultiPageLayout(2,2,false,Spire.Pdf.Print.PdfMultiPageOrder.Horizontal, marginValue)
Bug SPIREPDF-4391 Fixed the issue that some cells were split into two columns when converting PDF to Excel.
Bug SPIREPDF-6023 Fix the issue that setting the WholeWord property when searching for text caused the failure of highlighting text.
Bug SPIREPDF-6138 Fix the issue that text was lost when converting PDF to Word.
Bug SPIREPDF-6194 Fix the issue that the XML file failed to open in the result file after adding XML attachments to PDF files.
Bug SPIREPDF-6198 Fix the issue that the program threw an exception "System.ArgumentOutOfRangeException" when loading a compressed document.
Bug SPIREPDF-6201 Fix the issue that it failed to open the compressed document with PDF reader.
Bug SPIREPDF-6203 Fixed the issue that PDF converted to Word with permission password set (content copy and page extraction not allowed) did not request permission password.
Bug SPIREPDF-6204 Fixed the issue that characters were displayed incorrectly after converting PDF to POSTSCRIPT.
Bug SPIREPDF-6205 Fixed the issue that stamps were lost after converting OFD to PDF and images.
Bug SPIREPDF-6213 Fix the issue that the content was garbled after converting PDF to PDFA.
Bug SPIREPDF-6227 Fix the issue that the program threw an exception "System.IndexOutOfRangeException" when drawing a table.
Bug SPIREPDF-1752 Fixed the issue that opening the result file in Adobe failed after creating an overlay.
Bug SPIREPDF-5146 Fixed the issue that the watermark was changed after decrypting a PDF file.
Bug SPIREPDF-5865
SPIREPDF-6114
Fixed the issue that finding cross-line text in a PDF file failed.
Bug SPIREPDF-6024 Fixed the issue that setting FitToPage and FitToHTML properties under PdfHtmlLayoutFormat didn't take effect.
Bug SPIREPDF-6140 Fixed the issue that printing the same PDF file multiple times resulted in increased file size and printing time.
Bug SPIREPDF-6150 Fixed the issue that the content orientation was incorrect when printing double-sided.
Bug SPIREPDF-6193 Fixed the issue that the application threw a "System.NullReferenceException" exception when adding attachments to a PDF file.

Spire.XLS

Category ID Description
New feature SPIREXLS-2146 Supports customizing the paper size without scaling the content during printing.
sheet.PageSetup.SetCustomPaperSize(224, (float)25.4); 
sheet.PageSetup.Orientation = PageOrientationType.Portrait;
New feature SPIREXLS-4640 Supports adding Signature Line.
sheet.Range["A1"].AddSignatureLine("e-iceblue","E-iceblue","123@123.com", "description" ,false, true);
New feature SPIREXLS-4740 Supports getting shapes in sheets.
Spire.Xls.Core.IShapes shapes = sheet.Shapes;
Bug SPIREXLS-1782 Fixes the issue that the program threw an exception when creating HIPERVINCULO formulas in a Spanish environment.
Bug SPIREXLS-4824
SPIREXLS-4830
Fixes the issue that the program threw a "NullReferenceException" when loading an Excel document created by the new version of WPS.
Bug SPIREXLS-4842 Fixes the issue that the slicer was lost after saving Excel.
Bug SPIREXLS-4850 Fixes the issue that after splitting Excel documents, the generated file prompted the message that the content has error when opening in Microsoft Excel.
Bug SPIREXLS-4851 Fixes the issue that the program threw "NullReferenceException" when merging multiple Excel documents.
Bug SPIREXLS-4853 Fixes the issue that the program threw "NullReferenceException" when loading Excel documents.

Spire.Presentation

Category ID Description
New feature SPIREPPT-2311 Supports highlighting replaced text.
Presentation ppt = new Presentation();
ppt.LoadFromFile("input.pptx");
DefaultTextRangeProperties format = new DefaultTextRangeProperties();
format.IsBold = TriState.True;
format.Fill.FillType = Spire.Presentation.Drawing.FillFormatType.Solid;
format.Fill.SolidColor.Color = Color.Red;
format.FontHeight = 25;
ppt.ReplaceAndFormatText("Yuma", "AAAA", format);
ppt.SaveToFile("output.pptx",FileFormat.Pptx2016);
Bug SPIREPPT-2286 Fixes the issue that the think-cell objects were lost when splitting a PowerPoint document containing think-cell objects.
Bug SPIREPPT-2292 Fixes the issue that copying a PowerPoint slide containing modern annotation content failed.
Bug SPIREPPT-2315 Fixes the issue that the program threw System.IndexOutOfRangeException when getting points in the teardrop shape.
Bug SPIREPPT-2317 Fixes the issue that the color did not take effect when converting to PDF after changing the hyperlink color.

Spire.DocViewer

Category ID Description
Bug SPIREDOCVIEWER-107 Fixed the issue that the image location was incorrect when viewing a Word document.

Spire.PDFViewer

Category ID Description
Bug SPIREPDFVIEWER-575 Fixed the issue that the application threw a "System.ArgumentNullException" exception when loading a PDF file.
Bug SPIREPDFVIEWER -576 Fixed the issue that the application threw a "System.OutOfMemoryException" exception when loading a PDF file.