Spire.Office 9.10.0 is released

2024-10-31 09:34:56

We are excited to announce the release of Spire.Office 9.10.0. In this version, Spire.PDF supports ignoring images when converting PDF to Markdown; Spire.Doc adds new methods to track the addition, deletion, and modification of document elements; Spire.XLS supports ARRAYTOTEXT, ARABIC, BASE, COMBINA, XOR formulas. Moreover, 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, and Spire.Barcode are included.

DLL Versions:

  • Spire.Doc.dll v12.10.13
  • Spire.Pdf.dll v10.10.5
  • Spire.XLS.dll v14.10.2
  • Spire.Presentation.dll v9.10.2
  • Spire.Barcode.dll v7.3.3
  • Spire.Email.dll v6.6.0
  • Spire.DocViewer.Forms.dll v8.8.2
  • Spire.PdfViewer.Asp.dll v7.12.23
  • Spire.PdfViewer.Forms.dll v7.12.23
  • Spire.Spreadsheet.dll v7.5.2
  • Spire.OfficeViewer.Forms.dll v8.7.15
  • Spire.DataExport.dll 4.9.0
  • Spire.DataExport.ResourceMgr.dll v2.1.0
Click the link to get the version Spire.Office 9.10.0:
More information of Spire.Office new release or hotfix:

Here is a list of changes made in this release

Spire.PDF

Category ID Description
New feature SPIREPDF-7003 Supports ignoring images when converting PDF to Markdown.
PdfToMarkdownConverter converter = new PdfToMarkdownConverter(inputFile); converter.MarkdownOptions.IgnoreImage = true; 
converter.ConvertToMarkdown(outputFile);
New feature SPIREPDF-7030 Extends the PdfMDPSignatureMaker class to support passing an IPdfSignatureFormatter object.
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile(inputFile);

X509Certificate2 cert = new X509Certificate2(inputFile_pfx, "e-iceblue");
IPdfSignatureFormatter formatter = new PdfPKCS7Formatter(cert, false);
PdfMDPSignatureMaker pdfMDPSignatureMaker = new PdfMDPSignatureMaker(pdf, formatter);

PdfSignature signature = pdfMDPSignatureMaker.Signature;
signature.Name = "e-iceblue";
signature.ContactInfo = "028-81705109";
signature.Location = "chengdu";
signature.Reason = " this document";

PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature);
appearance.NameLabel = "Signer: ";
appearance.ContactInfoLabel = "ContactInfo: ";
appearance.LocationLabel = "Loaction: ";
appearance.ReasonLabel = "Reason: ";

