Spire.Office 10.7.0 is released

Spire.Office 10.7.0 is released

2025-07-31 09:50:35

We are excited to announce the release of Spire.Office 10.7.0. In this version, Spire.Doc supports multiple new features, such as loading EPUB files for processing and creating combination charts; Spire.PDF supports extracting custom PDF data values and enhances the PDF-to-Excel conversion; Spire.XLS and Spire.Presentation support loading Markdown-format documents. 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 v13.7.14
  • Spire.Pdf.dll v11.7.14
  • Spire.XLS.dll v15.7.8
  • Spire.Presentation.dll v10.7.7
  • Spire.Barcode.dll v7.3.7
  • Spire.Email.dll v6.6.3
  • Spire.DocViewer.Forms.dll v8.9.1
  • Spire.PdfViewer.Asp.dll v8.1.3
  • Spire.PdfViewer.Forms.dll v8.1.3
  • Spire.Spreadsheet.dll v7.5.2
  • Spire.OfficeViewer.Forms.dll v8.8.0
  • Spire.DataExport.dll 4.9.0
  • Spire.DataExport.ResourceMgr.dll v2.1.0
Click the link to get the version Spire.Office 10.7.0:
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-3144 Supports loading EPUB files for processing.
Document doc = new Document();
            doc.LoadFromFile("in.epub", Spire.Doc.FileFormat.EPub);
            doc.SaveToFile(@"out.docx", Spire.Doc.FileFormat.Docx);
            doc.SaveToFile(@"out.pdf", Spire.Doc.FileFormat.PDF);
New feature SPIREDOC-11179 Supports converting Word to PDF/UA-1 format.
Document doc = new Document();
            doc.LoadFromFile("in.docx");
            ToPdfParameterList list = new ToPdfParameterList();
            list.PdfConformanceLevel = PdfConformanceLevel.Pdf_UA1;
            doc.SaveToFile(@"out.pdf", list);
New feature SPIREDOC-11345 Adds new configuration parameters to enhance the performance and output quality of Word-to-Markdown conversion.
New feature SPIREDOC-9977 SPIREDOC-10012 Supports creating combination charts.
Document doc = new Document();
Paragraph paragraph = doc.AddSection().AddParagraph();
Chart chart = paragraph.AppendChart(ChartType.Column, 450, 300).Chart;
//Modify 'Series 3' to a line chart and display it on the secondary axis
chart.ChangeSeriesType("Series 3", ChartSeriesType.Line, true);
Console.WriteLine(chart.Series[2].ChartType);
doc.SaveToFile("ComboChart.docx"); 
New feature - Adds the ‘setDefaultSubstitutionFontName()’ method to specify default substitution fonts.
Document document = new Document();
//Set default replacement font
doc.DefaultSubstitutionFontName = "Arial";
Section sec = doc.AddSection();
Paragraph para = sec.AddParagraph();
TextRange tr = para.AppendText("test");
//The system does not have this font
tr.CharacterFormat.FontName = "Helvetica";
doc.SaveToFile(outputFile, FileFormat.PDF);
doc.Close(); 
New feature - Adds the ‘StructureDocumentTag.RemoveSelfOnly()’ method to remove SDT tags while retaining their contents.
// Process inline structure tags
            List tagInlines = structureTags.getM_tagInlines();
            for (int i = 0; i < tagInlines.Count; i++)
            {
                tagInlines[i].RemoveSelfOnly();
            }

            // Process other structure tags
            List tags = structureTags.getM_tags();
            for (int i = 0; i < tags.Count; i++)
            {
                tags[i].RemoveSelfOnly();
            }

            // Process StructureDocumentTagRow
            List rowtags = structureTags.getM_rowtags();
            for (int i = 0; i < rowtags.Count; i++)
            {
                rowtags[i].RemoveSelfOnly();
            }

            // Process StructureDocumentTagCell
            List celltags = structureTags.getM_celltags();
            for (int i = 0; i < celltags.Count; i++)
            {
                celltags[i].RemoveSelfOnly();
            } 
