Spire.Office 6.8.2

Spire.Office 6.8.2 is released

Spire.Office 6.8.2 is released. This version brings some gorgeous features, for instance, Spire.PDF supports converting PDF to OFD and supports adding validity check marks to digital signatures, as well as supports adding invisible digital signatures; Spire.Presentation supports loading and saving PPT in DPS/DPT format; Spire.XLS supports converting SmartArt/shapes to images; Spire.Barcode supports getting the barcode location in the image and the barcode type and so forth. Meanwhile, a lot of bugs have been successfully fixed. 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 v9.8.7
  • Spire.Pdf.dll v7.8.9
  • Spire.XLS.dll v11.8.4
  • Spire.Email.dll v4.7.0
  • Spire.DocViewer.Forms.dll v6.6.0
  • Spire.PdfViewer.Forms.dll v6.8.4
  • Spire.PdfViewer.Asp.dll v6.8.4
  • Spire.Presentation.dll v6.8.4
  • Spire.Spreadsheet v5.6.1
  • Spire.OfficeViewer.Forms.dll v6.8.2
  • Spire.Barcode.dll v5.7.1
  • Spire.DataExport.dll v4.1.9
  • Spire.DataExport.ResourceMgr.dll v2.1.0
  • Spire.License.dll v1.4.0
Click the link to get the version Spire.Office 6.8.2:
More information of Spire.Office new release or hotfix:

Here is a list of changes made in this release

Spire.Doc

Category ID Description
Bug SPIREDOC-5477
SPIREDOC-6232
Fixes the issue that the content was incorrect after converting Word to PDF.
Bug SPIREDOC-5857
SPIREDOC-5869
SPIREDOC-6180
Fixes the issue that the image location was changed after converting Word to PDF.
Bug SPIREDOC-5907 Fixes the issue that the restricted area was missing after loading and saving the Word file.
Bug SPIREDOC-5950 Fixes the issue that the application threw the error "ArgumentOutOfRangeException" when converting Word to PDF.
Bug SPIREDOC-5957 Fixes the issue that the table border was displayed incorrectly after converting Word to PDF.
Bug SPIREDOC-6015 Fixes the issue that the application threw the error "StackOverflowException" when replacing the content of the bookmark.
Bug SPIREDOC-6069
SPIREDOC-6246
SPIREDOC-6399
SPIREDOC-6416
Fixes the issue that the application hung when converting Word to PDF.
Bug SPIREDOC-6166 Fixes the issue that the application threw the error "InvalidCastException" when converting Word to PDF.
Bug SPIREDOC-6167 Fixes the issue that the mail merge field was not merged correctly.
Bug SPIREDOC-6173 Fixes the issue that the generated bookmarks did not contain the list number after converting Word to PDF.
Bug SPIREDOC-6174 Fixes the issue that the application threw the error "StackOverflowException" when comparing two documents.
Bug SPIREDOC-6202 Fixes the issue that the background content was missing after converting RTF to PDF.
Bug SPIREDOC-6229 Fixes the issue that the application threw the error "ArgumentOutOfRangeException" when loading the Word document.
Bug SPIREDOC-6240 Fixes the issue that the application threw the error "ArgumentOutOfRangeException" when converting Word to PDF.
Bug SPIREDOC-6250 Fixes the issue that the pagination was incorrect after converting Word to images.
Bug SPIREDOC-6272 Fixes the issue that the pagination was incorrect after converting Word to PDF.
Bug SPIREDOC-6281 Fixes the issue that the application threw the error "Invalid date string, after time" when converting HTML to PDF.
Bug SPIREDOC-6285 Fixes the issue that an error prompted when opening the result file after converting Word to PDF.
Bug SPIREDOC-6309 Fixes the issue that the "title" property of the table was not parsed correctly after converting HTML to PDF.
Bug SPIREDOC-6311 Fixes the issue that the application threw the error "KeyNoteFoundException" when updating the TOC.
Bug SPIREDOC-6337 Fixes the issue that the application threw the error "ArgumentOutOfRangeException" when loading the Word document.
Bug SPIREDOC-6340 Fixes the issue that the application threw the error "Invalid date string, after time" when converting Word to PDF.
Bug SPIREDOC-6382 Fixes the issue that the application hung when converting Word to images.

Spire.PDF

