Spire.Office version 3.0 is released

Spire.Office

With the great effort of our Dev team, Spire.Office version 3.0 is released today. This update comes up with several fantastic features, such as printing PDF documents in white&black mode, declaring the range when using SimpleTextExtractionStrategy to extract text from PDF and adding a series of new interfaces to create conditional formatting in Excel. Also, this latest version has fixed numerous bugs to improve the stability and performance. More details can be found below.

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

Versions:

  • Spire.Barcode.dll 2.3.0
  • Spire.Common.dll 1.2.791
  • Spire.DataExport.dll 3.5.131
  • Spire.Doc.dll 6.4.8
  • Spire.DocViewer.Forms.dll 3.4.1
  • Spire.Email.dll 1.3.1
  • Spire.License.dll 1.3.6
  • Spire.OfficeViewer.Forms.dll 3.0.0
  • Spire.Pdf.dll 4.4.7
  • Spire.PdfViewer.Asp.dll 3.4.1
  • Spire.PdfViewer.Forms.dll 3.4.1
  • Spire.Presentation.dll 3.4.7
  • Spire.Spreadsheet.dll 2.3.1
  • Spire.XLS.dll 8.4.8
Get Spire.Office version 3.0 from here:

Details of new features and bug fixes:

Spire.Doc

New features:

  • Supports to add a cover image when converting Word to Epub.
  • public void SaveToEpub(Stream stream, DocPicture coverImage);
    public void SaveToEpub(string fileName, DocPicture coverImage);
    
  • Supports to load WordXml stream.
  • Document doc = new Document();
    doc.LoadFromStream(stream, FileFormat.WordXml);
    

Bug fixes:

  • Fixes the issue that caused extra empty paragraph when convertiong to PDF after mailmerging.
  • Fixes the issue that the content lost when setting paragraph keepFollow.
  • Fixes the issue that caused the ArgumentOutOfRangeException when saving to PDF after replacing text with some Chinese.
  • Fixes the issue that caused the exception "Cannot find the required value 'es'" when using AppendHtml method.
  • Fixes the issue that caused the exception "Value was either too large or too small for an Int16" when loading rtf document.
  • Fixes the issue that the images got duplicated when converting Word to PDF.
  • Fixes the issue that the hyperlinks were lost when converting Word to PDF.
  • Fixes the issue that the document was unable to open after splitting.
  • Fixes and supplements the code annotation of SDTType property to avoid misunderstanding when the type is RichTextControl.
  • Fixes the issue that caused an exception when loading a document.
  • Fixes the issue that much time was needed when converting Word to PDF_A1B.
  • Fixes the issue that data became incorrect after UpdateTableOfContents method.
  • Fixes the issue that UpdateTableOfContents method threw an exception in Azure.
  • Fixes the issue that the TOC was not recognized as bookmarks when converting Word to PDF.
  • Fixes the issue that the other bookmark object got lost when deleting the content of one bookmark using DeleteBookmarkContent().
  • Fixes the issue that caused "System.FormatException" exception when loading a document.
  • Fixes the issue that caused "System.NullReferenceException" exception when converting Word to PDF.
  • Fixes the issue that caused the deranged content when using PS method to convert.
  • Fixes the issue that caused the ArgumentOutOfRangeException when converting Html to Word.
  • Fixes the issue that the images don't show completely when converting Word to PDF.
  • Fixes the issue that caused incorrect paging when converting Word to Tiff.
  • Fixes the issue that the application hangs when converting Word to PDF.
  • Fixes the issue that caused Exception when using method doc.GetPageCount().
  • Fixes the issue that caused different page numbers when converting Word to PDF.
  • Fixes the issue that caused the overlapping content when applying license to convert Word to PDF.
  • Fixes the issue that caused the NullReferenceException when executing MailMerge.GetMergeFieldNames() method.
  • Fixes the issue that getting caused the missing page field after getting page count.
  • Fixes the issue that getting title and AlternativeText returns empty.
  • Fixes the issue that caused the NullReferenceException when converting XML to PDF.
  • Fixes the issue that the GetFiledName method returns wrong value after adding a field whose name contains the ":" symbol.
  • Fixes the issue that caused the exception when loading Word document.
  • Fixes the issue that the horizontal rulers don't appear when converting html string to OpenOffice (ODT).
  • Fixes the issue of the process hanging when converting Word to PDF.
  • Fixes the issue that the footer is missing when converting Rtf to Pdf/A.
  • Fixes the issue that caused the StackOverflowException when loading .doc file.

