Spire.Office

Spire.Office 4.7.0 is released

We're pleased to announce the release of Spire.Office 4.7.0. This version includes some new features, such as Spire.XLS supports applying external font file to chart when converting Excel to PDF and supports specifying EmfType in ToEMFStream method. Spire.Presentation supports setting the alignment of shape and getting the format and version of PowerPoint file. Spire.PDF supports deleting the author information for PdfTextMarkupAnnotationWidget, PdfTextAnnotationWidget and PdfPopupAnnotationWidget. Spire.Spreadsheet adds Items property to Cells, Columns and Rows collections. Additionally, a series of bugs that occurred during the conversion and manipulation of Excel, Word, PDF and PowerPoint files have been fixed. More details are given below.

DLL Version:

  • Spire.Doc.dll v7.7.10
  • Spire.Pdf.dll v5.7.14
  • Spire.XLS.dll v9.7.5
  • Spire.Presentation.dll v4.7.6
  • Spire.Email.dll v2.4.12
  • Spire.DocViewer.Forms.dll v4.5.5
  • Spire.PdfViewer.Forms.dll v4.6.5
  • Spire.PdfViewer.Asp.dll v4.6.5
  • Spire.Spreadsheet v3.7.3
  • Spire.OfficeViewer.Forms.dll v4.7.0
  • Spire.Barcode.dll v3.5.0
  • Spire.DataExport.dll v4.1.9
  • Spire.DataExport.ResourceMgr.dll v2.1.0
  • Spire.Common.dll v2.7.5
  • Spire.License.dll v1.3.7
Click the link to get the version Spire.Office 4.7.0:
More information of Spire.Office new release or hotfix:

Spire.XLS

New Features:

  • Supports applying external font file to chart, such as axis labels and datalabels. Note: embedding the font in Excel file is not supported, but it is supported when converting to PDF.
  • Workbook wb = new Workbook();
    wb.LoadFromFile("Book1.xlsx");
    Worksheet sheet = wb.Worksheets[0];
    Chart chart = sheet.Charts[0];
    wb.CustomFontFilePaths = new string[] { "C:\\gotham-book.ttf" };
    System.Collections.Hashtable result=wb.GetCustomFontParsedResult();
    chart.PrimaryValueAxis.Font.FontName= result["C:\\gotham-book.ttf"] as string;
    chart.SecondaryCategoryAxis.Font.FontName = result["C:\\gotham-book.ttf"] as string;
    Spire.Xls.Charts.ChartSerie cs1 = chart.Series[0];
    cs1.DataPoints.DefaultDataPoint.DataLabels.FontName = result["C:\\gotham-book.ttf"] as string;
    wb.SaveToFile("result.pdf", FileFormat.PDF);
    
  • Supports specifying EmfType in ToEMFStream method.
  • sheet.ToEMFStream(stream, sheet.FirstRow, sheet.FirstColumn, sheet.LastRow, sheet.LastColumn, EmfType.EmfOnly);
    

Bug Fixes:

  • Fixes the issue that caused incorrect content format after converting Excel to HTML.
  • Fixes the issue that the application threw an exception when converting an Excel which contains formulas to PDF.
  • Fixes the issue that caused incorrect content after copying a sheet which contains named ranges.
  • Fixes the issue that the application threw an exception “offset and length beyond the array bounds...” when loading Excel.
  • Fixed the issue that after creating a chart using an array with an empty first value, the generated Excel prompted an error when opening.
  • Fixes the issue that getting the formula of trendline returned incorrect data.
  • Fixes the issue that caused incorrect color after converting .XLT to .XLS.
  • Fixes the issue that caused an exception "The ' [ '- unterminated [] set is being analyzed" when converting Excel to PDF.
  • Fixes the issue that the same axis categories were expanded when converting chart to an image.
  • Fixes the issue that setting the center alignment of checkbox text failed.
  • Fixes the issue that the thousand separator format of the number value obtained in the Spanish language system was incorrect.

Spire.Doc