Category ID Description
New feature - Supports converting PDF to OFD.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(PdfFile);
doc.SaveToFile(OfdFile, FileFormat.OFD
New feature SPIREPDF-1402 Supports adding validity check marks to digital signatures.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(inputPath);
PdfCertificate cert = new PdfCertificate(pfxPath, password);
PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, cert);
signatureMaker.SetAcro6Layers(false);
signatureMaker.MakeSignature("signName", doc.Pages[0], 100, 100, 120, 60);
doc.SaveToFile(outputPath);
New feature SPIREPDF-4393 PdfOrdinarySignatureMaker API supports setting signature images and signature details.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(inputPath);
PdfCertificate cert = new PdfCertificate(pfxPath, password);
PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, cert);
PdfSignature signature = signatureMaker.Signature;
signature.Name = "E-iceblue";
signature.ContactInfo = "028-81705109";
signature.Location = "Chengdu";
signature.Reason = "The certificate of this document";
PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature);
appearance.NameLabel = "Signer: ";
appearance.ContactInfoLabel = "ContactInfo: ";
appearance.LocationLabel = "Location: ";
appearance.ReasonLabel = "Reaseon: ";
appearance.SignatureImage = PdfImage.FromFile(imagePath);
appearance.GraphicMode = GraphicMode.SignImageAndSignDetail;
signatureMaker.MakeSignature("signName", doc.Pages[0], 100, 600, 200, 100, appearance);
doc.SaveToFile(outputPath);
New feature SPIREPDF-3288 Supports adding invisible digital signatures.
PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, x509);
signatureMaker.MakeSignature("signName");
Bug SPIREPDF-536
SPIREPDF-1854
SPIREPDF-2194
SPIREPDF-2371
SPIREPDF-2382 SPIREPDF-4154
Fixes the issue that the result was incorrect when verifying the signature.
Bug SPIREPDF-808
SPIREPDF-1251
Fixes the issue that the application threw the error "ArgumentException" when verifying the signature.
Bug SPIREPDF-984 WPF lib supports converting PDF to Word.
Bug SPIREPDF-2113 Fixes the issue that the content was incorrect after converting PDF to images.
Bug SPIREPDF-2446 Fixes the issue that the application threw the error "IndexOutOfRangeException" when printing the PDF file.
Bug SPIREPDF-2481 Fixes the issue that the application threw the error "IndexOutOfRangeException" when converting PDF to images.
Bug SPIREPDF-2677 Fixes the issue that the background color of the image was changed after encrypting the PDF file.
Bug SPIREPDF-2920 Fixes the issue that the content of the output file was missing after using "CreateTemplate" to draw template.
Bug SPIREPDF-3037 Fixes the issue that the application threw the error "StackOverflowException" when converting PDF to images.
Bug SPIREPDF-3095 Optimizes the time for filling forms and merging files.
Bug SPIREPDF-3228
SPIREPDF-4235
SPIREPDF-4479
Fixes the printout was incorrect after printing the PDF.
Bug SPIREPDF-4328 Fixes the issue that the file in the print queue was too large when printing the PDF file.
Bug SPIREPDF-4406 Fixes the issue that the application threw the error "OutOfMemoryException" when converting PDF to images.
Bug SPIREPDF-4415
SPIREPDF-4466
Fixes the issue that the output files were too large after splitting the PDF file.
Bug SPIREPDF-4440 Fixes the issue that the application threw the error "NullReferenceException" when extracting text from PDF.
Bug SPIREPDF-4448 Fixes the issue that the application threw the error "NullReferenceException" when calling the method "AppendPage".
Bug SPIREPDF-4457 Fixes the issue that the application threw the error "NullReferenceException" when printing the PDF.
Bug SPIREPDF-4463 Fixes the issue that the application threw the error "ArgumentException" when converting PDF to SVG.
Bug SPIREPDF-4465 Fixes the issue that the mime type of the added attachment was incorrect.
Bug SPIREPDF-3326
SPIREPDF-4534
Fixes the issue that the it inserted the page in the wrong position when using the Insert method.
Bug SPIREPDF-3618 Fixes the issue that the application threw the error "System.ComponentModel.Win32Exception" when printing PDF files.
Bug SPIREPDF-4296 Fixes the issue that the content was missing after converting PDF to SVG.
Bug SPIREPDF-4341 Fixes the issue that the content was incorrect after converting PDF to images.
Bug SPIREPDF-4343 Fixes the issue that the matching item could not be found when finding text.
Bug SPIREPDF-4352 Fixes the issue that the content was incorrect after converting PDF to PDFA1B.
Bug SPIREPDF-4408 Fixes the issue that the file in the print queue was too large when printing PDF.
Bug SPIREPDF-4426 Optimizes the time of encrypting PDF files
Bug SPIREPDF-4453 Fixes the issue that some characters were not converted correctly after converting XPS to PDF.
Bug SPIREPDF-4456 Fixes the issue that the application threw the error "System.NullReferenceException" when finding text.
Bug SPIREPDF-4460 Fixes the issue that the application threw the error "Object reference not set to an instance of an object" when converting PDF to images.
Bug SPIREPDF-4483 Fixes the issue that the application threw the error "Object reference not set to an instance of an object" when merging PDF files.
Bug SPIREPDF-4488 Fixes the issue that the attachment name was incorrect after adding the attachment.
Bug SPIREPDF-4509 Fixes the issue that there were extra pages when inserting PDF pages.
Bug SPIREPDF-4510 Fixes the issue that it got garbled characters when extracting text from PDF.
Bug SPIREPDF-4519 Fixes the issue that it took a long time to get the custom properties.
Bug SPIREPDF-4525 Fixes the issue that the extracted text was incorrect.
Bug SPIREPDF-4539 Fixes the issue that the application threw the error "System.ArgumentNullException" when merging PDF files.
Bug SPIREPDF-4540 Fixes the issue that the application threw the error "System.FormatException" when merging PDF files.
Bug SPIREPDF-4556 Fixes the issue that the application hung when inserting PDF pages.
Bug SPIREPDF-3206 Fixes the issue that the application threw the error "NullReferenceException" when extracting text from PDF.
Bug SPIREPDF-4142
SPIREPDF-4143
SPIREPDF-4357
SPIREPDF-4387
Fixes the issue that the printout was incorrect after printing the PDF.
Bug SPIREPDF-4276 Fixes the issue that the application threw the error "parameter is not valid" when replacing text.
Bug SPIREPDF-4322 Fixes the issue that it failed to get the correct location information when finding the text.
Bug SPIREPDF-4327
SPIREPDF-4417
Fixes the issue that the extracted text was garbled.
Bug SPIREPDF-4353 Fixes the issue that the transparent background of the image was ignored when printing the PDF.
Bug SPIREPDF-4356 Optimizes the resulting file size after converting PDF to HTML.
Bug SPIREPDF-4389 Fixes the issue that the image was not displayed correctly after converting SVG to PDF.
Bug SPIREPDF-4410 Fixes the issue that the application threw the error "Invalid Date String, after whole seconds" when saving the PDF file.
Bug SPIREPDF-4413 Fixes the issue that the application threw the error "NullReferenceException" when extracting text from PDF.
Bug SPIREPDF-4414 Fixes the issue that the background color was changed after converting PDF to SVG.
Bug SPIREPDF-4418 Fixes the issue that the application threw the error "NullReferenceException" when calling the "CreateTemplate" method.
Bug SPIREPDF-4419 Fixes the issue that the application threw the error "ArgumentException" when finding text.
Bug SPIREPDF-4421 Fixes the issue that the application threw the error "NullReferenceException" when saving the merged file to stream.
Bug SPIREPDF-4422
SPIREPDF-4442
Fixes the issue that the application threw the error "Object reference not set to an instance of an object" when converting PDF to images.

