Spire.XLS 16.4.2 enhances stability of PDF and SVG conversion
We are pleased to announce the release of Spire.XLS 16.4.2. This version enhances the stability of PDF and SVG conversion, ensuring more consistent export results. Meanwhile, it also fixes a critical issue where the text wrapping style did not apply correctly in pivot table cells. Please refer to the details below for more information.
Here is a list of changes made in this release
| Category | ID | Description |
| Adjustment | SPIREXLS-6127 | Corrected the spelling of the SortComparsionType enum to SortComparisonType. |
| Bug Fix | SPIREXLS-6095 | Fixed an issue where the text wrapping style did not apply to pivot table cells. |
| Bug Fix | SPIREXLS-6117 | Fixed an issue where an ArgumentOutOfRangeException was thrown when loading Excel documents. |
| Bug Fix | SPIREXLS-6126 | Fixed an issue where formatting was incorrect when converting Excel to PDF or SVG. |
Spire.Presentation for Java 11.4.1 fixes OLE object data loss issue in PowerPoint documents
We are pleased to announce the release of Spire.Presentation for Java 11.4.1. This version mainly fixes the issue where OLE object data was lost after adding OLE object to PowerPoint documents. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREPPT-3095 | Fixed the issue where OLE object data was lost after adding OLE object to PowerPoint documents. |
Spire.XLS for Java 16.4.1 enhances the conversion from Excel to PDF
We’re pleased to announce the release of Spire.XLS for Java 16.4.1. This update enhances the Excel-to-PDF feature by resolving an issue that caused extra pages to be generated during conversion.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREXLS-6123 | Fixed the issue where extra pages were generated when converting Excel to PDF. |
Spire.PDF for Python 12.4.1 adds a color parameter overload to the ReplaceText interface
We're pleased to announce the release of Spire.PDF for Python 12.4.1. This version mainly adds a color parameter overload to the ReplaceText interface. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREPDF-7907 | Added a color parameter overload to the ReplaceText interface.
textReplacer.ReplaceText("Text", "Replace", Color.get_Blue())
|
Spire.Doc 14.4.9 supports multidimensional document comparison via new CompareOptions
We're pleased to announce the release of Spire.Doc 14.4.9. This version adds several new properties to CompareOptions to support multi-dimensional document comparison. Additionally, the CompareOptions.IgnoreTable property has been renamed to CompareOptions.IgnoreTables for better naming consistency. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Adjustment | - | Renamed CompareOptions.IgnoreTable to CompareOptions.IgnoreTables for naming consistency. |
| New Feature | SPIREDOC-11910 | Adds several new properties to CompareOptions to support multi-dimensional document comparison:
· CompareMoves: Specifies whether to ignore moved content.
· IgnoreCaseChanges: Specifies whether to ignore case changes. · IgnoreFields: Specifies whether to ignore fields. · IgnoreFootnotes: Specifies whether to ignore footnotes. · IgnoreComments: Specifies whether to ignore comments. · IgnoreTextboxes: Specifies whether to ignore text boxes. Document doc1 = new Document();
doc1.LoadFromFile(inputFile_1);
Document doc2 = new Document();
doc2.LoadFromFile(inputFile_2);
CompareOptions options = new CompareOptions();
options.CompareMoves = false;
options.IgnoreCaseChanges = false;
options.IgnoreComments = true;
options.IgnoreFields = true;
options.IgnoreFootnotes = true;
options.IgnoreTables = true;
options.IgnoreTextboxes = true;
doc1.Compare(doc2, "user", new DateTime(), options);
doc1.SaveToFile(outputFile, FileFormat.Docx2013);
|
Spire.OCR for Python 2.1.0 supports integration with cloud-based AI models
We’re pleased to announce the release of Spire.OCR for Python 2.1.0. This version enables seamless integration of cloud-based AI models—including Doubao, Qwen, and DeepSeek—into Spire.OCR for Python. These models help improve accuracy and enhance text recognition in images.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | - | Added support for integration of AI models into Spire.OCR. (Note: Users need to obtain an API Key from the AI platform on their own.)
def _run_ai_test(self):
filename = "1.png"
output_file = "scan.txt"
file_path = r"F:\3.3.0AI\AI\ocr.xml"
model = "AIModel"
api_key = "ApiKey"
api_url = "ApiUrl"
self._update_ocr_config(file_path, model, api_key, api_url)
self._scan_img(filename, output_file)
def _scan_img(self, filename, output_file):
scanner = OcrScanner()
configure_options = ConfigureOptions()
configure_options.ModelPath = r"F:\3.3.0AI\AI"
configure_options.Language = "Japanese"
scanner.ConfigureDependencies(configure_options)
scanner.Scan(filename)
text = scanner.Text.ToString()
with open(output_file, "w", encoding="utf-8") as f:
f.write(text)
def _update_ocr_config(self, file_path, model, api_key, api_url):
tree = ET.parse(file_path)
root = tree.getroot()
model_node = root.find('./configs/model')
api_key_node = root.find('./configs/apiKey')
api_url_node = root.find('./configs/apiUrl')
if model_node is not None:
model_node.text = model
if api_key_node is not None:
api_key_node.text = api_key
if api_url_node is not None:
api_url_node.text = api_url
tree.write(file_path, encoding='utf-8', xml_declaration=True)
print("XML updated successfully!")
|
Spire.Presentation 11.4.5 adds support for saving PPTX to video
We’re pleased to announce the release of Spire.Presentation 11.4.5. This version adds support for saving PPTX files to video formats (.mp4/.wmv), along with several bug fixes, including issues related to data label formatting in PDF conversion and shape clipping during PPTX-to-PDF conversion. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREPPT-3096 | Added support for saving PPTX files to video formats (.mp4/.wmv).
Note: This feature requires specifying the path to ffmpeg. Presentation ppt = new Presentation();
ppt.LoadFromFile(inputFile);
SaveToVideoOption saveOption = new SaveToVideoOption(ffmpegDir);
ppt.SaveToVideoOption=saveOption;//Default: 5 seconds per slide.
ppt.SaveToFile(outputFile_mp4, FileFormat.MP4);
ppt.SaveToFile(outputFile_wmv, FileFormat.WMV);
ppt.Dispose();
|
| Bug Fix | SPIREPPT-3092 | Fixed an issue where data label formatting was incorrect when converting PowerPoint files to PDF. |
| Bug Fix | SPIREPPT-3094 | Fixed an issue where an InvalidOperationException was thrown when converting shapes to SVG. |
| Bug Fix | SPIREPPT-3097 | Fixed an issue where exported files had excessively large sizes when splitting PowerPoint presentations. |
| Bug Fix | SPIREPPT-3098 | Fixed an issue where shapes were clipped during PowerPoint to PDF conversion. |
| Bug Fix | SPIREPPT-3099 | Fixed an issue where some images were missing when converting slides to images. |
| Bug Fix | SPIREPPT-3102 | Fixed an issue where extra incorrect images appeared during PowerPoint to PDF conversion. |
Spire.OCR for Java 2.1.5 fixes a license recognition issue
We are pleased to announce the release of Spire.OCR for Java 2.1.5. This version mainly fixes a license recognition issue. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREOCR-120 | Fixed an issue where license recognition failed when the provided license path started with a "\" character. |
Spire.PDF for Java 12.4.4 optimizes memory consumption when merging PDF documents
We're pleased to announce the release of Spire.PDF for Java 12.4.4. This version optimizes memory consumption when merging PDF documents and also fixes several issues that occurred when processing PDF files. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Optimization | SPIREPDF-7657 | Optimized memory consumption when merging PDF documents. |
| Bug Fix | SPIREPDF-7843 | Fixed an issue where replacing text incorrectly caused other text to be lost. |
| Bug Fix | SPIREPDF-8008 | Fixed an issue where content became misaligned after text replacement. |
| Bug Fix | SPIREPDF-8019 | Fixed an issue where converting PDF to OFD without a license threw a "Specified argument was out of the range of valid values." exception. |
Spire.Doc 14.4.4 supports saving charts as templates
We're pleased to announce the release of Spire.Doc 14.4.4. This version supports saving charts as templates and allows configuring the Producer metadata when converting to PDF via the GeneratorName property. Additionally, it supports retrieving X and Y axis data values and managing chart data label positions. Meanwhile, some issues that occurred when converting Markdown to PDF/Docx and merging Word documents have also been successfully fixed. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Adjustment | - | Renamed ToPdfParameterList.IsAtlast to ToPdfParameterList.IsAtLeast.
ToPdfParameterList.IsAtlast-->ToPdfParameterList.IsAtLeast |
| New Feature | SPIREDOC-10293 | Supports saving charts as templates.
Document doc = new Document();
doc.LoadFromFile(inputFile);
int count = 1;
foreach (Section sec in doc.Sections)
{
foreach (Spire.Doc.Documents.Paragraph paragraph in sec.Paragraphs)
{
foreach (DocumentObject obj in paragraph.ChildObjects)
{
if (obj is ShapeObject shape)
{
Chart chart = shape.Chart;
if (chart == null)
continue;
string fileName = Path.Combine(outputPath, $"{count}.crtx");
chart.SaveAsTemplate(fileName);
count++;
}
}
}
}
|
| New Feature | SPIREDOC-11457 | Adds the GeneratorName property to allow configuring the Producer metadata when converting to PDF.
string genName = "Testing For Set Producer";
Document doc = new Document();
doc.LoadFromFile(filename);
ToPdfParameterList toPdf = new ToPdfParameterList();
toPdf.GeneratorName = genName;
doc.SaveToFile("result.pdf", toPdf);
|
| New Feature | SPIREDOC-10828 | Adds XValues and YValues properties to retrieve data values for specified series in charts.
Document doc = new Document();
doc.LoadFromFile(inputFile);
StringBuilder sb = new StringBuilder();
int number = 1;
foreach (Section sec in doc.Sections)
{
foreach (Paragraph paragraph in sec.Paragraphs)
{
for (int i = 0; i < paragraph.ChildObjects.Count; i++)
{
DocumentObject obj = paragraph.ChildObjects[i];
if (obj is ShapeObject)
{
ShapeObject shape = obj as ShapeObject;
Chart chart = shape.Chart;
sb.Append("\r\n\r\nPage " + number + ":\r\n" + "Get all X-axis data: ");
for (int x = 0; x < chart.XValues.Count; x++)
{
ChartValue xVal = chart.XValues[x];
// Get all X-axis data values
sb.Append(xVal.StringValue + " ");
}
// Get the first series
ChartSeries series = chart.Series[0];
sb.Append("\r\nGet Y-axis data: ");
foreach (ChartValue yVal in series.YValues)
{
// Get all Y-axis data values of the first series
sb.Append(yVal.Value + " ");
}
}
}
}
number++;
}
|
| New Feature | SPIREDOC-11457 | Supports reading and setting chart data label positions.
Document doc = new Document();
foreach (ChartDataLabelPosition position in Enum.GetValues(typeof(ChartDataLabelPosition)))
{
Section section = doc.AddSection();
section.AddParagraph().AppendText(position.ToString());
Spire.Doc.Documents.Paragraph newPara = section.AddParagraph();
ShapeObject shape = newPara.AppendChart(ChartType.Pie, 500, 300);
Chart chart = shape.Chart;
chart.Series[0].HasDataLabels = true;
chart.Series[0].DataLabels.ShowCategoryName = true;
chart.Series[0].DataLabels.ShowValue = true;
// Set position
chart.Series[0].DataLabels.Position = position;
ShapeObject shape2 = newPara.AppendChart(ChartType.Bubble, 500, 300);
Chart chart2 = shape2.Chart;
chart2.Series[0].HasDataLabels = true;
chart2.Series[0].DataLabels.ShowCategoryName = true;
chart2.Series[0].DataLabels.ShowValue = true;
chart2.Series[0].DataLabels.Position = position;
}
doc.SaveToFile(outputFile, FileFormat.Docx);
doc.Dispose();
|
| Bug Fix | SPIREDOC-11586 | Fixes the issue where tables were converted incorrectly when converting Markdown to Docx or PDF. |
| Bug Fix | SPIREDOC-11854 | Fixes the issue where merged cells in tables were split incorrectly. |
| Bug Fix | SPIREDOC-11871 | Fixes the issue where a System.InvalidCastException was thrown when merging Word documents. |
| Bug Fix | SPIREDOC-11874 | Fixes the issue where a System.NullReferenceException was thrown when loading HTML. |