pdfMDPSignatureMaker.MakeSignature("signName", pdf.Pages[0], 100, 100, 250, 200, appearance);
pdf.SaveToFile(outputFile, FileFormat.PDF);
pdf.Dispose();
New feature SPIREPDF-7030 Supports signing existing signature fields using either the PdfOrdinarySignatureMaker class or the PdfMDPSignatureMaker class.
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile(inputFile);
PdfFormWidget widgets = pdf.Form as PdfFormWidget;
for (int i = 0; i < widgets.FieldsWidget.List.Count; i++)
{
    PdfFieldWidget widget = widgets.FieldsWidget.List[i] as PdfFieldWidget;
    if (widget is PdfSignatureFieldWidget)
    {
        string originalName = widget.Name;
        X509Certificate2 cert = new X509Certificate2(inputFile_pfx, "e-iceblue");
        IPdfSignatureFormatter formatter = new PdfPKCS7Formatter(cert, false);

        // PdfMDPSignatureMaker signatureMaker = new PdfMDPSignatureMaker(pdf, formatter);
        PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(pdf, formatter);

        PdfSignature signature = signatureMaker.Signature;
        signature.Name = "E-iceblue";
        signature.ContactInfo = "028-81705109";
        signature.Location = "chengdu";
        signature.Reason = "document";

        PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature);
        appearance.NameLabel = "Signer: ";
        appearance.ContactInfoLabel = "ContactInfo: ";
        appearance.LocationLabel = "Loaction: ";
        appearance.ReasonLabel = "Reason: ";
        appearance.SignatureImage = PdfImage.FromFile(inputFile_Img);
        appearance.GraphicMode = GraphicMode.SignImageAndSignDetail;

        signatureMaker.MakeSignature(originalName, appearance);
    }
}
pdf.SaveToFile(outputFile);
pdf.Dispose();
New feature SPIREPDF-7014 Adds the Logger class that supports logging output when converting HTML to PDF using Chrome plugin.
ChromeHtmlConverter converter = new ChromeHtmlConverter(TestUtil.ChromiumPath);
converter.Logger = new Logger(logFilePath);
//Enable IsEnabled to output logs to the console
//Logger.IsEnabled = true; 
ConvertOptions options = new ConvertOptions();
New feature SPIREPDF-7104 Supports creating PdfAttachmentAnnotation and adding an author.
annotation.Title = "test";
Bug SPIREPDF-5473 Fixes the issue that the bold fonts were not correctly applied when converting PDF document to PdfX1A2001 document.
Bug SPIREPDF-7044 Fixes the issue that the Bounds for vertical text were not obtained correctly.
Bug SPIREPDF-7066 Fixes the issue that the application threw "NullReferenceException" when converting PDF document to LinearizedPdf document.
Bug SPIREPDF-7079 Fixes the issue that the application threw "An item with the same key has already been added" exception during multi-threaded extraction of text from PDF pages.
Bug SPIREPDF-7110 Fixes the issue that the application threw a "DivideByZeroException" when calling the SetPdfToHtmlOptions method in multi-threaded scenarios.
Bug SPIREPDF-7111 Fixes the issue that the output result was incorrect when converting OFD document to PDF document and then saving them as XPS.
Bug SPIREPDF-7119 Fixes the issue that the program would hang while reading fonts from PDF document.
Bug SPIREPDF-6736 Fixes the issue that opening the resulting document after converting a PDF document to a PDFA document caused an error.
Bug SPIREPDF-6946 Fixes the issue that the application threw the System.IndexOutOfRangeException: "Index was outside the bounds of the array." exception when converting a PDF document to a PPTX document.
Bug SPIREPDF-6948 Fixes the issue that converting a PDF document to images experienced a decrease in speed.
Bug SPIREPDF-7006 Fixes the issue that validating the validity of signatures always returned false for the first signature.
Bug SPIREPDF-7012 Fixes the issue that the application threw the "Object reference not set to an instance of an object" exception when converting an OFD document to a PDF document.
Bug SPIREPDF-7013 Fixes the issue that the application threw the "Invalid font weight value: 681" exception when converting an OFD document to a PDF document.
Bug SPIREPDF-7027 Fixes the issue that converting an OFD document to a PDF document resulted in content loss.
Bug SPIREPDF-7032 Fixes the issue that the application threw the "Object reference not set to an instance of an object" exception when compressing a PDF document.
Bug SPIREPDF-7046 Fixes the issue that the application threw the "NullReferenceException" exception when converting a PDF document to a ToPdfA3B document without applying license.

Spire.Doc

Category ID Description
New feature - Adds new methods to track the addition, deletion, and modification of document elements.
public void StartTrackRevisions(string author);
public void StartTrackRevisions(string author, DateTime dateTime);
public void StopTrackRevisions();
New feature SPIREDOC-10831 Supports modification of the revision author.
range.InsertRevision.Author = "e-iceblue";
Bug SPIREDOC-9646 Fixes the issue that the table content was missing when converting Word to PDF.
Bug SPIREDOC-10588 Fixes the issue that the program threw an "ArgumentException" when converting Word to HTML.
Bug SPIREDOC-10727 Fixes the issue of blank content when converting Word to PDF.
Bug SPIREDOC-10766 Fixes the issue that the program threw a "Cannot insert an object of type Paragraph into the Document" exception when loading Word document.
Bug SPIREDOC-10753 Fixes the issue that paragraph indentation was lost after replacing paragraph text in bookmarks.
Bug SPIREDOC-10764 Fixes the issue that the program was hanging when converting Word to PDF.
Bug SPIREDOC-10816 Fixes the issue that some parts of the page content were lost after converting Word to PDF.

Spire.XLS

