We’re pleased to announce the release of Spire.Office 10.10.0. In this version, Spire.Doc supports extracting pages from a Word file to a separate file; Spire.XLS supports reading Office cached cloud fonts, Spire.Presentation supports setting fade-in or fade-out duration of audio; Spire.PDF supports validating the timestamp service URL. Meanwhile, a series of known issues are fixed in this update. More details are given below.
In this version, the most recent versions of Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Barcode, Spire.DocViewer, and Spire.PDFViewer are included.
DLL Versions:
- Spire.Doc.dll v13.10.3
- Spire.Pdf.dll v11.10.4
- Spire.XLS.dll v15.10.3
- Spire.Presentation.dll v10.10.7
- Spire.Barcode.dll v7.4.1
- Spire.Email.dll v6.6.3
- Spire.DocViewer.Forms.dll v8.9.4
- Spire.PdfViewer.Asp.dll v8.2.6
- Spire.PdfViewer.Forms.dll v8.2.6
- 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.10.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-11429 | Added the ExtractPages(int index, int count) method to extract a specified range of pages from the document.
Document doc = new Document();
doc.LoadFromFile("sample.docx");
Document extractPage = doc.ExtractPages(0, 1);
extractPage.SaveToFile("result.docx");
|
| Bug | SPIREDOC-11174 | Fixed the issue where content layout was incorrect when converting Word to PDF. |
| Bug | SPIREDOC-11408 | Fixed the issue where table styles were not rendered correctly when converting Word to PDF. |
| Bug | SPIREDOC-11527 | Fixed the issue where fonts were not displayed correctly when converting Word to PDF. |
| Bug | SPIREDOC-11541 | Fixed the issue where a "System.NotSupportedException" exception was thrown when loading a Markdown stream. |
| Bug | SPIREDOC-11544 | Fixed the issue where text position was offset when converting Word to PDF. |
| Bug | SPIREDOC-11552 | Fixed the issue where a "System.ArgumentException: Parent cannot be null" exception was thrown when getting the page count. |
| Bug | SPIREDOC-11553 | Fixed the issue where restricted editing regions inside tables were not preserved correctly when saving Word document. |
Spre.XLS
| Category | ID | Description |
| New feature | SPIREXLS-5979 | Adds support for reading Office cached cloud fonts by default, besides system font directories and in-memory fonts. |
| Adjustment | - | Modifies the parameter list of the AddDigitalSignature() and IDigitalSignatures.Add() methods.
Old: AddDigitalSignature(X509Certificate2 certificate, string comments, DateTime signTime) New: AddDigitalSignature(string certificatePath, string certificatePassword, string comments, DateTime signTime) |
| Bug | SPIREXLS-5908 | Fixes the issue where extra blank pages were generated when converting Excel files to PDF. |
| Bug | SPIREXLS-5918 | Fixes the issue where an “ArgumentOutOfRangeException” was thrown when loading XLSB files. |
| Bug | SPIREXLS-5933 | Fixes the issue where a “FormatException” was thrown when adding HTML strings. |
| Bug | SPIREXLS-5985 | Fixes the issue where files containing FILTER formulas caused errors when opened in Microsoft Excel. |
Spire.Presentation
| Category | ID | Description |
| New feature | SPIREPPT-2988 | Added support for setting the fade-in or fade-out duration of audio.
// New Append Audio
Presentation pres = new Presentation();
FileStream from_stream = File.OpenRead(inputFile);
RectangleF audioRect = new RectangleF(50, 50, 100, 100);
IAudio audio = pres.Slides[0].Shapes.AppendAudioMedia(from_stream, audioRect);
// Set the duration of the starting fade for 13s
audio.FadeInDuration = 13000f;
// Set the duration of the ending fade for 40s
audio.FadeOutDuration = 10000f;
pres.SaveToFile(outputFile, FileFormat.Pptx2013);
// Retrieve existing documents
FileStream from_stream = File.OpenRead(inputFile);
Presentation presentation = new Presentation();
presentation.LoadFromStream(from_stream, FileFormat.Auto);
foreach (IShape shape in presentation.Slides[0].Shapes)
{
if (shape is IAudio)
{
IAudio audio = shape as IAudio;
// Set the duration of the starting fade for 13s
audio.FadeInDuration = 13000f;
// Set the duration of the ending fade for 20s
audio.FadeOutDuration = 20000f;
}
}
presentation.SaveToFile(outputFile, FileFormat.Pptx2013);
|
| New feature | SPIREPPT-2990 | Added support for cropping audio.
// New Append Audio
Presentation pres = new Presentation();
FileStream from_stream = File.OpenRead(inputFile);
RectangleF audioRect = new RectangleF(50, 50, 100, 100);
IAudio audio = pres.Slides[0].Shapes.AppendAudioMedia(from_stream, audioRect);
// Set the start trimming time 8 seconds
audio.TrimFromStart = 8000f;
// Set the end trimming time 13 seconds
audio.TrimFromEnd = 13000f;
pres.SaveToFile(outputFile, FileFormat.Pptx2013);
// Retrieve existing documents
FileStream from_stream = File.OpenRead(inputFile);
Presentation presentation = new Presentation();
presentation.LoadFromStream(from_stream, FileFormat.Auto);
foreach (IShape shape in presentation.Slides[0].Shapes)
{
if (shape is IAudio)
{
IAudio audio = shape as IAudio;
// Set the start trimming time 8 seconds
audio.TrimFromStart = 8000f;
// Set the end trimming time 13 seconds
audio.TrimFromEnd = 13000f;
}
}
presentation.SaveToFile(outputFile, FileFormat.Pptx2013);
|
| New feature | SPIREPPT-3002 | Added support for setting transparency for tables.
table.Fill.Transparency = 0.5f; // Value range is 1-0, table default color is black // Need to set specific table color, set color code as follows: table[0, 0].FillFormat.FillType = Spire.Presentation.Drawing.FillFormatType.Solid; table[0, 0].FillFormat.SolidColor.Color = Color.Orange; |
| Adjustment | - | Adjusted the usage of the AddDigitalSignature method.
Presentation ppt = new Presentation();
ppt.LoadFromFile("in.pptx");
//Add a digital signature,The parameters: string certificatePath, string certificatePassword, string comments, DateTime signTime
ppt.AddDigitalSignature("test.pfx", "e-iceblue", "111", DateTime.Now);
ppt.SaveToFile("result.pptx", Spire.Presentation.FileFormat.Pptx2016);
ppt.Dispose();
|
| Bug | SPIREPPT-2887, SPIREPPT-2954, SPIREPPT-2989 | Fixed the issue with incorrect content when converting PPT to PDF. |
| Bug | SPIREPPT-2997 | Optimized saving time when creating PPT using templates. |
Spire.PDF
| Category | ID | Description |
| New feature | SPIREPDF-7465 | Added support for validating the timestamp service URL address.
TSAHttpService timestampService = new TSAHttpService("http://time2.certum.pl");
TSAResponse response = timestampService.Check();
//if it is success to receive tsa token
if (response.Success)
{ formatter.TimestampService = timestampService; }
|
| Bug | SPIREPDF-3890 SPIREPDF-5888 SPIREPDF-6680 | Improved the conversion effect from PDF to Word. |
| Bug | SPIREPDF-5657 | Fixed the issue of content loss after converting PDF to image. |
| Bug | SPIREPDF-6451 | Fixed the issue of content loss when converting XPS to PDF. |
| Bug | SPIREPDF-7213 | Fixed the issue of incorrect highlighted vertical text rendering. |
| Bug | SPIREPDF-7378 | Fixed the issue of merging PDF documents throwing exceptions. |
| Bug | SPIREPDF-7680 | Improved the font rendering effect when replacing content. |
| Bug | SPIREPDF-7693 | Fixed the issue of adding timestamps throwing errors. |
| Bug | SPIREPDF-5303 SPIREPDF-7247 SPIREPDF-7719 | Fixed the issue of inconsistent rendering when converting PDF to Tiff. |
| Bug | SPIREPDF-7729 | Fixed the issue of loading PDF documents throwing "NullReferenceException". |
| Bug | SPIREPDF-7768 | Fixed the issue of CreateTemplate() method throwing "IndexOutOfRangeException" when comparing PDFs. |
Spire.PDFViewer
| New feature | SPIREPDFVIEWER-616 | Added support for “Find Previous” and “Find Next” functions. The pdfDocumentViewer1.SearchText() method has been deprecated and replaced with pdfDocumentViewer1.Find().
private void Form1_Load(object sender, EventArgs e)
{
string pdfDoc = @"test.pdf";
if (File.Exists(pdfDoc))
{
this.pdfDocumentViewer1.LoadFromFile(pdfDoc);
this.pdfDocumentViewer1.Find("FindedText", Color.Empty);
}
}
private void before_Click(object sender, EventArgs e)
{
this.pdfDocumentViewer1.FindPrevious();
}
private void next_Click(object sender, EventArgs e)
{
this.pdfDocumentViewer1.FindNext();
}
|