Spire.Office 10.12.0 is released
We’re pleased to announce the release of Spire.Office 10.12.0. In this version, Spire.Doc supports the "Two Lines in One" function to enhance Word to PDF conversion; Spire.XLS supports customizing export options when converting Excel to Markdown; Spire.Presentation supports compressing images; Spire.PDF supports both horizontal and vertical text alignment. Meanwhile, a series of known issues have been fixed in this update. More details are as follows.
In this version, the most recent versions of Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Barcode, Spire.DocViewer, Spire.PDFViewer, and Spire.Email are included.
DLL Versions:
- Spire.Doc.dll v13.12.6
- Spire.PDF.dll v11.12.7
- Spire.XLS.dll v15.12.2
- Spire.Presentation.dll v10.12.3
- Spire.Barcode.dll v7.5.0
- Spire.Email.dll v6.8.0
- Spire.DocViewer.Forms.dll v8.9.5
- Spire.PdfViewer.Asp.dll v8.2.9
- Spire.PdfViewer.Forms.dll v8.2.9
- Spire.Spreadsheet.dll v7.5.3
- Spire.OfficeViewer.Forms.dll v8.8.1
Here is a list of changes made in this release
Spre.doc
| Category | ID | Description |
| New Feature | SPIREDOC-5504 | Supports setting the "Horizontal in Vertical" property of Paragraph text.
Document doc = new Document();
Section section = doc.AddSection();
Spire.Doc.Documents.Paragraph paragraph = section.AddParagraph();
Spire.Doc.Fields.TextRange farEastLayout = paragraph.AppendText("test");
FarEastLayout style = new FarEastLayout();
style.Vertical = true;
farEastLayout.CharacterFormat.FarEastLayout = style;
doc.SaveToFile(outputFile, FileFormat.Docx);
doc.Close();
|
| New Feature | SPIREDOC-11073 | Supports copying styles from template documents when converting Markdown to Docx.
//Load template documents with existing styles
Document temple = new Document();
temple.LoadFromFile("temple.docx");
//Load markdown file
Document doc = new Document();
doc = new Document(@"Doc.md");
//Copy styles from template documents
doc.CopyStylesFromTemplate(temple);
//Save
doc.SaveToFile(@"Doc.docx", Spire.Doc.FileFormat.Docx2016);
|
| New Feature | – | Supports the "Two Lines in One" function to enhance Word to PDF conversion. |
| New Feature | – | Supports retrieving style change revisions.
Document doc = new Document();
doc.LoadFromFile(inputFile);
RevisionInfoCollection revisionInfoCollection = doc.GetRevisionInfos();
StringBuilder sb = new StringBuilder();
foreach (RevisionInfo revisionInfo in revisionInfoCollection)
{
if (revisionInfo.RevisionType == RevisionType.FormatChange)
{
if (revisionInfo.OwnerObject is Spire.Doc.Fields.TextRange)
{
TextRange range = (TextRange)revisionInfo.OwnerObject;
sb.AppendLine("TextRange:" + range.Text + "\r\n");
doc.RevisionsView = RevisionsView.Original;
sb.AppendLine("Original style:" + "isBold:" + range.CharacterFormat.Bold + ";" + "TextColor:" + range.CharacterFormat.TextColor + ";HighlightColor:" + range.CharacterFormat.HighlightColor + ";FontName:" + range.CharacterFormat.FontName + ";UnderlineStyle:" + range.CharacterFormat.UnderlineStyle + "\r\n");
doc.RevisionsView = RevisionsView.Final;
sb.AppendLine("Final style:" + "isBold:" + range.CharacterFormat.Bold + ";" + "TextColor:" + range.CharacterFormat.TextColor + ";HighlightColor:" + range.CharacterFormat.HighlightColor + ";FontName:" + range.CharacterFormat.FontName + ";UnderlineStyle:" + range.CharacterFormat.UnderlineStyle + "\r\n");
}
}
}
File.WriteAllText(outputFile, sb.ToString());
doc.Close();
|
| New Feature | SPIREDOC-10448 | Added a CompatibilityOptions property to the Document class for performing compatibility operations on documents.
Document doc = new Document();
doc.CompatibilityOptions.UlTrailSpace = false;
doc.CompatibilityOptions.AdjustLineHeightInTable = true;
doc.CompatibilityOptions.SpaceForUL = true;
doc.CompatibilityOptions.ApplyBreakingRules = true;
doc.CompatibilityOptions.DoNotExpandShiftReturn = false;
doc.CompatibilityOptions.OverrideTableStyleFontSizeAndJustification = false;
doc.CompatibilityOptions.DoNotAutofitConstrainedTables = true;
doc.SaveToFile("outputFile");
|
| New Feature | - | Added the CompatibilityOptions class, CompatibilityTypes enumeration, and WordVersion enumeration to the Spire.Doc.Settings namespace.
Document doc = new Document();
doc.LoadFromFile("inputtFile");
Spire.Doc.Settings.CompatibilityOptions options = doc.CompatibilityOptions;
|
| New Feature | - | Added the OptimizeForWordVersion() method to the CompatibilityOptions class, enabling document compatibility to be set by specifying a Word version.
Document doc = new Document();
doc.LoadFromFile(inputFile);
// Set properties
doc.CompatibilityOptions.UlTrailSpace = false;
doc.CompatibilityOptions.AdjustLineHeightInTable = true;
doc.CompatibilityOptions.SpaceForUL = true;
doc.CompatibilityOptions.ApplyBreakingRules = true;
doc.CompatibilityOptions.DoNotExpandShiftReturn = false;
doc.CompatibilityOptions.OverrideTableStyleFontSizeAndJustification = false;
doc.CompatibilityOptions.DoNotAutofitConstrainedTables = true;
// Set FileFormat when saving to preserve effects
doc.SaveToFile(outputFile_after, FileFormat.Docx2016);
// Using version compatibility will reset previously set properties
Spire.Doc.Settings.CompatibilityOptions options = doc.CompatibilityOptions;
doc.CompatibilityOptions.OptimizeForWordVersion(WordVersion.Word2016);
PrintCompatibilityOptions(options, outputFile);
doc.Close();
|
| Bug Fix | SPIREDOC-10859 | Fixed issue with incorrect header appearance when converting Word to PDF. |
| Bug Fix | SPIREDOC-11005 | Fixed issue with loss of image transparency when converting Word to PDF/A-3B. |
| Bug Fix | SPIREDOC-11579 | Fixed issue with incorrect rendering when converting Word to PDF. |
| Bug Fix | SPIREDOC-11623 | Fixed issue where converting Word to PDF threw a "System.NullReferenceException". |
| Bug Fix | SPIREDOC-11644 | Fixed issue with incorrect fonts when converting Word to images. |
| Bug Fix | SPIREDOC-11659 | Fixed issue where copying headers threw an "Object reference not set to an instance of an object" error. |
| Bug Fix | SPIREDOC-11680 | Fixed issue where loading a signed document threw a "System.FormatException" error. |
| Bug Fix | SPIREDOC-11696 | Fixed issue where the doc.HtmlUrlLoadEvent could not be used in the latest version. |
| Bug Fix | SPIREDOC-11700 | Fixed issue with incorrect page number updates in the table of contents. |
| Bug Fix | SPIREDOC-11708 | Fixed the issue where page numbers were incorrect when converting Word documents to PDF. |
Spre.XLS
| Category | ID | Description |
| New Feature | SPIREXLS-5938, SPIREXLS-5975 | Supports customizing export options when converting Excel to Markdown.
Workbook wb = new Workbook();
wb.loadFromFile("input.xlsx");
// Create export options
MarkdownOptions options = new MarkdownOptions();
// Set whether to save images using relative paths
options.setSavePicInRelativePath(true);
// Set whether to format hyperlinks as Markdown reference-style links
options.setSaveHyperlinkAsRef(true);
wb.saveToMarkdown("output.md", options);
|
| Bug Fix | SPIREXLS-6023 | Fixes the issue where adding EMF images to headers caused an exception. |
| Bug Fix | SPIREXLS-6036 | Fixes the issue where the KeepDataType setting failed to preserve original data types. |
| Bug Fix | SPIREXLS-6038 | Fixes the issue where image quality was degraded when converting Excel to PDF. |
| Bug Fix | SPIREXLS-6043 | Fixes the issue where date formulas were calculated incorrectly in French locale. |
| Bug Fix | SPIREXLS-6046 | Fixes the issue where converting HTML to Excel threw an IOException. |
Spire.Presentation
| Category | ID | Description |
| New feature | SPIREPPT-2994 | Added support for compressing images.
Presentation presentation = new Presentation();
presentation.LoadFromFile(inputFile);
foreach (ISlide slide in presentation.Slides)
{
foreach (Spire.Presentation.IShape shape in slide.Shapes)
{
if (shape is SlidePicture)
{
SlidePicture ps = shape as SlidePicture;
// Compress the image: remove cropped areas (true) and set target resolution to 150 DPI (commonly used for web display)
ps.PictureFill.CompressImage(true, 150f);
}
}
}
presentation.SaveToFile(outputFile, FileFormat.Pptx2013);
|
| New Feature | SPIREPPT-3004 | Added support for configuring output image DPI when converting slides to images.
presentation.SaveToImage(int pageIndex, int dpiX, int dpiY); |
| Bug Fix | SPIREPPT-3016 | Fixed an issue where bullet points were rendered incorrectly after converting PPTX to PDF. |
| Bug Fix | SPIREPPT-3019 | Fixed an issue where content was clipped after converting PPTX to PDF. |
| Bug Fix | SPIREPPT-3031 | Fixed an issue where slide backgrounds were displayed incorrectly after converting PPTX to PDF. |
| Bug Fix | SPIREPPT-3048 | Fixed an issue that loading a PPTX document threw a “Object reference not set to an instance of an object.” exception. |
Spire.PDF
| Category | ID | Description |
| Adjustment | — | Enhanced the underlying rendering logic for converting PDFs to images on the WPF platform, resulting in significantly improved output image quality. |
| Optimization | SPIREPDF-7855 | Optimized slow web printing requests in the .NET Standard DLL. |
| New Feature | SPIREPDF-7826 | Deprecated the PdfFreeTextAnnotation.TextAlignment property and added the new PdfFreeTextAnnotation.StringFormat property to support horizontal and vertical text alignment.
PdfDocument newPdf = new PdfDocument();
PdfPageBase page = newPdf.Pages.Add();
Spire.Pdf.Graphics.PdfFont font = new PdfFont(PdfFontFamily.Helvetica, 10f);
SizeF textSize = font.MeasureString("sample");
RectangleF rect = new RectangleF(50,50, textSize.Width, textSize.Height);
Spire.Pdf.Annotations.PdfFreeTextAnnotation textAnnotation = new Spire.Pdf.Annotations.PdfFreeTextAnnotation(rect);
textAnnotation.Text = "sample";
textAnnotation.Subject = "subject";
textAnnotation.Font = font;
Spire.Pdf.Annotations.PdfAnnotationBorder border = new Spire.Pdf.Annotations.PdfAnnotationBorder(8);
textAnnotation.Border = border;
textAnnotation.LineEndingStyle = Spire.Pdf.Annotations.PdfLineEndingStyle.None;
textAnnotation.Size = new SizeF(textSize.Width * 1.5F, textSize.Height * 1.5F);
textAnnotation.StringFormat.Alignment = PdfTextAlignment.Center;
textAnnotation.StringFormat.LineAlignment = PdfVerticalAlignment.Middle;
page.Annotations.Add(textAnnotation);
newPdf.SaveToFile(result);
|
| Bug Fix | SPIREPDF-2261 | Fixed the issue where Arabic characters entered into form fields were displayed with incorrect text direction. |
| Bug Fix | SPIREPDF-4834 | Fixed the issue where content became inconsistent when converting XPS to PDF. |
| Bug Fix | SPIREPDF-6712, SPIREPDF-6873 | Fixed the issue where Arabic and Hebrew text rendered incorrectly when converting PDF to PDF/A-3a. |
| Bug Fix | SPIREPDF-7526 | Fixed the issue where text blocks were unnecessarily split into multiple lines during PDF-to-PPTX conversion. |
| Bug Fix | SPIREPDF-7816 | Fixed the issue where removing annotation borders had no effect. |
| Bug Fix | SPIREPDF-7828 | Fixed the issue where a System.Exception was thrown during OFD-to-PDF conversion. |
| Bug Fix | SPIREPDF-7810 | Fixed the issue where converting PDF files with annotations to images threw an “ArgumentException”. |
| Bug Fix | SPIREPDF-7856 | Fixed the issue where converting OFD files to PDF threw a “NullReferenceException”. |
| Bug Fix | SPIREPDF-7858 | Fixed the issue where the .NET Standard DLL printed PDF documents to an incorrect output path when using a virtual printer. |
| Bug Fix | SPIREPDF-7872 | Fixed the issue where converting PDF files to PPTX threw a “Parameter is not valid.” exception. |
Spire.PDF for Android via Java 10.7.9 supports converting PDF to Markdown
We're glad to announce the release of Spire.PDF for Android via Java 10.7.9. This version adds support for converting PDF to Markdown. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New feature | - | Adds support for converting PDF to Markdown.
PdfDocument pdf = new PdfDocument(inputFile);
pdf.saveToFile(OutputFile, FileFormat.Markdown);
PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(inputFile);
ByteArrayOutputStream ms = new ByteArrayOutputStream();
pdf.saveToStream(ms, FileFormat.Markdown);
FileOutputStream outputStream = new FileOutputStream(new File(OutputFile));
outputStream.write(ms.toByteArray());
outputStream.close();
pdf.dispose();
|
Spire.Office for Java 10.12.0 is released
We are pleased to announce the release of Spire.Office for Java 10.12.0. In this version, Spire.Doc for Java supports verifying whether the write-protection password is correct; Spire.PDF for Java reduces the file size of split PDF documents; Spire.XLS for Java optimizes the logic for handling long text in headers. This version also addresses a number of known issues and minor fixes across other components. Details are provided below.
Below is a summary of the changes included in this release.
Spire.Doc for Java
| Category | ID | Description |
| New feature | - | Added a new method to support verifying whether the write-protection password is correct.
Boolean protectionPassword = document.checkWriteProtectionPassword("password");
|
| Bug | SPIREDOC-10684 SPIREDOC-11670 | Fixed an issue where text line breaks were inconsistent when converting Word to PDF. |
| Bug | SPIREDOC-11340 | Fixed an issue where paragraph indentation was inconsistent when converting HTML to Word. |
| Bug | SPIREDOC-11617 | Fixed an issue where retrieving bookmarkEnd failed. |
| Bug | SPIREDOC-11618 | Fixed an issue where a “NullPointerException” was thrown when replacing bookmarks. |
| Bug | SPIREDOC-11619 | Fixed an issue where bookmark tags were altered after bookmark replacement. |
| Bug | SPIREDOC-11624 | Fixed an issue where a “NullPointerException” was thrown during Word-to-PDF conversion. |
| Bug | SPIREDOC-11636 | Fixed an issue where equation parentheses were missing when converting Word to PDF. |
| Bug | SPIREDOC-11637 | Fixed an issue where an exception was thrown when retrieving bookmark content inside form content control. |
| Bug | SPIREDOC-11642 | Fixed an issue where detection of document write-protection passwords was inaccurate. |
| Bug | SPIREDOC-11646 | Fixed an issue where a “Text shaper failed” exception was thrown during Word-to-PDF conversion when text shaping was enabled. |
| Bug | SPIREDOC-11649 | Fixed an issue where content overlapped when converting Word to PDF. |
| Bug | SPIREDOC-11669 | Fixed an issue where a “ClassCastException” was thrown when converting HTML to Word. |
| Bug | SPIREDOC-11677 | Fixed an issue where text replacement was incorrect when setReplaceFirst was set to true. |
| Bug | SPIREDOC-11689 | Fixed an issue where tables were misaligned when converting Word to PDF. |
| Bug | SPIREDOC-11697 | Fixed an issue where images were incompletely rendered when converting Word to PDF. |
Spire.XLS for Java
| Category | ID | Description |
| Adjustment | SPIREXLS-5909 | Optimized the logic for handling text exceeding 253 characters in headers. When the limit is exceeded, an error message is now displayed: "The text string for header is too long. |
| Bug | SPIREXLS-6033 | Fixed the issue where loading an Excel document caused a StringIndexOutOfBoundsException. |
| Bug | SPIREXLS-6039 SPIREXLS-6040 | Fixed the issue where copying a worksheet containing curves threw a NullPointerException. |
| Bug | SPIREXLS-6041 | Fixed the issue where Excel-to-PDF conversion resulted in an error: "Error in Cell: AH125-null"70S シルバー&サイズ=-". |
| Bug | SPIREXLS-6042 SPIREXLS-6052 | Fixed the issue where false positive virus detections occurred by Huorong and Avira antivirus software when scanning the JAR file. |
Spire.PDF for Java
| Category | ID | Description |
| Bug | SPIREPDF-7837 | Fixed an issue where the size of individual PDF files generated after splitting a PDF was larger than that of the original PDF. |
| Bug | SPIREPDF-7844 | Fixed an issue where the retrieved value of combo boxes was incorrect. |
| Bug | SPIREPDF-7857 | Fixed an issue where retrieving the checked state of checkboxes threw an ArrayIndexOutOfBoundsException. |
| Bug | SPIREPDF-7859 | Fixed an issue where accessing a PDF page threw a NullPointerException. |
| Bug | SPIREPDF-7865 | Fixed an issue where converting OFD to PDF threw an exception “ofd.xml not found!”. |
Spire.Presentation for Java
| Category | ID | Description |
| Bug | SPIREPPT-3025 | Fixed the issue where the formula "\square" in PowerPoint was displayed incorrectly on Mac. |
Spire.PDF for Java 11.12.16 reduces the file size of split PDF documents
We’re pleased to announce the release of Spire.PDF for Java 11.12.16. This version reduced the file size of spilt PDF documents, and fixed several known bugs related to form fields and OFD to PDF conversion. More details are as follows.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug | SPIREPDF-7837 | Fixed an issue where the size of individual PDF files generated after splitting a PDF was larger than that of the original PDF. |
| Bug | SPIREPDF-7844 | Fixed an issue where the retrieved value of combo boxes was incorrect. |
| Bug | SPIREPDF-7857 | Fixed an issue where retrieving the checked state of checkboxes threw an ArrayIndexOutOfBoundsException. |
| Bug | SPIREPDF-7859 | Fixed an issue where accessing a PDF page threw a NullPointerException. |
| Bug | SPIREPDF-7865 | Fixed an issue where converting OFD to PDF threw an exception “ofd.xml not found!”. |
Spire.Presentation 10.12 supports compressing images
We're glad to announce the release of Spire.Presentation 10.12. This version supports compressing images and configuring output image DPI when converting slides to images. Additionally, several issues that arose when converting PPTX to PDF and loading PowerPoint documents have been successfully resolved. Check below for the details.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREPPT-2994 | Added support for compressing images.
Presentation presentation = new Presentation();
presentation.LoadFromFile(inputFile);
foreach (ISlide slide in presentation.Slides)
{
foreach (Spire.Presentation.IShape shape in slide.Shapes)
{
if (shape is SlidePicture)
{
SlidePicture ps = shape as SlidePicture;
// Compress the image: remove cropped areas (true) and set target resolution to 150 DPI (commonly used for web display)
ps.PictureFill.CompressImage(true, 150f);
}
}
}
presentation.SaveToFile(outputFile, FileFormat.Pptx2013);
|
| New Feature | SPIREPPT-3004 | Added support for configuring output image DPI when converting slides to images.
presentation.SaveToImage(int pageIndex, int dpiX, int dpiY); |
| Bug Fix | SPIREPPT-3016 | Fixed an issue where bullet points were rendered incorrectly after converting PPTX to PDF. |
| Bug Fix | SPIREPPT-3019 | Fixed an issue where content was clipped after converting PPTX to PDF. |
| Bug Fix | SPIREPPT-3031 | Fixed an issue where slide backgrounds were displayed incorrectly after converting PPTX to PDF. |
| Bug Fix | SPIREPPT-3048 | Fixed an issue that loading a PPTX document threw a “Object reference not set to an instance of an object.” exception. |
Spire.XLS 15.12 supports customizing export options when converting Excel to Markdown
We're pleased to announce the release of Spire.XLS 15.12. This version supports customizing export options when converting Excel to Markdown. Furthermore, the .NET 10.0 framework is now supported, while some obsolete frameworks have been removed. Meanwhile, some issues that occurred when converting Excel to PDF or HTML, and calculating formulas have also been successfully fixed. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Adjustment | / | Removed .NET 2.0, .NET 4.0 ClientProfile, netcoreapp 2.0, and WPF 4.0 ClientProfile; added support for .NET 10.0. |
| New Feature | SPIREXLS-5938, SPIREXLS-5975 | Supports customizing export options when converting Excel to Markdown.
Workbook wb = new Workbook();
wb.loadFromFile("input.xlsx");
// Create export options
MarkdownOptions options = new MarkdownOptions();
// Set whether to save images using relative paths
options.setSavePicInRelativePath(true);
// Set whether to format hyperlinks as Markdown reference-style links
options.setSaveHyperlinkAsRef(true);
wb.saveToMarkdown("output.md", options);
|
| Bug | SPIREXLS-6023 | Fixes the issue where adding EMF images to headers caused an exception. |
| Bug | SPIREXLS-6036 | Fixes the issue where the KeepDataType setting failed to preserve original data types. |
| Bug | SPIREXLS-6038 | Fixes the issue where image quality was degraded when converting Excel to PDF. |
| Bug | SPIREXLS-6043 | Fixes the issue where date formulas were calculated incorrectly in French locale. |
| Bug | SPIREXLS-6046 | Fixes the issue where converting HTML to Excel threw an IOException. |
Spire.PDF 11.12 improves .NET Standard web printing performance and fixes multiple issues
We are pleased to announce the release of Spire.PDF 11.12. This version optimized the performance of slow web printing requests in the .NET Standard DLL. In addition, several issues related to file conversion and printing were fixed, further improving stability and reliability. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Optimization | SPIREPDF-7855 | Optimized slow web printing requests in the .NET Standard DLL. |
| Bug | SPIREPDF-7810 | Fixed the issue where converting PDF files with annotations to images threw an “ArgumentException”. |
| Bug | SPIREPDF-7856 | Fixed the issue where converting OFD files to PDF threw a “NullReferenceException”. |
| Bug | SPIREPDF-7858 | Fixed the issue where the .NET Standard DLL printed PDF documents to an incorrect output path when using a virtual printer. |
| Bug | SPIREPDF-7872 | Fixed the issue where converting PDF files to PPTX threw a “Parameter is not valid.” exception. |
Spire.XLS for Java 15.12.15 optimizes the logic for handling long text in headers
We’re pleased to announce the release of Spire.XLS for Java 15.12.15. This version optimizes the logic for handling long text exceeding 253 characters in Excel headers, and fixes several known bugs as well. More details are as follows.
Here is a list of changes made in this release
| Category | ID | Description |
| Adjustment | SPIREXLS-5909 | Optimized the logic for handling text exceeding 253 characters in headers. When the limit is exceeded, an error message is now displayed: "The text string for header is too long. |
| Bug | SPIREXLS-6033 | Fixed the issue where loading an Excel document caused a StringIndexOutOfBoundsException. |
| Bug | SPIREXLS-6039 SPIREXLS-6040 | Fixed the issue where copying a worksheet containing curves threw a NullPointerException. |
| Bug | SPIREXLS-6041 | Fixed the issue where Excel-to-PDF conversion resulted in an error: "Error in Cell: AH125-null"70S シルバー&サイズ=-". |
| Bug | SPIREXLS-6042 SPIREXLS-6052 | Fixed the issue where false positive virus detections occurred by Huorong and Avira antivirus software when scanning the JAR file. |
Spire.Presentation for Java 10.12.4 fixes a formula display issue on Mac
We are pleased to announce the release of Spire.Presentation for Java 10.12.4. This version mainly fixes a formula display issue on Mac. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug | SPIREPPT-3025 | Fixed the issue where the formula "\square" in PowerPoint was displayed incorrectly on Mac. |
Spire.Office for Python 10.12.0 is released
We're pleased to announce the release of Spire.Office for Python 10.12.0. In the version, the Spire.Doc for Python has optimized and enhanced the API; Spire.XLS for Python supports removing duplicate rows in Excel; Spire.Presentation for Python enhances the conversion from PPTX to PDF; Spire.PDF for Python supports timestamping digital signatures; Spire.Barcode for Python supports Linux ARM platform; Spire.OCR for Python introduces platform adjustments and enhances OCR recognition accuracy.
Moreover, many known issues that occurred when converting, processing and saving Word/Excel/PDF/PowerPoint files have been successfully fixed. More details are listed below.
Here is a list of changes made in this release
Spire.Doc for Python
| Category | ID | Description | |||||||||||||||||||||||||||||||||
| Adjustment | - | Added fine-grained format control capabilities for core document elements such as paragraphs, tables, cells, borders, and styles.
|
|||||||||||||||||||||||||||||||||
| Adjustment | - | Enhanced configuration and operation capabilities for Chart and its sub-objects.
|
|||||||||||||||||||||||||||||||||
| Adjustment | - | Enhanced revision, content control and document comparison features.
|
|||||||||||||||||||||||||||||||||
| Adjustment | - | Enhanced auxiliary functions.
|
|||||||||||||||||||||||||||||||||
| Adjustment | - | Reconstructed list system.
|
|||||||||||||||||||||||||||||||||
| Adjustment | - | Removed some redundant or poorly designed properties and methods to improve the overall consistency of the API. For example,obsolete export methods such as OfficeMath.SaveToImage and SaveImageToStream have been removed. |
Spire.XLS for Python
| Category | ID | Description |
| New feature | SPIREXLS-5883 | Added support for removing duplicated rows in a worksheet.
workbook = Workbook() workbook.LoadFromFile(inputFile) sheet = workbook.Worksheets[0] sheet.RemoveDuplicates() workbook.SaveToFile(outputFile, FileFormat.Version2013) workbook.Dispose() |
| Bug | SPIREXLS-5898 | Fixed the issue where incorrect formulas occurred after calling Range.Move(). |
| Bug | SPIREXLS-5923 | Fixed the issue where chart labels were missing when converting Excel to PDF. |
| Bug | SPIREXLS-5924 | Fixed the issue where output was inconsistent when converting Excel to PDF. |
| Bug | SPIREXLS-5945 | Fixed the issue where chart conversion failed using SaveChartAsImage. |
| Bug | SPIREXLS-5992 | Fixed the issue where formula calculations were incorrect when converting Excel to PDF. |
Spire.Presentation for Python
| Category | ID | Description |
| Bug | SPIREPPT-2905 | Fixed the issue where some text was missing when converting PPTX to PDF. |
| Bug | SPIREPPT-3032 | Fixed the issue where content overlapped when converting PPTX to PDF. |
| Bug | SPIREPPT-3036 | Fixed the issue where table layouts were incorrect after converting PPTX to PDF. |
Spire.PDF for Python
| Category | ID | Description |
| New feature | SPIREPDF-7326 | Added support for timestamping digital signatures.
doc = PdfDocument ()
doc. LoadFromFile (inputFile)
# Create a digital signature
signature = Security_PdfSignature (doc, doc.Pages.get_Item(0), inputFile_pfx,"08100601", "signature")
signature.SignDetailsFont = PdfFont(PdfFontFamily.Courier,8.0)
# Set the bounds of the signature box
signature.Bounds = RectangleF(PointF(90.0, 550.0), SizeF (180.0, 90.0))
# Configure signature appearance and details
signature.NameLabel = "Digitally signed by:Gary"
signature.LocationInfoLabel ="Location:"
signature.LocationInfo = "CN"
signature.ReasonLabel = "Reaseon:"
signature.Reason = "Ensure authenticity"
signature.ContactInfoLabel = "Contact Number:"
signature.ContactInfo = "028-81705109"
# Set document permissions
signature.DocumentPermissions = PdfCertificationFlags.ForbidChanges.value
# Set graphic mode for the signature
signature.GraphicsMode = Security_GraphicMode.SignImageAndSignDetail
# Set the signature image
signature.SignImageSource = PdfImage.FromFile(inputImage)
#When setting “none", the Image and Detail are distributed on both sides, when setting “Stretch", the image extends to the entire signatu
signature.SignImageLayout = SignImageLayout.none
url = "https://freetsa.org/tsr"
signature.ConfigureTimestamp(url)
signature.ConfigureHttpOCSP (None, None)
signature.Certificated = True
doc.SaveToFile(outputFile)
doc.Close()
|
| New feature | - | Added support for configuring text layout options when converting PDF to Excel.
pdf = PdfDocument() pdf.LoadFromFile(inputFile) textOption = XlsxTextLayoutOptions(True, False, False) pdf.ConvertOptions.SetPdfToXlsxOptions(textOption) pdf.SaveToFile(outputFile, FileFormat.XLSX) pdf.Dispose() |
| New feature | - | Added support for configuring line layout options when converting PDF to Excel.
pdf = PdfDocument() pdf.LoadFromFile(inputFile) lineOption = XlsxLineLayoutOptions(False,False,False,False) pdf.ConvertOptions.SetPdfToXlsxOptions(lineOption) pdf.SaveToFile(outputFile, FileFormat.XLSX) pdf.Dispose() |
| New feature | - | Added support for configuring table layout options when converting PDF to Excel.
# Load the PDF document from the specified input file path pdf.LoadFromFile(inputFile) # Set the XlsxSpecialTableLayoutOptions as the conversion options for PDF to XLSX conversion options = XlsxSpecialTableLayoutOptions(False, False, False) # Save the PDF document as an Excel file using the specified format and options pdf.SaveToFile(outputFile, FileFormat.XLSX) |
| New feature | - | Added support for configuring OFD conversion options.
pdf = PdfDocument () pdf. LoadFromFile (inputFile) ofdOptions = OfdOptions() ofdOptions.UseTempFileStorage = True pdf.ConvertOptions.SetPdfToOfdOptions(ofdOptions) pdf.SaveToFile(outputFile,FileFormat.OFD) |
| New feature | - | Added support for ignoring images when converting PDF to Markdown.
# Create an instance of PdfToMarkdownConverter with the input PDF file converter = PdfToMarkdownConverter(inputFile) # Configure the converter to skip processing images in the PDF converter.MarkdownOptions.IgnoreImage = True # Convert the PDF content to Markdown format and save to the output file converter.ConvertToMarkdown(outputFile) |
| New feature | SPIREPDF-7870 | Added support for configuring SVG output width and height when converting PDF to SVG.
converter = PdfToSvgConverter(inputFile) converter.SvgOptions.ScaleX = 1.0 converter.SvgOptions.ScaleY = 1.0 converter.Convert(outputFile) |
| Bug | SPIREPDF-7670 | Fixed an issue where table borders were lost when converting PDF to PPTX. |
| Bug | SPIREPDF-7868 | Fixed an exception thrown when setting cell borders on PdfGrid. |
Spire.Barcode for Python
| Category | ID | Description |
| New feature | - | Upgrades SkiaSharp version to 3.116.1. |
| New feature | - | Adds support for Linux ARM platform. |
Spire.OCR for Python
| Category | ID | Description |
| Adjustment | - | Upgraded SkiaSharp to 3.116.1. |
| Adjustment | - | Added support for the Linux-ARM platform. |
| Adjustment | - | Changed license usage to spire.ocr.LicenseProvider; the common license object was no longer used. |
| Enhancement | SPIREOCR-111 | Enhanced error handling: when the system library libdl.so was unavailable, image scanning returned a clear error message. |
| Enhancement | - | Enhanced OCR recognition capability:
1. Supported recognition of rotated images. configureOptions.AutoRotate = True 2. Supported outputting recognized text in the order of its original positions on the image. visualText = VisualTextAligner(scanner.Text)text = visualText.ToString() |