New feature - Supports setting image compression methods when converting Word to PDF.
Document document = new Document();
 document.LoadFromFile(@"Sample.docx");
 ToPdfParameterList para = new ToPdfParameterList();
 para.PdfImageCompression = Spire.Doc.Export.PdfImageCompression.Jpeg;
 document.SaveToFile(outputFile,para); 
New feature - Supports inserting formulas into Word documents using OMML code.
Document document = new Document();
            Section section = doc.AddSection();

            foreach (string ommlCode in OmmlCodes)
            {
                OfficeMath officeMath = new OfficeMath(doc);
                officeMath.CharacterFormat.FontSize = 14f;
                officeMath.FromOMMLCode(ommlCode);
                section.AddParagraph().ChildObjects.Add(officeMath);
            }

            doc.SaveToFile(outputFile, FileFormat.Docx2013);
            doc.Dispose(); 
New feature - Supports converting math formulas to LaTeX code.
Document document = new Document();
            doc.LoadFromFile(inputFile);

            StringBuilder stringBuilder = new StringBuilder();
            // Iterate through sections in the document
            foreach (Section section in doc.Sections)
            {
                // Iterate through paragraphs in each section
                foreach (Paragraph par in section.Body.Paragraphs)
                {
                    // Iterate through child objects in each paragraph
                    foreach (DocumentObject obj in par.ChildObjects)
                    {
                        // Check if the object is an OfficeMath equation
                        OfficeMath omath = obj as OfficeMath;
                        if (omath == null) continue;
                        // Convert OfficeMath equation to LaTex code
                        string mathml = omath.ToLaTexMathCode();
                        // Append MathML code to the StringBuilder
                        stringBuilder.Append("LaTeX code" + mathml);
                        stringBuilder.Append("\r\n");
                    }
                }
            }
            // Write the LaTex code to a text file
            File.WriteAllText(outputFile, stringBuilder.ToString())
Bug SPIREDOC-11245 Fixed an issue where header images were distorted When converting Doc to PDF.

Spire.PDF

Category ID Description
New feature SPIREPDF-7505 Adds GetCustomApplicationData() to support extracting custom PDF data values.
PdfDocument doc = new PdfDocument(inputFile);    
PdfApplicationData appplicationDataObject = doc.GetCustomApplicationData();     
Dictionary privateDataObject = appplicationDataObject.Private as Dictionary;          
string privateData = privateDataObject["WinsertPrivateCatalogData"] as string;
New feature SPIREPDF-7430 SPIREPDF-7427 Supports integrating PaddleOCRSharp in XlsxLineLayoutOptions.TextRecognizer to enhance the PDF-to-Excel conversion.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile("in.pdf");
XlsxLineLayoutOptions options = new XlsxLineLayoutOptions(false, false, false, true);
options.TextRecognizer = new TextRecognizer();
doc.ConvertOptions.SetPdfToXlsxOptions(options);
doc.SaveToFile("out.xlsx", Spire.Pdf.FileFormat.XLSX);
 
// niget install PaddleOCRSharp lib
using PaddleOCRSharp;
using Spire.Pdf.Conversion;

public class TextRecognizer : ITextRecognizer
{
    private static readonly PaddleOCREngine _engine;