Spire.XLS

Category ID Description
New feature SPIREXLS-3308 SPIREXLS-3309 Supports converting SmartArt/shapes to images.
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet sheet = workbook.Worksheets[0];
SaveShapeTypeOption shapelist = new SaveShapeTypeOption();
List images = sheet.SaveShapesToImage(shapelist);
int index = 0;
foreach (System.Drawing.Image img in images)
{
    img.Save("toImage" + index + ".Png", ImageFormat.Png);
    index++;
}
New feature SPIREXLS-3340 Supports loading and saving files in et/ett formats.
Workbook wb = new Workbook();
wb.LoadFromFile(etInputFile);
//wb.LoadFromFile(ettInputFile);
wb.SaveToFile(etOutputFile, FileFormat.ET);
//wb.SaveToFile(ettOutputFile, FileFormat.ETT);
Bug SPIREXLS-3262 Fixes the issue that the chart was incorrect after converting XLSX to PDF.
Bug SPIREXLS-3317 Fixes the issue that the pagination was incorrect after converting XLS to PDF.
Bug SPIREXLS-3322 Fixes the issue that the application threw the error "ArgumentExcep" when creating multiple Workbook instances through multiple threads.
Bug SPIREXLS-3323 Fixes the issue that the content was incorrect after updating the PivotTable and then converting to PDF.
Bug SPIREXLS-3324 Fixes the issue that there were large spacing between paragraphs after converting Excel to PDF.
Bug SPIREXLS-3325 Fixes the issue that the formulas were not calculated correctly after converting XLS to PDF.
Bug SPIREXLS-3327 Fixes the issue that the application threw the error "Can't delete row because it's in array" when deleting rows.
Bug SPIREXLS-3328 Fixes the issue that there were garbled characters after converting HTML to XLSX.
Bug SPIREXLS-3329 Fixes the issue that the method CopyTheme did not copy the theme fonts.
Bug SPIREXLS-3338 Fixes the issue that the application threw the error "Input string was not in a correct format" when loading the XLSX file.
Bug SPIREXLS-3339 Fixes the issue that the content was incorrect after converting HTML to Excel.
Bug SPIREXLS-3341 Fixes the issue that the image was missing after converting XLS to PDF.
Bug SPIREXLS-3342 Fixes the issue that the application threw the error "Cannot read that as a ZpiFile" when loading the file.
Bug SPIREXLS-3345 Optimizes the time for inserting DataTable.