Spire.PDF

New features:

  • Supports to convert the specified range of the pages to other format file in stream. Kindly note FileFormat.PDF is not supported.
  • public Stream[] SaveToStream(int startIndex, int endIndex, FileFormat format);
    
  • Supports to print PDF documents in white&black mode.
  • PdfDocument doc=new PdfDocument();
    doc.LoadFromFile(@"");
    doc.PrintSettings.Color=false;
    doc.Print();
    
  • Declares the range when using SimpleTextExtractionStrategy to extract text in PDF.
  • PdfDocument doc = new PdfDocument("input.pdf");
    RectangleF rec = new RectangleF(0,0,595,760);SimpleTextExtractionStrategy sim = new SimpleTextExtractionStrategy(); 
    string content = doc.Pages[0].ExtractText(rec,sim);
    string fileName = "output.txt"; 
    File.WriteAllText(fileName, content);
    

Bug fixes:

  • Fixes the issue that the data is lost after removing the password of PDF.
  • Fixes the issue that caused NullReference exception when calling page.AnnotationsWidget.Add() method.
  • Fixes the issue that the saved PDF which includes XFA forms hints "Please wait..." when opening.
  • Fixes the issue that the process hangs when extracting image from PDF page.
  • Fixes the issue that caused StackOverflowException when extracting both images and text.
  • Fixes the issue that caused the error "Illegal characters in path" when merging pdf files.
  • Fixes the issue that caused blank pages when copying page content to a new document.
  • Fixes the issue of getting the wrong number of PDF attachments.
  • Fixes the issue that caused NullReferenceException when converting PDF to image.
  • Fixes the issue that caused NullReferenceException when converting PDF to SVG.
  • Fixes the issue that caused wrong background of the image when drawing emf image to PDF file.
  • Fixes the issue that the line break was added when the name of the signature is too long.
  • Fixes the issue of throwing Exception when loading a PDF file.
  • Fixes the issue that printing in black and white would give a blur result.
  • Fixes the issue that caused the NullReferenceException when finding text.
  • Fixes the issue that caused the NullReferenceException when merging Pdf files.
  • Fixes the issue that caused the NullReferenceException when extracting text.
  • Fixes the issue that caused the FormatException when getting ImagesInfo of a page.
  • Fixes the issue that caused the ArgumentOutOfRangeExcepton when invoking page.FindText("").
  • Fixes the issue that caused the AccessViolationExcepetion when converting Pdf to Image.
  • Fixes the issue that fail to obtain the LineText when extracting the collection of specific text.
  • Fixes the issue that caused the NullReferenceException when removing Pdf layer.

Spire.XLS

New features:

  • Supports to specify the Image Location type (GlobalAbsolute or Relative to Table) when converting sheet to html.
  • HTMLOptions opt = new HTMLOptions();
    opt.ImageLocationType = ImageLocationTypes.TableRelative;
    //opt.ImageLocationType = ImageLocationTypes.GlobalAbsolute;
    sheet.SaveToHtml(string fileName, HTMLOptions saveOption);
    
  • Adds a series of new interfaces to create conditional formats.
  • XlsConditionalFormats xcfs = sheet.ConditionalFormats.Add();
    xcfs.AddAverageCondition(AverageType averageType)
    xcfs.AddBeginsWithCondition(string text);
    xcfs.AddCellValueCondition(ComparisonOperatorType operatorType, double value1, double value2);
    xcfs.AddCellValueCondition(ComparisonOperatorType operatorType, string value1, string value2);
    xcfs.AddContainsBlanksCondition();
    xcfs.AddContainsErrorsCondition();
    xcfs.AddNotContainsTextCondition(string text);
    xcfs.AddTimePeriodCondition(TimePeriodType timePeriodType);
    xcfs.AddTopBottomCondition(TopBottomType topBottomType, int rank);
    xcfs.AddUniqueValuesCondition();
    