    static TextRecognizer()
   

{         _engine = new PaddleOCREngine(null, “”);     }
    public string RecognizeGlyph(Stream glyphImageStream)

{         
       var image = new System.Drawing.Bitmap(glyphImageStream);
        // paint glyph in image center
        var fixImage = new System.Drawing.Bitmap(160, 240);
        using (Graphics g = Graphics.FromImage(fixImage))
       

{             g.DrawImage(image, new RectangleF(20, 20, fixImage.Width - 40, fixImage.Height - 40), new RectangleF(0, 0, image.Width, image.Height), GraphicsUnit.Pixel);         }
        var unicodeResult = _engine.DetectText(fixImage).Text;
        return unicodeResult;
}

}
Bug SPIREPDF-5089 Optimizes the time consumption of converting PDF to images.
Bug SPIREPDF-6354 Fixes the issue where Thai text displayed incorrectly when converting PDF to PDF/A-1A.
Bug SPIREPDF-6689 Fixes the incorrect transparency effect when highlighting PDF text.
Bug SPIREPDF-7359 Fixes incorrect rendering when drawing images to PDF pages.
Bug SPIREPDF-7459 Fixes the incorrect Flatten effect for PDF form fields.
Bug SPIREPDF-7486 Fixes the "ArgumentException" thrown during PDF compression.
Bug SPIREPDF-7495 SPIREPDF-7561 Fixes the "NullReferenceException" thrown when converting PDF to TIFF.
Bug SPIREPDF-7529 Fixes shadow issues in printed PDF content.
Bug SPIREPDF-7570 Fixes Adobe errors when converting OFD to PDF.
Bug SPIREPDF-7571 Fixes the "InvalidOperationException" thrown when defining fonts.
Bug SPIREPDF-7579 Fixes the "NullReferenceException" thrown when converting PDF to images.
Bug SPIREPDF-7581 Fixes the "System.Exception" thrown when canceling print operations in netstandard DLL.
Bug SPIREPDF-7589 Fixes the "Value cannot be null" error when merging PDF files.
Bug SPIREPDF-6991 Fixed the issue where Arabic text did not display correctly when converting an EMF file to PDF.
Bug SPIREPDF-2800 Fixes the issue that the content was incorrect when converting XPS to PDF.
Bug SPIREPDF-3727 SPIREPDF-3984 SPIREPDF-5085 Optimizes performance for PDF-to-image conversion to reduce processing time.
Bug SPIREPDF-3818 Improves PDF printing performance.
Bug SPIREPDF-7004 Fixes the issue where content was missing during PDF-to-image conversion.
Bug SPIREPDF-7043 Fixes the issue that the content was incorrect when converting PDF to PDF/A.
Bug SPIREPDF-7399 Fixes the issue where PDF content could not be extracted.
Bug SPIREPDF-7574 SPIREPDF-7575 SPIREPDF-7576 SPIREPDF-7577 SPIREPDF-7578 Fixes the issue that the content was incorrect when converting OFD to PDF or images.
Bug SPIREPDF-7598 Fixes the issue that duplicate "Indirect reference" entries were caused by Attachments.Add().
Bug SPIREPDF-7609 Fixes the issue where the program threw System.NullReferenceException error when releasing pdfTextFinder objects.

Spire.XLS

Category ID Description
New feature Adds the LoadFromMarkdown() method to support for loading Markdown-format documents.
Workbook wb = new Workbook();
       wb.LoadFromMarkdown("test.md");
       wb.SaveToFile("out.pdf", FileFormat.PDF);
       wb.SaveToFile("out.xlsx", ExcelVersion.Version2010);
Bug SPIREXLS-5820 Fixes the issue where checkboxes were displayed incorrectly after converting Excel to PDF.
Bug SPIREXLS-5833 Fixes the issue where the AGGREGATE formula was calculated incorrectly.
Bug SPIREXLS-5858 Fixes the issue where content overlapped after converting Excel to PDF.
Bug SPIREXLS-5860 Fixes the issue where text wrapping was incorrect after converting Excel to PDF.
Bug SPIREXLS-5832 Fixed the issue where saving an Excel file to PDF/A3B was incorrect.
Bug SPIREXLS-5862 Fixes the issue where the Ungroup effect was incorrect.
Bug SPIREXLS-5863 Fixes the issue where page breaks were inconsistent after converting Excel to PDF.
Bug SPIREXLS-5868 Fixes the issue where formula calculation returned "#VALUE!".

Spire.Prensentation

Category ID Description
New feature Supports loading Markdown files.
Presentation pt = new Presentation();
pt.LoadFromFile(inputFilePath, FileFormat.Markdown);
pt.SaveToFile(outputFile, FileFormat.Pptx2013);
Bug SPIREPPT-2849 Fixes the issue that files were corrupted when opening presentations containing copied slides.