Spire.Presentation

Category ID Description
New feature SPIREPPT-1622 Supports loading and saving PPT in DPS/DPT format.
ppt.SaveToFile(outputPath + filename + ".dps", FileFormat.Dps);
ppt.SaveToFile(outputPath + filename + ".dpt", FileFormat.Dpt);
New feature SPIREPPT-1635 Supports changing font sizes and the position of trend lines of the chart legend in PPT.
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
ITrendlines trendline = chart.Series[0].TrendLines[0] as ITrendlines;
foreach(TextParagraph para in trendline.TrendLineLabel.TextFrameProperties.Paragraphs)
{
    para.DefaultCharacterProperties.FontHeight = 20;
    foreach(TextRange range in para.TextRanges)
    {
        range.FontHeight = 20;
    }
}
trendline.TrendLineLabel.OffsetX = -0.1f;
trendline.TrendLineLabel.OffsetY = 0.1f;
New feature SPIREPPT-1639 Supports setting border styles of the chart in PPT to right angle.
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
chart.Line.FillFormat.FillType = FillFormatType.Solid;
chart.Line.FillFormat.SolidFillColor.Color = Color.Red;
chart.BorderRoundedCorners = false;
New feature SPIREPPT-1643 Supports using regex to replace text in PPT.
Regex regex = new Regex("^[A-Za-z]+$");
string newvalue = "new string";
foreach(IShape shape in ppt.Slides[0].Shapes)
{
    shape.ReplaceTextWithRegex(regex, newvalue);
}
New feature SPIREPPT-1611 Supports setting interval between marks for chart axis.
Presentation ppt = new Presentation();
ppt.LoadFromFile(intputFile);
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
IChartAxis chartAxis = chart.PrimaryCategoryAxis;
chartAxis.TickMarkSpacing = 30; 
ppt.SaveToFile(outputFile, FileFormat.Pptx2013); 
New feature SPIREPPT-1617 Adds a new overload method of "LoadFromStream" to load encrypted documents via stream.
FileStream from_stream = File.OpenRead(inputFile);
Presentation presentation = new Presentation();
presentation.LoadFromStream(from_stream,FileFormat.Auto, "12345");           
presentation.SaveToFile(outputFile_px, FileFormat.Pptx2013);
Bug SPIREPPT-1610 Fixes the issue that the OLE icon was incorrect after converting PPT to PDF.
Bug SPIREPPT-1626 Fixes the issue that the OLE icon disappeared after converting PPT to PDF under the Linux environment.
Bug SPIREPPT-1632 Fixes the issue that the program threw an exception when deleting the trend line of the chart legend in PPT.
Bug SPIREPPT-1637 Fixes the issue that the fonts were wrong in the generated file after setting the font of the legend and axis of the chart in PPT.
Bug SPIREPPT-1644 Fixes the issue that the hyperlink was invalid after converting PPT to PDF.
Bug SPIREPPT-1648 Fixes the issue that the generated file had extra lines after converting PPT to PDF
Bug SPIREPPT-1649 Fixes the issue that the program threw an exception when highlighting the text containing")".

Spire.Barcode

Category ID Description
New feature SPIREBARCODE-195 Supports getting the barcode location in the image and the barcode type.
BarcodeInfo[] barcodeInfos = BarcodeScanner.ScanInfo(imageFile);
//BarcodeInfo[] barcodeInfos = BarcodeScanner.ScanInfo(imageFile, barCodeType);
for (int i = 0; i < barcodeInfos.Length; i++)
{
//Get the barcode type
BarCodeReadType barCodeReadType = barcodeInfos[i].BarCodeReadType;
//Get the four vertices of the rectangle
Point[] vertexes = barcodeInfos[i].Vertexes;
}
Bug SPIREBARCODE-188 Fixes the issue that the application hung when scanning the image.
Bug SPIREBARCODE-190 SPIREBARCODE-194 Fixes the issue that the scan results were incorrect.

Spire.Email

Category ID Description
Bug SPIREEMAIL-43 Fixes the issue that the program threw an error of "System.InvalidOperationException" when using filter conditions to query emails.