Category ID Description
New feature SPIREXLS-5350 MarkerDesigner now supports applying filter value parameters.
New feature SPIREXLS-5396 ARRAYTOTEXT formula has been supported.
Workbook workbook = new Workbook();
workbook.Worksheets[0].Range["A1"].Text = "True";
workbook.Worksheets[0].Range["A2"].Text = "1234.01234";
workbook.Worksheets[0].Range["A3"].Text = "Hello";
workbook.Worksheets[0].Range["B1"].Text = "#VALUE!";
workbook.Worksheets[0].Range["B2"].Text = "Seattle";
workbook.Worksheets[0].Range["B3"].Text = "$1,123.00";          
workbook.Worksheets[0].Range["D1"].FormulaArray = "=ARRAYTOTEXT(A1:B4,0)"; 
workbook.Worksheets[0].Range["D3"].FormulaArray = "=ARRAYTOTEXT(A1:B4,1)";    
workbook.SaveToFile(outputFile, ExcelVersion.Version2013);
New feature SPIREXLS-5471 ARABIC formula has been supported.
Workbook workbook = new Workbook();
workbook.Worksheets[0].Range["A1"].Value2 = "mcmxii";             
workbook.Worksheets[0].Range["C1"].Formula = "=ARABIC(A1)";
workbook.Worksheets[0].Range["C2"].Formula = "=ARABIC(\"LVII\")"; 
workbook.Worksheets[0].Range["C3"].Formula = "=ARABIC(\"mcmxii\")"; 
workbook.Worksheets[0].Range["C4"].Formula = "=ARABIC(\"\")"; 
workbook.Worksheets[0].Range["C5"].Formula = "=ARABIC(\"-LVII\")";
workbook.Worksheets[0].Range["C6"].Formula = "=ARABIC(\"57\")"; 
workbook.Worksheets[0].Range["C7"].Formula = "=ARABIC(\"2024/10/15\")"; 
workbook.Worksheets[0].Range["C8"].Formula = "=ARABIC(\"Text\")";
New feature SPIREXLS-5478 BASE formula has been supported.
Workbook workbook = new Workbook();
workbook.Worksheets[0].Range["A1"].Value2 = 7;           
workbook.Worksheets[0].Range["C1"].Formula = "=BASE(A1,2)";
workbook.Worksheets[0].Range["C2"].Formula = "=BASE(7,2)"; 
workbook.Worksheets[0].Range["C3"].Formula = "=BASE(100,16))";
workbook.Worksheets[0].Range["C4"].Formula = "=BASE(15,2,10)"; 
workbook.Worksheets[0].Range["C5"].Formula = "=BASE(Text,16))"; 
workbook.Worksheets[0].Range["C6"].Formula = "=BASE(-7,2)";
New feature SPIREXLS-5479 COMBINA formula has been supported.
Workbook workbook = new Workbook();
workbook.Worksheets[0].Range["A1"].Value2 = 4; 
workbook.Worksheets[0].Range["C1"].Formula = "=COMBINA(A1,3)";
workbook.Worksheets[0].Range["C2"].Formula = "=COMBINA(4,3)"; 
workbook.Worksheets[0].Range["C3"].Formula = "=COMBINA(10,3)"; 
workbook.Worksheets[0].Range["C4"].Formula = "=COMBINA(3,10)";
workbook.Worksheets[0].Range["C5"].Formula = "=COMBINA(Text,16))";
New feature SPIREXLS-5480 XOR formula has been supported.
Workbook workbook = new Workbook();
workbook.Worksheets[0].Range["A1"].Value2 = 3;
workbook.Worksheets[0].Range["A2"].Value2 = 0;
workbook.Worksheets[0].Range["C1"].Formula = "=XOR(A1>A2)";
workbook.Worksheets[0].Range["C2"].Formula = "=XOR(2>9)"; 
workbook.Worksheets[0].Range["C3"].Formula = "=XOR(3>0,2<9)"; 
workbook.Worksheets[0].Range["C4"].Formula = "=XOR(3>12,2<9)"; 
workbook.Worksheets[0].Range["C5"].Formula = "=XOR(3>12,2<9,4>6)"; 
workbook.Worksheets[0].Range["A6"].Value2 = 3>0;
workbook.Worksheets[0].Range["C6"].Formula = "=XOR(A6)";
New feature SPIREXLS-5482 Supports embedding images into cells.
worksheet.Range["B1"].InsertOrUpdateCellImage("D:\\vs1.png",true); 
New feature SPIREXLS-5521 Supports getting a cell's NamedRange.
Workbook workbook = new Workbook();
workbook.LoadFromFile(inputFile);
var result = workbook.Worksheets[0].Range["A1"].GetNamedRange();
System.Console.WriteLine(result);
var result1 = workbook.Worksheets[0].Range["A2"].GetNamedRange();
System.Console.WriteLine(result1);
File.WriteAllText(outputFile_T, result.ToString()+ "\r\n");
File.AppendAllText(outputFile_T, result1.ToString()+ "\r\n");
var result2 = workbook.Worksheets[0].Range["A3"].GetNamedRange();
if (result2 == null)
{
    System.Console.WriteLine("null");
    File.AppendAllText(outputFile_T, "null");
}
Bug SPIREXLS-2333 Fixed an issue where the number of pages retrieved was incorrect.
Bug SPIREXLS-5287 Fixed an issue with decimal points not being correct when exporting data under the .NET 6 framework.
Bug SPIREXLS-5347 Fixed an issue where embedded images in cells were lost after converting Excel to PDF.
Bug SPIREXLS-5465 Fixed an exception "Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')" when converting Excel to PDF.
Bug SPIREXLS-5481 Fixed an issue where the calculation result of a formula was incorrect.
Bug SPIREXLS-5486 Fixed an exception when converting Excel to PDF.
Bug SPIREXLS-5489 Fixed an issue where an additional "@" character was inserted when adding formulas to cells, and the formula value was incorrect.
Bug SPIREXLS-5491 Fixed an issue where deleting Sparklines failed.
Bug SPIREXLS-5532 Fixed an issue where adding filters to pivot tables failed.