Bug fixes:

  • Fixes the issue that the property CellRange.HasConditionFormats always return false.
  • Fixes the issue that the table border was lost when converting Excel to SVG.
  • Fixes the issue that caused FormatException when loading file.
  • Fixes the issue that the result is incorrect when adding shadow for a chart.
  • Fixes the issue that caused exception when setting the Gradient with "Radial" type in Chart Plot Area.
  • Fixes the issue that the datalable of chart was missing when converting Excel to PDF.
  • Fixes the issue that the font "garamond" cannot be embedded when converting Excel to PDF.
  • Fixes the issue that the property CellRange.HasConditionFormats returned wrong value.
  • Fixes the issue that the functionality "CalculateAllValue" gave error in the result.
  • Fixes the issue that the process hung when converting Excel to PDF.
  • Fixes the issue that an additional page was added when converting Excel to PDF.
  • Fixes the issue that an exception occured when converting worksheet to Image.
  • Fixes the issue that data was lost when converting sheet to Image.
  • Fixes the issue that image got lost when converting Excel to PDF.
  • Fixes the issue that the "Percent" attribute did not make sense in " chart.Series[0].DataPoints[0].DataFormat.Percent=20;
  • Fixes the issue that caused incorrect style and content when converting Excel to Pdf.
  • Fixes the issue that the bottom graphic is incorrect when converting Excel to Pdf.
  • Fixes the issue that caused a gradual increase in the size of the generated file when circularly changing the value of a cell.
  • Fixes the issue that caused incomplete content on local and blank content on Azure after using sheet.ToImage() to save sheet to image.
  • Fixes the issue that caused incorrect content after saving.
  • Fixes the issue that the cell filling lost when converting Excel to Pdf.
  • Fixes the issue that the cell style lost after merging data.
  • Fixes the issue that caused incorrect content when converting Excel to Pdf.
  • Fixes the issue that caused InvaildCastException when changing text color.
  • Fixes the issue that caused incorrect text color when converting Excel to HTML.
  • Fixes the issue that the next text font had a change after modifying subscripts.

Spire.Presentation

New features:

  • Adds a new property IsMergeSameLabel to set the same item for the classification axis first class label.
  • Adds a new method DeleteEntry to delete Legend entry.
  • public void DeleteEntry(int index);
    
  • Adds a new method "AddFromHtml" to insert html into PPT. The method would regard each html tag as a separate shape.
  • public void AddFromHtml(string htmlText);
    
  • Adds a new properties "ChartDataLabel.X" and "ChartDataLabel.Y" to set the position for the chart datatable in a PPT.
  • Adds a new property "AnimationEffect.Subtype" to set or get the "Effect option" for an animation in a PPT.
  • Adds AlternativeTitle property to get/set the title of the alternative text of shape.
  • AnimationEffect anim = ppt.Slides[0].Timeline.MainSequence[0];
    TextParagraph startParagraph = anim.StartParagraph;
    TextParagraph endParagraph = anim.EndParagraph;
    
  • Adds StartParagraph property and EndParagraph property to get start paragraph and end paragraph of animation effects.

Bug fixes:

  • Fixes the issue that the chart legend added extra borders when converting PPT to PDF.
  • Fixes the issue of invalid font when converting PPTX to PDF.
  • Fixes the issue that caused the unhandled exception of type 'System.DivideByZeroException' when loading.
  • Fixes the issue that caused the redundant marker when adding a custom label to chart.
  • Fixes the issue that caused the unhandled exception of type 'Spire.presentation.DocumentEditException' when deleting single row of table.
  • Fixes the issue that deleting the legend entry of a chart would cause the “Null Reference Exception".
  • Fixes the issue that changing the data source of a chart would cause the incorrect chart fromat.
  • Fixes the issue that some words got displaced when converting PPT slides to images.
  • Fixes the issue that the chart format become incorrect when converting a PPT to a PDF.
  • Fixes the issue that the border format of a table become incorrect when converting a PPT to a PDF.
  • Fixes the issue that the format of a chart’s graphic description become incorrect when converting a PPT to a PDF.
  • Fixes the issue that the chart got removed when converting a PPT to a PDF.
  • Fixes the issue that the chart legend added extra borders when converting PPT to PDF.
  • Fixes the issue of invalid font when converting PPTX to PDF.

Spire.DocViewer

Bug fixes:

  • Fixes the issue that caused the exception "Index was out of range. Must be non-negative and less than the size of the collection." when quickly loading the file again.
  • Fixes the issue that the scroll bar cannot roll when viewing the file.

Spire.PdfViewer

New features:

  • Adds a new method for PdfViewer control to support setting the start page.
  • pdfviewer.DefaultStartIndex=3
    

Bug fixes:

  • Fixes the issue that caused a runtime error when zooming a document in IE10 browser.
  • Fixes the issue that the content is not displayed correctly when viewing and printing pdf document.
  • Fixes the issue that license is invalid for printing function of PDFViewer control.