Bug Fixes:

  • Fixes the issue that the images don't display out when updating field after adding MergeField to IncludePicture.
  • Fixes the issue that the mergefield update incorrectly after the format like "EEEE year O month A".
  • Fixes the issue that converting Word to Pdf is failed.
  • Fixes the issue that the position of bookmarkEnd tag changed after resaving the Word by MS Word.
  • Fixes the issue that the field update failed when setting the custom styles.
  • Fixes the issue that the image was stretched after converting Word to PDF.
  • Fixes the issue that the application threw the “The queue is empty” exception when loading HTML file.
  • Fixes the issue that the application threw the “Stack empty” exception when loading Word document.
  • Fixes the issue that caused incorrect content after converting Word to PDF.
  • Fixes the issue that caused incorrect indent of paragraph and cropped text after converting RTF to PDF.
  • Fixes the issue that caused offset position of text after converting Word to PDF.
  • Fixes the issue that caused incorrect format after creating textboxes in Word and converting the word to PDF.
  • Fixes the issue that the settings (KeepFollow,PageBreakAfter,Isheader) didn't take effect after converting Word to PDF.
  • Fixes the issue that caused incorrect location of image after converting Word to XPS.
  • Fixes the issue that the application threw an exception "The format of input string is not correct" when loading HTML file.
  • Fixes the issue that the base64 image didn't render after converting HTML to PDF.
  • Fixes the issue that the line height of table was incorrect after converting Word to PDF.
  • Fixes the issue that the application threw an exception “The index was out of range. Must be non-negative and less than the set size” when converting Word to PDF.
  • Fixes the issue that caused incorrect Thai characters after converting Word to PDF.

Spire.Presentation

New Features:

  • Supports setting the alignment of shape.
  • var shape = ppt.Slides[0].Shapes[0];
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.AlignBottom);
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.AlignLeft);
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.AlignTop);
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.AlignCenter);
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.AlignMiddle);
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.AlignRight);
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.DistributeHorizontally);
    shape.SetShapeAlignment(Spire.Presentation.ShapeAlignment.DistributeVertically);
    
  • Supports getting the format and version of PowerPoint file.
  • Presentation pp = new Presentation();
    ppt.LoadFromFile(filePath);
    FormatAndVersion fv = ppt.FormatAndVersion;
    

Bug Fixes:

  • Fixes the issue that caused incorrect content after converting PPTX to image.
  • Fixes the issue that the AdvanceAfterTime could not be obtained correctly.
  • Fixes the issue that the time of generated PPTX file was incorrect.
  • Fixes the issue that the width of shape increased after saving the PPTX.
  • Fixes the issue that the chart data series markers lost after converting PPTX to image.
  • Fixes the issue that the font height and color of text can not be obtained successfully.
  • Fixes the issue the default font height of text can not be obtained successfully.
  • Fixes the issue the background color of inserted slide lost.

Spire.PDF

New Features:

  • Implements that PdfTextMarkupAnnotationWidget PdfTextAnnotationWidget and PdfPopupAnnotationWidget can delete the comment author information.
  • Adds page.ReplaceImage(Image originalImage, PdfImage image) method to replace original image with new image.

Bug Fixes:

  • Fixes the issue that the application threw an error "Unexpected token unknown before 83178" when setting the margins and page size of a PDF.
  • Fixes the issue that the location and the format of text was incorrect when setting the parameter htmlTags in the page.DrawString(string text, PdfFontBase font, PdfBrush brush, PointF point, bool htmlTags) method to true.
  • Fixes the issue that the content was garbled when printing a PDF document using STSongStd-Light-Acro font and SinHei font.
  • Fixes the issue that the application threw a System.NullReferenceException exception when using page.CreateTemplate() method to create a page template.
  • Fixes the issue that extracting the text of a PDF document failed.

Spire.Spreadsheet

New Features:

  • Adds the Items property to the Cells, Columns, and Rows collections in order to view each item in the collection when debugging.

Bug Fixes:

  • Fixes the issue that the order of the first newly added worksheet was incorrect after applying license.
  • Fixes the issue that some data were lost after loading.
  • Fixes the issue that the SetActiveCell didn't take effect after setting freezing.